]> git.ipfire.org Git - thirdparty/foundation/foundation-emails.git/commitdiff
Add tracking code for download events
authorEric Morris <eric@zurb.com>
Thu, 7 Nov 2013 04:44:05 +0000 (20:44 -0800)
committerEric Morris <eric@zurb.com>
Thu, 7 Nov 2013 04:44:05 +0000 (20:44 -0800)
download.php
templates.php

index 9e8e04083d84e830b9b88c5e22f85390020cba10..f59c342b43f78a3848387a02b3ba4c4315988372 100644 (file)
@@ -3,6 +3,10 @@
 <?php include 'includes/_header.php' ?>
 <?php include 'includes/_top-bar.php' ?>
 
+<script>
+  _gaq.push(['_trackEvent', 'Ink', 'Download', '<?php echo $download_file; ?>']);
+</script>
+
 <section class="top-area main downloading">
   <div class="row">
     <div class="large-12 columns">
index 6500b4d576144b2314af8e317966236a41d51cf2..dd507d74526f0390d98cc151ef52cee0c045e1a4 100644 (file)
@@ -40,7 +40,7 @@
 <div class="row">
   <div class="small-12 columns">
     <h5 class="normal">You can download all of the templates in one file here:</h6>
-    <a href="downloads/templates/all-templates.zip" class="button primary">All Ink Templates</a>
+    <a href="downloads/templates/all-templates.zip" class="button primary" onClick="_gaq.push(['_trackEvent', 'Ink', 'Download', 'templates/all.zip']);">All Ink Templates</a>
     <br><br>
     <ul class="large-block-grid-3 small-block-grid-1 template-thumbs">
       <li>
@@ -49,7 +49,7 @@
           <span class="name">Basic</span>
           <span class="description">This template is perfect for sending a basic but nice looking email to your readers.</span>
         </a>
-        <a href="downloads/templates/basic.html.zip" class="button primary">Download</a>
+        <a href="downloads/templates/basic.html.zip" class="button primary" onClick="_gaq.push(['_trackEvent', 'Ink', 'Download', 'templates/basic.html.zip']);">Download</a>
         <a href="downloads/templates/basic.html" class="button secondary" target="_blank">Preview</a>
       </li>
       <li>
@@ -58,7 +58,7 @@
           <span class="name">Hero</span>
           <span class="description">Want to include a snazzy hero image in your email? This template is for you!</span>
         </a>
-        <a href="downloads/templates/hero.html.zip" class="button primary">Download</a>
+        <a href="downloads/templates/hero.html.zip" class="button primary" onClick="_gaq.push(['_trackEvent', 'Ink', 'Download', 'templates/hero.html.zip']);">Download</a>
         <a href="downloads/templates/hero.html" class="button secondary" target="_blank">Preview</a>
       </li>
       <li>
@@ -67,7 +67,7 @@
           <span class="name">Sidebar</span>
           <span class="description">This template includes a sidebar area for a list of links, perfect for linking to additional content.</span>
         </a>
-        <a href="downloads/templates/sidebar.html.zip" class="button primary">Download</a>
+        <a href="downloads/templates/sidebar.html.zip" class="button primary" onClick="_gaq.push(['_trackEvent', 'Ink', 'Download', 'templates/sidebar.html.zip']);">Download</a>
         <a href="downloads/templates/sidebar.html" class="button secondary" target="_blank">Preview</a>
       </li>
       <li>
@@ -76,7 +76,7 @@
           <span class="name">Sidebar Hero</span>
           <span class="description">Want a sidebar and a hero image? Let's go crazy! This template combines the Sidebar and Hero templates.</span>
         </a>
-        <a href="downloads/templates/sidebar-hero.html.zip" class="button primary">Download</a>
+        <a href="downloads/templates/sidebar-hero.html.zip" class="button primary" onClick="_gaq.push(['_trackEvent', 'Ink', 'Download', 'templates/sidebar-hero.html.zip']);">Download</a>
         <a href="downloads/templates/sidebar-hero.html" class="button secondary" target="_blank">Preview</a>
       </li>
       <li>
@@ -85,7 +85,7 @@
           <span class="name">Newsletter</span>
           <span class="description">This template is perfect for a point-by-point newsletter. For good measure, we've thrown in a hero image, too.</span>
         </a>
-        <a href="downloads/templates/newsletter.html.zip" class="button primary">Download</a>
+        <a href="downloads/templates/newsletter.html.zip" class="button primary" onClick="_gaq.push(['_trackEvent', 'Ink', 'Download', 'templates/newsletter.html.zip']);">Download</a>
         <a href="downloads/templates/newsletter.html" class="button secondary" target="_blank">Preview</a>
       </li>
     </ul>