Merge "add analytics event tracking for Design downloads, SDK downloads, Badges and Device art." into jb-dev-docs

This commit is contained in:
Scott Main
2012-10-03 16:23:00 -07:00
committed by Android (Google) Code Review
7 changed files with 38 additions and 16 deletions

View File

@@ -12,7 +12,8 @@ You can also download individual files listed below.</p>
<div class="layout-content-col span-4">
<p>
<a class="download-button" href="{@docRoot}downloads/design/Android_Design_Downloads_20120823.zip">Download All</a>
<a class="download-button" onClick="_gaq.push(['_trackEvent', 'Design', 'Download', 'All Design Assets']);"
href="{@docRoot}downloads/design/Android_Design_Downloads_20120823.zip">Download All</a>
</p>
</div>
@@ -37,10 +38,14 @@ available.</p>
<div class="layout-content-col span-4">
<p>
<a class="download-button" href="{@docRoot}downloads/design/Android_Design_Fireworks_Stencil_20120814.png">Adobe&reg; Fireworks&reg; PNG Stencil</a>
<a class="download-button" href="{@docRoot}downloads/design/Android_Design_Illustrator_Vectors_20120814.ai">Adobe&reg; Illustrator&reg; Stencil</a>
<a class="download-button" href="{@docRoot}downloads/design/Android_Design_OmniGraffle_Stencil_20120814.graffle">Omni&reg; OmniGraffle&reg; Stencil</a>
<a class="download-button" href="{@docRoot}downloads/design/Android_Design_Holo_Widgets_20120814.zip">Adobe&reg; Photoshop&reg; Sources</a>
<a class="download-button" onClick="_gaq.push(['_trackEvent', 'Design', 'Download', 'Fireworks Stencil']);"
href="{@docRoot}downloads/design/Android_Design_Fireworks_Stencil_20120814.png">Adobe&reg; Fireworks&reg; PNG Stencil</a>
<a class="download-button" onClick="_gaq.push(['_trackEvent', 'Design', 'Download', 'Illustrator Stencil']);"
href="{@docRoot}downloads/design/Android_Design_Illustrator_Vectors_20120814.ai">Adobe&reg; Illustrator&reg; Stencil</a>
<a class="download-button" onClick="_gaq.push(['_trackEvent', 'Design', 'Download', 'OmniGraffle Stencil']);"
href="{@docRoot}downloads/design/Android_Design_OmniGraffle_Stencil_20120814.graffle">Omni&reg; OmniGraffle&reg; Stencil</a>
<a class="download-button" onClick="_gaq.push(['_trackEvent', 'Design', 'Download', 'Photoshop Sources']);"
href="{@docRoot}downloads/design/Android_Design_Holo_Widgets_20120814.zip">Adobe&reg; Photoshop&reg; Sources</a>
</p>
</div>
@@ -66,7 +71,8 @@ modify to match your theme, plus source files.</p>
<div class="layout-content-col span-4">
<p>
<a class="download-button" href="{@docRoot}downloads/design/Android_Design_Icons_20120814.zip">Action Bar Icon Pack</a>
<a class="download-button" onClick="_gaq.push(['_trackEvent', 'Design', 'Download', 'Action Bar Icons']);"
href="{@docRoot}downloads/design/Android_Design_Icons_20120814.zip">Action Bar Icon Pack</a>
</p>
</div>
@@ -91,8 +97,10 @@ requirements of UI and high-resolution screens.</p>
<div class="layout-content-col span-4">
<p>
<a class="download-button" href="{@docRoot}downloads/design/Roboto_Hinted_20120823.zip">Roboto</a>
<a class="download-button" href="{@docRoot}downloads/design/Roboto_Specimen_Book_20111129.pdf">Specimen Book</a>
<a class="download-button" onClick="_gaq.push(['_trackEvent', 'Design', 'Download', 'Roboto ZIP']);"
href="{@docRoot}downloads/design/Roboto_Hinted_20120823.zip">Roboto</a>
<a class="download-button" onClick="_gaq.push(['_trackEvent', 'Design', 'Download', 'Roboto Specemin Book']);"
href="{@docRoot}downloads/design/Roboto_Specimen_Book_20111129.pdf">Specimen Book</a>
</p>
</div>
@@ -115,7 +123,8 @@ shade that can be used as a complement when needed.</p>
<div class="layout-content-col span-4">
<p>
<a class="download-button" href="{@docRoot}downloads/design/Android_Design_Color_Swatches_20120229.zip">Color Swatches</a>
<a class="download-button" onClick="_gaq.push(['_trackEvent', 'Design', 'Download', 'Color Swatches']);"
href="{@docRoot}downloads/design/Android_Design_Color_Swatches_20120229.zip">Color Swatches</a>
</p>
</div>

