Welcome to WebmasterWorld Guest from 54.226.194.180

Forum Moderators: DixonJones & mademetop

Message Too Old, No Replies

how to use GA virtual pageview tracking?

google analytics virtual pageview

     

NoahSEO

6:05 am on Jul 2, 2010 (gmt 0)

5+ Year Member



when i add a segment of code to track a event, say download, must i place the whole google analytics code before where i call "_trackPageview"?
I mean, should i do exactly like below?
<body>

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write( unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-accountcode-6");
pageTracker._setDomainName("none");
pageTracker._setAllowLinker(true);
pageTracker._initData();
pageTracker._trackPageview();
</script>


<a href="movie.avi" onclick="javascript: pageTracker._trackPageview("/download/movie.avi");">download movie</a>


</body>

mec08

8:12 am on Jul 2, 2010 (gmt 0)

5+ Year Member



I think so
 

Featured Threads

Hot Threads This Week

Hot Threads This Month