Welcome to WebmasterWorld Guest from

Forum Moderators: DixonJones & mademetop

Message Too Old, No Replies

how to use GA virtual pageview tracking?

google analytics virtual pageview

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

New User

5+ Year Member

joined:Apr 19, 2010
votes: 0

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?

<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 type="text/javascript">
var pageTracker = _gat._getTracker("UA-accountcode-6");

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

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

New User

5+ Year Member

joined:July 2, 2010
votes: 0

I think so

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members