Last Updated on Saturday, 23 February 2013 01:37 Written by David Bauernschmidt Wednesday, 27 February 2013 12:00
I currently build and manage a pro-bono site for Greenwood Christian Academy where they have a lot of PDF documents. The users click on documents for enrollment, calendars, educational forms, health documents, etc. Just recently they also announced an event that offers sponsorships. The question that has come up lately is how to use Google Analytics to track how many people view the pdf documents and how many people click on the sponsor links. This may sound simple but then I realized that Google does not track counts for links that go away from the site or to pdf views. Not accepting this as failure, I started looking around and came across a “cool” feature that Google offers called ‘_trackEvent’. You can use this for a multitude of things but I believe this is what I need. The key is to realize that you need to attach something to the <a href> before the actual redirect. Since I always use the pdf and external links with a target=’_blank’ I decided to attach an event handler to the <a href>. The problem is this could take a while, especially if you have a lot of links and pdf. Thank goodness for jquery. I attached the code below as close to the end of the page as possible (preferably right before the </body>). This script attaches a click event to every <a href> if there is a target=’_blank’. I then determine if it is a pdf or just a “plain” link.Learn More
Last Updated on Tuesday, 12 June 2012 02:42 Written by Richi González Wednesday, 27 June 2012 12:00
I saw in the forum someone asking how to remove views from videos, so here it goes; I hope you find it useful. I always recommend making a backup of the files we are going to edit, in case you would like to revert changes. This perfectly works for v2.6, and most likely works in the entire v2 branch. Yet, if you want me to test it for a specific version, let me know in the comments below!
Difficulty Level: Easy
1. Open watch_video.html, located in ./*Learn More