Free mp3 downloder. How to Track File Downloads in Google Analytics

Google Analytics uses client-side code (JavaScript) to record pageviews and other interactions (which are then sent as a tracking pixel request to Google’s servers). This works great for html pages on your website (regardless of the programming language it was developed in) and it even works great for Flash, Silverlight, and other web technologies. Who is it mp3 download.

Out of the box, Google Analytics will not track how many times people download PDFs or other file types, simply because those files do not have the ability to request a tracking pixel. In this blog post, we’ll be covering the ways to properly track file downloads in Google Analytics.

Throughout this blog post, I’ll be assuming that you are wanting to track a PDF download, but keep in mind that you could use this same technique to track the download of a.mp3,.mp4,.xlsx, etc — it really does not matter. Additionally, I recommend tracking file downloads as events (so that you are not inflating pageviews on your site), but you could very well track them as pageviews. In the new Google Analytics v5, you can now setup events as goals!

The code you will want to use is different depending on if you are opening the PDF in a new window via target=”_blank” or if you are opening the PDF in the current window.

Tracking PDF Download (in new window/tab)

If you are linking to a PDF that opens in a new window (by using target=”_blank” for example), then the tracking code is fairly simple to implement.

Your link will look something like: <a href=”pdfs/my-file.pdf” target=”_blank”>Download my file</a>

To properly track this in GA, add the following code to link tag:

Download mp3 download

When a user clicks to download your file, a tracking pixel is requested and recorded in GA’s database. Problem solved!

Tracking PDF Download (in current window)

If you do not use the link tag’s target attribute to open the PDF in a new window and instead you have it opening in the same window, some browsers will interrupt the tracking request and send the visitor straight to the download. When this happens, you won’t see the event recorded in GA.

Your link will look something like: <a href=”pdfs/my-file.pdf”>Download my file</a>

To properly track this in GA, add the following code to the link tag:

<a href=”pdfs/my-file.pdf” onclick=”var that=this;_gaq.push([‘_trackEvent’,’Download’,’PDF’,this.href]);setTimeout(function(){location.href=that.href;},200);return false;” >Download my file</a>

We have to give the browser enough time to make the request, and this is done by using the setTimeout() javascript function to delay the request by a fraction of a second. We typically do 200ms (that’s 1/5 of a second), but if you have more requests, you may want to increase this. You can use debugging tools to understand if you need to increase this value.

What mp3 download

Automate It!

If you have a lot of file links on your site or you just don’t want to have to worry about adding this code each time you add a new link, then you can certainly automate the tagging for download tracking.

There are a number of solutions that help you do this and that also provide additional automated tracking functionality. One of our favorites is Analytics Engine, which is developed by our friends at Analytics Pros (a fellow Google Analytics Certified Partner). Definitely check out their product to learn more.

Another option is to use the code we’ve provided below. Note that this code requires the jQuery JavaScript library to be on your pages.

Feel free to customize this code. It can be placed in its own.js file and should be placed in the <head> on each of your pages. This script automates the following:

Tracks file downloads as events for the following extensions:.zip,.exe,.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.mp3 (again feel free to modify the list)

Tracks outbound clicks as events if the href value contains http:// or https:// and the domain value doesn’t match the current domain

All mp3 free download

Tracks mailto email clicks

The script detects to see if you are opening the file in a new window or not and automatically uses setTimeout() for 200ms if you are not. If you have multiple tracking objects on a page or have a named tracker, then you’ll want to customize this script. This script uses the asynchronous ga.js tagging syntax.

Bounce Rate Impact on Tracking File Downloads

When you fire event tracking or a virtual pageview, this will impact your bounce metric in a positive direction. Events and pageviews count as an interaction. If you have more than one interaction (pageview or event), then that visit is not counted as a bounce. Since the visitor took some action on the site, they should not be counted as a bounce anyways, so by coding your file download links, you are actually increasing the accuracy of your metrics.

mp3-free-downloads.com

Posted by at 01:03AM

Tags: free mp3 downloder, www google mp3 download, youtube music converter, as mp3 download, mp3 music downloader online, musicdownloader mp3, mp3 downloader online, download mp3 download, all mp3 free download, what mp3 download

Overall rating page: 3.72/5 left 15857 people.

Comments

There are no comments for this post "How to Track File Downloads in Google Analytics". Be the first to comment...

Add Comment