subscribe

You can update this text in your control panel, under Theme Options. Nam massa. Ut tempor augue non sapien lobortis aliquam. Maecenas.

Event Tracking With Google Analytics

November 30th, 2009

Google Analytics is a very popular tool for tracking visits, pageviews, and lots of other metrics for your website. Here’s a handy little trick which allows you to track any event you want on your site, a click on a specific link for example, and have it integrated into your analytics data.

1) First, make sure you are already using Google Analytics on your site (or the page that you want to track events).

2) Second, add this snippet just below the Google Analytics code:

<script type=”text/javascript”>
function trackEvent(category,url,description) {
try {
pageTracker._trackEvent(category, description, document.location.pathname);
setTimeout(’document.location = “‘ + url + ‘”‘, 100);
} catch(err){}
}
</script>

4) Whenever you want to track something, you need to add a call to trackEvent, for example:

<a onclick=”trackEvent(’Outbound Links’,'http://google.com’,'Google’);return false;” href=”http://google.com”> Google </a>

5) Now log into Google Analytics, click on ‘Content’ -> ‘Event Tracking’ you will be able to see clicks on the above link to Google (you might not see it right away!)

Happy tracking!

-Source

Tags: , , ,

39 Responses to Event Tracking With Google Analytics

  1. Ivan says:

    comment…

    Спасибо за информацию !…

  2. 456 says:

    Olga

    Otkuda material ?

  3. Light says:

    http://rel” rel=”nofollow”>Даже не знаю…

    Ссылки как то странно отображаются…

  4. Frankie says:

    Hello! Please e-mail me your contacts. I have a question jack@infansport.ru” rel=”nofollow”>……

    Thank you!…

  5. WILLIAM says:

    PillSpot.org. Canadian Health&Care.No prescription online pharmacy.Special Internet Prices.PillSpot.org. Vitamins@buy.online” rel=”nofollow”>.…

    Categories: Weight Loss.Antidiabetic.Eye Care.Anxiety/Sleep Aid.Mental HealthAnti-allergic/Asthma.Pain Relief.Vitamins/Herbal Supplements.Antibiotics.Womens Health.Mens Health.Stop SmokingStomach.Antiviral.Antidepressants.Blood Pressure/Heart.Skin…

  6. CLIFFORD says:


    MedicamentSpot.com. Canadian Health&Care.Best quality drugs.Special Internet Prices.No prescription online pharmacy. Low price drugs. Buy drugs online

    Buy:Actos.Petcam (Metacam) Oral Suspension.100% Pure Okinawan Coral Calcium.Mega Hoodia.Zyban.Valtrex.Zovirax.Synthroid.Nexium.Lumigan.Arimidex.Accutane.Human Growth Hormone.Prevacid.Retin-A.Prednisolone….

  7. TED says:


    CheapTabletsOnline.com. Canadian Health&Care.Special Internet Prices.Best quality drugs.No prescription online pharmacy. Online Pharmacy. Order drugs online

    Buy:Soma.Zithromax.Maxaman.Viagra.Cialis.Viagra Soft Tabs.Propecia.Levitra.Viagra Professional.Cialis Soft Tabs.Viagra Super Force.Viagra Super Active+.Cialis Super Active+.Super Active ED Pack.Cialis Professional.Tramadol.VPXL….

  8. JULIO says:


    CheapTabletsOnline.Com. Canadian Health&Care.No prescription online pharmacy.Special Internet Prices.Best quality drugs. High quality drugs. Order pills online

    Buy:100% Pure Okinawan Coral Calcium.Prednisolone.Accutane.Human Growth Hormone.Zyban.Zovirax.Valtrex.Actos.Nexium.Lumigan.Mega Hoodia.Synthroid.Arimidex.Prevacid.Petcam (Metacam) Oral Suspension.Retin-A….

  9. CLINTON says:


    NEW FASHION store. Original designers collection at low prices!!! 20 % TO 70 % OFF. END OF SEASON SALE!!!

    BUY FASHION. TOP BRANDS: GUCCI, DOLCE&GABBANA, BURBERRY, DIESEL, ICEBERG, ROBERTO CAVALLI, EMPORIO ARMANI, VERSACE…

  10. ERNEST says:

    buy@Amoxicillin.com” rel=”nofollow”>.

    Buy:Viagra Super Active+.Viagra Soft Tabs.Viagra Professional.Maxaman.Tramadol.Cialis Super Active+.Super Active ED Pack.Cialis.VPXL.Soma.Cialis Professional.Levitra.Viagra Super Force.Cialis Soft Tabs.Viagra.Propecia.Zithromax….

  11. JUAN says:

    Accupril

    Buygeneric drugs…

  12. GABRIEL says:

    Abilify

    Buygeneric pills…

  13. LAWRENCE says:

    Buygeneric meds…

  14. BRIAN says:

    buy@cheap.viagra.in.uk” rel=”nofollow”>.

    Buywithout prescription…

  15. ROLAND says:

    prozac@dangers.now” rel=”nofollow”>..

    Buygeneric drugs…

  16. HARVEY says:

    Zyvox@official.site” rel=”nofollow”>..

    Buygeneric pills…

  17. LARRY says:

    buy zithromax online

    Buyno prescription…

  18. ANDY says:

    Vitamin B

    Buynow it…

  19. NICHOLAS says:

    Omnicef

    Buynow it…

  20. JESSIE says:

    Synthroid

    Buygeneric pills…

  21. VIRGIL says:

    Retin A

    Buywithout prescription…

  22. LONNIE says:

    Remeron

    Buyno prescription…

  23. ALEX says:

    purim suddah

    Buygeneric meds…

  24. ANDRE says:

    Synthroid

    Buygeneric meds…

  25. CLINTON says:

    Eye Drops

    Buyno prescription…

  26. RUSSELL says:

    Pulmicort

    Buywithout prescription…

  27. ANDY says:

    Spiriva@Spiriva.Spiriva” rel=”nofollow”>..

    Buyno prescription…

  28. MARK says:

    retin@a.cheap.no.prescription” rel=”nofollow”>..

    Buygeneric drugs…

  29. JARED says:

    high@dose.dexamethasone.induction” rel=”nofollow”>..

    Buydrugs without prescription…

  30. LYNN says:

    premarin@cream.comments” rel=”nofollow”>…

    Buyit now…

  31. JUAN says:

    Buyno prescription…

  32. SALVADOR says:

    ..

    Buyit now…

Leave a Reply

Name and Email Address are required fields. Your email will not be published or shared with third parties.

Spam protection by WP Captcha-Free