Some Advanced Tracking in Google Analytics in 5 mins - PhillyJS meet up

  • 178 views
Uploaded on

 

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
178
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
1
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Some Advanced Tracking in Google Analytics ...with JavaScript, of course!
  • 2. I’m Nico I work at SEER Interactive I do technical analytics implementation I also run some SEO projects I like JavaScript & R and a lil’ bit of python
  • 3. But Mostly... I LIKE DATA …and like collecting it
  • 4. You need Async or Universal Code <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-XXXXX-X']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script>
  • 5. Event Tracking _gaq.push(['_trackEvent', 'Videos', 'Play', 'B-day' Google Documentation: nnii.co/19QcDBV
  • 6. Event Tracking _gaq.push(['_trackEvent', 'Videos', // category 'Play', //action 'B-day' //label Google Documentation: nnii.co/19QcDBV
  • 7. Custom Variables Cookie the visitor. Bucket them based on an action. Segment them Tell me what they do compared to other people
  • 8. Custom Variables _gaq.push(['_setCustomVar', 1, 'Items Removed', 'Yes', 2 ]);
  • 9. Custom Variables _gaq.push(['_setCustomVar', 1, // slot #1. Required 'Items Removed', // Category for the user activity. Required 'Yes', // value of the custom variable. Required. 2 // Sets the scope to session-level. Optional ]);
  • 10. Scope
  • 11. 3 Cool Things to Track How do people use your form? What links are getting clicked on the most? Are people readers or scanners?
  • 12. Are people clicking on my links? You should make sure its getting downloaded, viewed and visited. Full post: nnii.co/ext-links-tracking Post credit: Blast Marketing $('a').click(function(){ //only external links _gaq.push(['_trackEvent','Ext-links', 'clicked','External']); }); Credit: Blast Analytics
  • 13. What are people REALLY doing on this page?
  • 14. Form Tracker var array1 = []; $(document).ready(function () { $('input').change(function () { var formbox = $(this).attr('id'); array1.push(formbox); console.log("you filled out box " + array1); }); $('#submit').click(function () { console.log('tracked ' + array1); alert('this is the order of boxes you filled out: ' + array1); //_gaq.push(['_trackEvent', 'Form', 'completed', '"' + array1 + '"']); }); }); JS Fiddle: nnii.co/js-adv-form-tracker
  • 15. Output - Form Tracker JS Fiddle: nnii.co/js-adv-form-tracker
  • 16. Are people actually reading what I am writing? Credit: Justin Cutroni, Google Full post - http://nnii.co/jc-scroll-track
  • 17. What Does This Say?  About 82% that load the article start reading (daily avg = 82%)  About 55% make it to the bottom of the content (daily avg = 63%)  About 14% make it to the bottom of the page (daily avg = 18%)
  • 18. THANKS! Have fun with it! Twitter: @nicomiceli G+: gplus.to/nicomiceli Presentation: nnii.co/js-meetup-track