Skip to content

Commit f15f8a1

Browse files
scottamainAndroid (Google) Code Review
authored andcommitted
Merge "add analytics event tracking for Design downloads, SDK downloads, Badges and Device art." into jb-dev-docs
2 parents d2e9486 + fe3057f commit f15f8a1

File tree

7 files changed

+38
-16
lines changed

7 files changed

+38
-16
lines changed

docs/html/design/downloads/index.jd

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ You can also download individual files listed below.</p>
1212
<div class="layout-content-col span-4">
1313

1414
<p>
15-
<a class="download-button" href="{@docRoot}downloads/design/Android_Design_Downloads_20120823.zip">Download All</a>
15+
<a class="download-button" onClick="_gaq.push(['_trackEvent', 'Design', 'Download', 'All Design Assets']);"
16+
href="{@docRoot}downloads/design/Android_Design_Downloads_20120823.zip">Download All</a>
1617
</p>
1718

1819
</div>
@@ -37,10 +38,14 @@ available.</p>
3738
<div class="layout-content-col span-4">
3839

3940
<p>
40-
<a class="download-button" href="{@docRoot}downloads/design/Android_Design_Fireworks_Stencil_20120814.png">Adobe&reg; Fireworks&reg; PNG Stencil</a>
41-
<a class="download-button" href="{@docRoot}downloads/design/Android_Design_Illustrator_Vectors_20120814.ai">Adobe&reg; Illustrator&reg; Stencil</a>
42-
<a class="download-button" href="{@docRoot}downloads/design/Android_Design_OmniGraffle_Stencil_20120814.graffle">Omni&reg; OmniGraffle&reg; Stencil</a>
43-
<a class="download-button" href="{@docRoot}downloads/design/Android_Design_Holo_Widgets_20120814.zip">Adobe&reg; Photoshop&reg; Sources</a>
41+
<a class="download-button" onClick="_gaq.push(['_trackEvent', 'Design', 'Download', 'Fireworks Stencil']);"
42+
href="{@docRoot}downloads/design/Android_Design_Fireworks_Stencil_20120814.png">Adobe&reg; Fireworks&reg; PNG Stencil</a>
43+
<a class="download-button" onClick="_gaq.push(['_trackEvent', 'Design', 'Download', 'Illustrator Stencil']);"
44+
href="{@docRoot}downloads/design/Android_Design_Illustrator_Vectors_20120814.ai">Adobe&reg; Illustrator&reg; Stencil</a>
45+
<a class="download-button" onClick="_gaq.push(['_trackEvent', 'Design', 'Download', 'OmniGraffle Stencil']);"
46+
href="{@docRoot}downloads/design/Android_Design_OmniGraffle_Stencil_20120814.graffle">Omni&reg; OmniGraffle&reg; Stencil</a>
47+
<a class="download-button" onClick="_gaq.push(['_trackEvent', 'Design', 'Download', 'Photoshop Sources']);"
48+
href="{@docRoot}downloads/design/Android_Design_Holo_Widgets_20120814.zip">Adobe&reg; Photoshop&reg; Sources</a>
4449
</p>
4550

4651
</div>
@@ -66,7 +71,8 @@ modify to match your theme, plus source files.</p>
6671
<div class="layout-content-col span-4">
6772

6873
<p>
69-
<a class="download-button" href="{@docRoot}downloads/design/Android_Design_Icons_20120814.zip">Action Bar Icon Pack</a>
74+
<a class="download-button" onClick="_gaq.push(['_trackEvent', 'Design', 'Download', 'Action Bar Icons']);"
75+
href="{@docRoot}downloads/design/Android_Design_Icons_20120814.zip">Action Bar Icon Pack</a>
7076
</p>
7177

7278
</div>
@@ -91,8 +97,10 @@ requirements of UI and high-resolution screens.</p>
9197
<div class="layout-content-col span-4">
9298

9399
<p>
94-
<a class="download-button" href="{@docRoot}downloads/design/Roboto_Hinted_20120823.zip">Roboto</a>
95-
<a class="download-button" href="{@docRoot}downloads/design/Roboto_Specimen_Book_20111129.pdf">Specimen Book</a>
100+
<a class="download-button" onClick="_gaq.push(['_trackEvent', 'Design', 'Download', 'Roboto ZIP']);"
101+
href="{@docRoot}downloads/design/Roboto_Hinted_20120823.zip">Roboto</a>
102+
<a class="download-button" onClick="_gaq.push(['_trackEvent', 'Design', 'Download', 'Roboto Specemin Book']);"
103+
href="{@docRoot}downloads/design/Roboto_Specimen_Book_20111129.pdf">Specimen Book</a>
96104
</p>
97105

98106
</div>
@@ -115,7 +123,8 @@ shade that can be used as a complement when needed.</p>
115123
<div class="layout-content-col span-4">
116124

117125
<p>
118-
<a class="download-button" href="{@docRoot}downloads/design/Android_Design_Color_Swatches_20120229.zip">Color Swatches</a>
126+
<a class="download-button" onClick="_gaq.push(['_trackEvent', 'Design', 'Download', 'Color Swatches']);"
127+
href="{@docRoot}downloads/design/Android_Design_Color_Swatches_20120229.zip">Color Swatches</a>
119128
</p>
120129

