Forum Moderators: DixonJones
Content i. Thanks for downloading the ebook.
Content ii. Oops! You have entered a wrong pin. Please recheck your mail as we redirect you to the home page.
My goal is to track how many visitors are downloading the ebook only (or viewing Content i). The criteria one has to fulfill to download is to enter a correct pin (prior to the thank you page).
To track the downloads I am using this code in the thank you page:
{capture name=mycontent}{$content}{/capture}
{if $smarty.capture.mycontent == 'Thanks for downloading the ebook.'}
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
<script type="text/javascript">
_uacct = "UA-000000-1";
urchinTracker("/downloaded.html");
</script>
{else}
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
<script type="text/javascript">
_uacct = "UA-000000-1";
urchinTracker();
</script>
{/if}
I want Google Analytics to create a virtual pageview of downloaded.html so that just looking at the stats for this particular page I can safely know the number of downloads. (So in reality I haven't set up any goals. Of course I can create one with the goal url set to downloaded.html)
Can anyone kindly confirm if I am in the right track (OR I am terribly wrong). I am looking forward to the logic I am using rather than the wordpress/smarty code snippets.
Regards,
getxb