A podcast listener wearing headphones on a busy city street

Track podcast downloads as Google Analytics events with this free PHP script

A podcast listener wearing headphones on a busy city street
This is a potential podcast listener… do you have the stats to prove it?
As regular readers of this website know, I host a few podcasts, including Wrapp Up (a podcast about awesome apps) and Not a Real Job (a podcast about digital marketing).

While we get great subscriber stats through FeedPress and great website analytics through Google Analytics there was still no single place to see how many people had downloaded a given episode of the show. FeedPress offers download stats, but only for episodes downloaded via the RSS feed; anyone casually listening on the website would be ignored.

I knew there had to be a solution, so my friend Nick Sampsell and I cooked up this cool little script that triggers events every time your listeners download a file. We call it Downloadalytics, and it’s free on Github.

Screen Shot 2014-01-21 at 07.36.29Each file gets its own entry in Google Analytics, so you can easily track which files are the most popular.

There are full instructions on the Downloadalytics Github page that should walk you through the basic setup of the script. I’ve included comments in the source code that should help as well.

If you need more specific help, we are available to install the script as well, for $200 per install. You can get in touch at the Van Patten Media website, and we’ll be in touch ASAP to help!

photo credit: Kris Krug via photopin cc

Published by

Chris Van Patten

I'm an entrepreneur, designer, theatre producer, and tea aficionado. I love helping artists achieve their digital potential through custom websites, apps, and more. I own and operate Van Patten Media, a boutique web agency in New York.

  • I’ve been looking for something exactly like this! You’re the freaking BOSS!

  • Randal Flamm

    How do I call download.php? Where? In the xml file?

  • Si_bone

    I know this is kinda old, but is there anyway you can post a working example of the filled out file?

  • Great one, all set up now, and downloads are counting.

    One question though, this kind of traffic that generates these events, they do not bring with them any other information. Is it at all possible to collect data like device or operating system?

  • Great article! Is there a solution for using this with Google Tag Manager?

  • Ennemis

    Hi Chris, we’ve had Downloadalytics installed and running for the past few weeks. It’s been working great. But we uploaded our second podcast episode last week, and it appears that Downloadalytics is still only reading info from our first episode. The cause doesn’t seem to be the file type. Any advice for a couple puzzled musicians? Thanks!