121130
</div>

docs/html/design/patterns/actionbar.jd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,8 @@ files for further customization.
293293
</p>
294294
<p>
295295

296-
<a href="{@docRoot}downloads/design/Android_Design_Icons_20120814.zip">Download the Action Bar Icon Pack</a>
296+
<a onClick="_gaq.push(['_trackEvent', 'Design', 'Download', 'Action Bar Icons (@actionbar page)']);"
297+
href="{@docRoot}downloads/design/Android_Design_Icons_20120814.zip">Download the Action Bar Icon Pack</a>
297298

298299
</p>
299300

docs/html/design/style/color.jd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ between visual components. Note that red and green may be indistinguishable to c
115115

116116
<p>Blue is the standard accent color in Android's color palette. Each color has a corresponding darker
117117
shade that can be used as a complement when needed.</p>
118-
<p><a href="{@docRoot}downloads/design/Android_Design_Color_Swatches_20120229.zip">Download the swatches</a></p>
118+
<p><a onClick="_gaq.push(['_trackEvent', 'Design', 'Download', 'Color Swatches (@color page)']);"
119+
href="{@docRoot}downloads/design/Android_Design_Color_Swatches_20120229.zip">Download the swatches</a></p>
119120

120121
<img src="{@docRoot}design/media/color_spectrum.png">
121122

docs/html/design/style/iconography.jd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ files for further customization.
110110
</p>
111111
<p>
112112

113-
<a href="{@docRoot}downloads/design/Android_Design_Icons_20120814.zip">Download the Action Bar Icon Pack</a>
113+
<a onClick="_gaq.push(['_trackEvent', 'Design', 'Download', 'Action Bar Icons (@iconography page)']);"
114+
href="{@docRoot}downloads/design/Android_Design_Icons_20120814.zip">Download the Action Bar Icon Pack</a>
114115

115116
</p>
116117

docs/html/design/style/typography.jd

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ italic weights by default.</p>
1818

1919
<img src="{@docRoot}design/media/typography_alphas.png">
2020

21-
<p><a href="{@docRoot}downloads/design/Roboto_Hinted_20120823.zip">Download Roboto</a></p>
22-
<p><a href="{@docRoot}downloads/design/Roboto_Specimen_Book_20111129.pdf">Specimen Book</a></p>
21+
<p><a onClick="_gaq.push(['_trackEvent', 'Design', 'Download', 'Roboto ZIP (@typography page)']);"
22+
href="{@docRoot}downloads/design/Roboto_Hinted_20120823.zip">Download Roboto</a></p>
23+
<p><a onClick="_gaq.push(['_trackEvent', 'Design', 'Download', 'Roboto Specimen Booke (@typography page)']);"
24+
href="{@docRoot}downloads/design/Roboto_Specimen_Book_20111129.pdf">Specimen Book</a></p>
2325

2426
</div>
2527
</div>

docs/html/distribute/googleplay/promote/badges.jd

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ function buildButton(form) {
8888
$("#button-preview").html(linkStart + "apps/details?id=" + form["package"].value
8989
+ imageStart + altText + imageSrc
9090
+ selectedValue + imageEnd);
91+
92+
// Send the event to Analytics
93+
_gaq.push(['_trackEvent', 'Distribute', 'Create Google Play Badge', 'Package ' + selectedValue]);
9194
} else if (form["publisher"].value != "Example, Inc.") {
9295
$("#preview").show();
9396
$("#snippet").show().html(linkStartCode + "search?q=pub:" + form["publisher"].value
@@ -96,6 +99,9 @@ function buildButton(form) {
9699
$("#button-preview").html(linkStart + "search?q=pub:" + form["publisher"].value
97100
+ imageStart + altText + imageSrc
98101
+ selectedValue + imageEnd);
102+
103+
// Send the event to Analytics
104+
_gaq.push(['_trackEvent', 'Distribute', 'Create Google Play Badge', 'Publisher ' + selectedValue]);
99105
} else {
100106
alert("Please enter your package name or publisher name");
101107
}
@@ -199,8 +205,8 @@ alt="Get it on Google Play (small)" /></label>
199205
alt="Get it on Google Play (large)" /></label>
200206
</div>
201207

202-
<input type="button" onclick="return buildButton(this.parentNode)" value="Build my badge"
203-
style="padding:10px" />
208+
<input onclick="return buildButton(this.parentNode);"
209+
value="Build my badge" style="padding:10px" />
204210
<br/>
205211
</form>
206212

docs/html/distribute/promote/device-art.jd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,8 @@ feature image or screenshots for your Google Play app listing.</p>
299299
g_currentFilename = data.name;
300300
g_currentImage = img;
301301
createFrame();
302+
// Send the event to Analytics
303+
_gaq.push(['_trackEvent', 'Distribute', 'Create Device Art', g_currentDevice.title]);
302304
});
303305
});
304306
});

0 commit comments

Comments
 (0)