Thursday, May 8, 2008

Outbound Link Tracking Code Google Analytics

Google analytics can track links that that point to another domain or sub domain. By tagging the out going link the clicks for the link can be tracked easily. Javascript code takes the responsibiliy of tracking the link by assigning a pageview for every click.

Refer to the following example.

To track the click on following link to www.advertisingaxis.com create an arbitrary url like this /outgoing/advertisingaxis_com. The following piece of javascript code is enough.

onClick="javascript:
pageTracker._trackPageview('/outgoing/advertisingaxis_com');">

No comments:

Post a Comment