diff options
author | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2014-11-11 19:59:33 +0100 |
---|---|---|
committer | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2014-11-11 19:59:33 +0100 |
commit | f4110cb83acdc2ab09b379ca57207e52b06efa63 (patch) | |
tree | 7965e9e744b3f9197456496eae9441f35da929ca | |
parent | bcdd458a348bb889878e56d6bdb82b1a67c4bcd4 (diff) |
Add GA tracking for downloads
-rw-r--r-- | _includes/footer.html | 4 | ||||
-rw-r--r-- | _includes/header.html | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/_includes/footer.html b/_includes/footer.html index ecffab0..f11b3e4 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -32,6 +32,10 @@ ga('create', 'UA-954596-3', 'auto'); ga('send', 'pageview'); + + function trackDownload(name) { + ga('send', 'event', 'download', 'click', name); + } </script> </body> </html> diff --git a/_includes/header.html b/_includes/header.html index e1d34e1..267cf95 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -27,9 +27,9 @@ Downloads: <ul> - <li><a href="http://github.com/zeux/pugixml/releases/download/v{{site.version}}/pugixml-{{site.version}}.zip">pugixml-{{site.version}}.zip</a><br/> + <li><a href="http://github.com/zeux/pugixml/releases/download/v{{site.version}}/pugixml-{{site.version}}.zip" onclick="trackDownload('pugixml-{{site.version}}.zip')">pugixml-{{site.version}}.zip</a><br/> <small>398 Kb, Windows line endings</small></li> - <li><a href="http://github.com/zeux/pugixml/releases/download/v{{site.version}}/pugixml-{{site.version}}.tar.gz">pugixml-{{site.version}}.tar.gz</a><br/> + <li><a href="http://github.com/zeux/pugixml/releases/download/v{{site.version}}/pugixml-{{site.version}}.tar.gz" onclick="trackDownload('pugixml-{{site.version}}.tar.gz')">pugixml-{{site.version}}.tar.gz</a><br/> <small>369 Kb, Unix line endings</small></li> </ul> |