.

Wednesday, July 8, 2009

Find Out Who Clicks on a Particular Link with Google Analytics?





Suppose I want to add a label of “customers” to any visitor who reaches my shopping cart’s receipt page. I would add an additional line of code to the Google Analytics Tracking Code (GATC) on my receipt page. It would then look something like this:


Notice the line in bold that includes _setVar. If you take a look at the code example above, you will see that I used the termcustomers,“ the label that I want to appear in the User Defined report.

When a user visits the page he will be identified as a part of the “customers” segment in the User Defined report, allowing you to perform analysis on all visitors who have purchased something from your online store. Neat, huh?









Can I use _setVar when someone clicks on a link instead of visiting a page?

Yes - you can also use the pageTracker._setVar function when someone clicks on an important link on your site, or makes a key selection on an important form that you want visitors to fill out. For example, if you wanted to add a custom label to any visitor who clicks on your “Live Help” applet, you can ask your IT department or webdesigner to add an “onClick” event, and give them the following line of code:

onClick="pageTracker._setVar('Needs Help');"

What will this look like in the end?

When all of your coding is complete, check the User Defined report after about a day or so and you should see something like this:

No comments:

Post a Comment

Speak your mind

web hosting reviews

Top 3 Web Hosting for Designers

Our reviews of the best web hosting providers for Designers.

Rank Features Features Extra Features Web Hosting Review
1
HostRocket
Many Features

Disk Space: Unlimited
Bandwidth: Unlimited
Email Accounts: Unlimited

MySQL Databases: Unlimited
FTP Accounts: Unlimited
- Streaming audio/video capabilities
- Ready to go scripts:
E-commerce, gallery, forums etc


HostRocket
Review
Email in your review
2
WebHostingPad
Reliable Host

Disk Space: Unlimited
Bandwidth: Unlimited
Email Accounts: Unlimited

MySQL Databases: Unlimited
FTP Accounts: Unlimited
- Ready to go scripts:
E-commerce, gallery, forums etc
- $25 Google Credit - Advertise on google. They give you $25 credit

- $25 Yahoo Credit
WebHostngPad
Review
Email in your review
3
Globat
Reliable Host

Disk Space: Unlimited
Bandwidth: Unlimited
Email Accounts: Unlimited

MySQL Databases: Unlimited
FTP Accounts: Unlimited
- $4.44 One of the cheapest
- You get FREE Domain too
- $30 Google AdWords Marketing Credit
- Ready to go scripts:
E-commerce, gallery, forums etc

Globat
Review
Email in your review