View File

@@ -293,7 +293,8 @@ files for further customization.
</p>
<p>
<a href="{@docRoot}downloads/design/Android_Design_Icons_20120814.zip">Download the Action Bar Icon Pack</a>
<a onClick="_gaq.push(['_trackEvent', 'Design', 'Download', 'Action Bar Icons (@actionbar page)']);"
href="{@docRoot}downloads/design/Android_Design_Icons_20120814.zip">Download the Action Bar Icon Pack</a>
</p>

View File

@@ -115,7 +115,8 @@ between visual components. Note that red and green may be indistinguishable to c
<p>Blue is the standard accent color in Android's color palette. Each color has a corresponding darker
shade that can be used as a complement when needed.</p>
<p><a href="{@docRoot}downloads/design/Android_Design_Color_Swatches_20120229.zip">Download the swatches</a></p>
<p><a onClick="_gaq.push(['_trackEvent', 'Design', 'Download', 'Color Swatches (@color page)']);"
href="{@docRoot}downloads/design/Android_Design_Color_Swatches_20120229.zip">Download the swatches</a></p>
<img src="{@docRoot}design/media/color_spectrum.png">

View File

@@ -110,7 +110,8 @@ files for further customization.
</p>
<p>
<a href="{@docRoot}downloads/design/Android_Design_Icons_20120814.zip">Download the Action Bar Icon Pack</a>
<a onClick="_gaq.push(['_trackEvent', 'Design', 'Download', 'Action Bar Icons (@iconography page)']);"
href="{@docRoot}downloads/design/Android_Design_Icons_20120814.zip">Download the Action Bar Icon Pack</a>
</p>

View File

@@ -18,8 +18,10 @@ italic weights by default.</p>
<img src="{@docRoot}design/media/typography_alphas.png">
<p><a href="{@docRoot}downloads/design/Roboto_Hinted_20120823.zip">Download Roboto</a></p>
<p><a href="{@docRoot}downloads/design/Roboto_Specimen_Book_20111129.pdf">Specimen Book</a></p>
<p><a onClick="_gaq.push(['_trackEvent', 'Design', 'Download', 'Roboto ZIP (@typography page)']);"
href="{@docRoot}downloads/design/Roboto_Hinted_20120823.zip">Download Roboto</a></p>
<p><a onClick="_gaq.push(['_trackEvent', 'Design', 'Download', 'Roboto Specimen Booke (@typography page)']);"
href="{@docRoot}downloads/design/Roboto_Specimen_Book_20111129.pdf">Specimen Book</a></p>
</div>
</div>

View File

@@ -88,6 +88,9 @@ function buildButton(form) {
$("#button-preview").html(linkStart + "apps/details?id=" + form["package"].value
+ imageStart + altText + imageSrc
+ selectedValue + imageEnd);
// Send the event to Analytics
_gaq.push(['_trackEvent', 'Distribute', 'Create Google Play Badge', 'Package ' + selectedValue]);
} else if (form["publisher"].value != "Example, Inc.") {
$("#preview").show();
$("#snippet").show().html(linkStartCode + "search?q=pub:" + form["publisher"].value
@@ -96,6 +99,9 @@ function buildButton(form) {
$("#button-preview").html(linkStart + "search?q=pub:" + form["publisher"].value
+ imageStart + altText + imageSrc
+ selectedValue + imageEnd);
// Send the event to Analytics
_gaq.push(['_trackEvent', 'Distribute', 'Create Google Play Badge', 'Publisher ' + selectedValue]);
} else {
alert("Please enter your package name or publisher name");
}
@@ -199,8 +205,8 @@ alt="Get it on Google Play (small)" /></label>
alt="Get it on Google Play (large)" /></label>
</div>
<input type="button" onclick="return buildButton(this.parentNode)" value="Build my badge"
style="padding:10px" />
<input onclick="return buildButton(this.parentNode);"
value="Build my badge" style="padding:10px" />
<br/>
</form>

View File

@@ -299,6 +299,8 @@ feature image or screenshots for your Google Play app listing.</p>
g_currentFilename = data.name;
g_currentImage = img;
createFrame();
// Send the event to Analytics
_gaq.push(['_trackEvent', 'Distribute', 'Create Device Art', g_currentDevice.title]);
});
});
});