3/30/12

Adding Google Analytics Java Script Event Tracking

To add Google Analytic tracking events for any java script event use this code:


_gaq.push(['_trackPageview', '/pagename/item-to-track']);


This assumes you have included your analytics code:



var _gaq=[["_setAccount","UA-XXXXX-X"],["_trackPageview"]];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=1;
g.src=("https:"==location.protocol?"//ssl":"//www")+".google-analytics.com/ga.js";
s.parentNode.insertBefore(g,s)}(document,"script"));


So for example: Click Me

16 comments:

  1. Replies
    1. Machine Learning Projects for Final Year machine learning projects for final year

      Deep Learning Projects assist final year students with improving your applied Deep Learning skills rapidly while allowing you to investigate an intriguing point. Furthermore, you can include Deep Learning projects for final year into your portfolio, making it simpler to get a vocation, discover cool profession openings, and Deep Learning Projects for Final Year even arrange a more significant compensation.

      Python Training in Chennai Python Training in Chennai Angular Training

      Delete
  2. Analytics is a great tool to check where the traffic on your website is coming from. You can even go into specifics and tell what city they are from, what browser they are using, how long they are staying on your website.google dashboard

    ReplyDelete
  3. Apa benar cara menggugurkan kandungan dengan ragi ini terbukti dapat melunturkan janin pada ibu hamil . Entah itu kurangnya pengetahuan atau terdesaknya finansial , bahan-bahan alami seperti ragi maupun asam jawa mereka coba untuk praktek cara menggugurkan hamil padahal belum ada yang menyatakan secara ilmiah kalau bahan-bahan alami atau tradisional tersebut mampu untuk cara menggugurkan hamil 2 minggu secara tepat dan aman . Siklus menstruasi yang terjadi pada setiap wanita terkadang mengalami tidak teratur , lantas , apa penyebabnya ? . apa yang dirasakan saat mimpi basah apakah terasa aneh atau nikmat ? . Sebagai seorang suami tidak ada salahnya mengetahui tips cara cepat wanita mencapai klimak agar pasangan wanita Anda puas dan merasakan kebahagian dalam melakukan keintiman dalam bercinta .

    ReplyDelete