Virtual Pageviews and Tracking Outbound Links

Contact Us or call 1-877-932-8228
Virtual Pageviews and Tracking Outbound Links

Virtual Pageviews and Tracking Outbound Links

Google Analytics by default cannot track your outbound links. However, you can leverage virtual pageviews to track any outbound links which you may have on your website.

For example, if your outbound link looks like:

<a href="http://checkout.google.com">Click Here For Shopping Cart</a>

You need to modify the above link to look like:

< a href="http://checkout.google.com" onClick= "_gaq.push(['_trackPageview', '/outbound/checkoutprocess/checkout.google.com']);/>Click For Shopping Cart</a>

By doing so, you will generate a virtual pageview when someone clicks on this outbound link. The virtual directory structure will provide context for your report analysis.

Next