Track Downloads with Google Analytics
Do you know if your app download links on your website are converting? Did you know you can track how many times your site refers a user to download your apps? It’s easy to do with some Google Analytics and javascript magic.
Install Google Analytics
The first thing to do, if you haven’t done so already, is to get Google Analytics to start tracking your website. It’s free and easy to set up. Installing analytics is outside the scope of the article, but it’s extremely simple to do. Just follow the link above to register and go through the installation process.
Most people know that Google Analytics can track your website traffic statistics, but did you know that in addition to visits, you can track individual events and actions? We’re going to utilize a function of analytics called “Event Tracking” to help us with this.
Add Javascript to Links
In order to begin tracking link clicks, we need to add a bit of javascript to the links that are pointing to our apps in the app store. Find a link on your website that you would like to track, and add the following onclick event:
onclick="_gaq.push(['_trackEvent', 'Event Category', 'Event Type', 'Description']);"
Next, replace “Event Category” with a category you would like all similar events to be grouped under. For my website I chose “Application Buttons”. After that, replace “Event Type” with the type of event you are tracking. I chose “Click”. Finally, replace “Description” with the name of your app. If you have an app available on multiple platforms, I would add the platform name to the description.
As an example, my tracking event for the Epcot Food and Wine Festival App is as follows:
onclick="_gaq.push(['_trackEvent', 'Application Buttons', 'Click', 'Food and Wine iPhone']);"
All of my apps are grouped under the “Application Buttons” categories. You could just as easily track hovers and mouseouts by replacing onclick with whatever javascript action you want to track, but clicks make the most sense. Remember, these onclick events need to be added to your links.
After getting your first event tracking code in place, click your link. You should be directed to your application, while Google keeps track of the link in the background.
Viewing Your Events
It’s important to note that Google only updates their site statistics once per night. This means that if you follow these steps immediately after installing your tracking code, you will not see the events being tracked. Be sure to check your stats the following day to see your tracking statistics.
You can view your tracked events by going to your site’s analytics report and clicking on Content > Event Tracking. You will be taken to a graph overview of your tracked events and you will see a summary of your events at the bottom of your screen. If you’ve waited until the following day to see your statistics, you should see a group of events named “Application Buttons” or whatever you decided to name your event category.
Click “View All” next to the category, and you will be brought to a summary of all of the events that have occurred under that category. At this point you should only see “Click”.
Click on the event name and you will see all of the event descriptions that you have set up under that category and action.
I know my downloads are abysmal. I actually forgot to set up my tracking code on a few links, but writing this article got me to go back and make sure all of my referrals are now being tracked. Thanks iDevBlogADay!
As you can see, we’ve had 7 people click to view our Food and Wine Festival app in the Android app store. Oddly enough, our Wolfenstein 3D soundboard only has 1 referral, but we get a lot of traffic to our site from the search phrase “wolfenstein 3d soundboard”. Knowing this, we can now take action to try to push visitors toward downloading the wolfenstein 3D soundboard. This may mean updating our copy on the site page or featuring the app somewhere else on our website.
So there you have it! As you can see, tracking your app referrals from your website is extremely easy. Hopefully this how-to has been helpful for you. If you have any other tips for tracking referral statistics, I’d love to hear them! Leave a comment below, and share your knowledge!
Also, be sure to check back next week when I release October’s monthly income report. I’m trying not to bombard my idevblogaday posts with income reports, but I know they’re very popular. If you’d like to be notified when that article publishes, be sure to follow us on Twitter @codefortravel.



0 Comments