update the analytics tracking event calls to use new API for analytics.js

bug: 16331906

Change-Id: I015b5aae825525822ca767d293b473f9f332961a
This commit is contained in:
smain@google.com
2014-10-03 15:49:45 -07:00
parent 9a818f55f4
commit 633f322b38
4 changed files with 7 additions and 7 deletions

View File

@@ -1642,8 +1642,8 @@ var gDocsListLength = 0;
function onSuggestionClick(link) { function onSuggestionClick(link) {
// When user clicks a suggested document, track it // When user clicks a suggested document, track it
_gaq.push(['_trackEvent', 'Suggestion Click', 'clicked: ' + $(link).text(), ga('send', 'event', 'Suggestion Click', 'clicked: ' + $(link).text(),
'from: ' + $("#search_autocomplete").val()]); 'from: ' + $("#search_autocomplete").val());
} }
function set_item_selected($li, selected) function set_item_selected($li, selected)
@@ -2610,8 +2610,8 @@ function addResultClickListeners() {
$("#searchResults a.gs-title").each(function(index, link) { $("#searchResults a.gs-title").each(function(index, link) {
// When user clicks enter for Google search results, track it // When user clicks enter for Google search results, track it
$(link).click(function() { $(link).click(function() {
_gaq.push(['_trackEvent', 'Google Click', 'clicked: ' + $(this).text(), ga('send', 'event', 'Google Click', 'clicked: ' + $(this).text(),
'from: ' + $("#search_autocomplete").val()]); 'from: ' + $("#search_autocomplete").val());
}); });
}); });
} }

View File

@@ -18,7 +18,7 @@
<a href="<?cs var:toroot ?>samples/<?cs var:projectDir ?>/index.html">Overview</a> <a href="<?cs var:toroot ?>samples/<?cs var:projectDir ?>/index.html">Overview</a>
&#124; <a href="<?cs var:toroot ?>samples/<?cs var:projectDir ?>/project.html">Project</a> &#124; <a href="<?cs var:toroot ?>samples/<?cs var:projectDir ?>/project.html">Project</a>
&#124; <a href="<?cs var:toroot ?>downloads/samples/<?cs var:projectDir ?>.zip" &#124; <a href="<?cs var:toroot ?>downloads/samples/<?cs var:projectDir ?>.zip"
onclick="_gaq.push(['_trackEvent', 'Samples', 'Download', <?cs var:projectDir ?>]);" onclick="ga('send', 'event', 'Samples', 'Download', <?cs var:projectDir ?>);"
>Download</a> >Download</a>
</div><!-- end sum-details-links --> </div><!-- end sum-details-links -->

View File

@@ -21,7 +21,7 @@
&#124; <a href="<?cs var:toroot ?>samples/<?cs var:projectDir ?>/project.html">Project</a> &#124; <a href="<?cs var:toroot ?>samples/<?cs var:projectDir ?>/project.html">Project</a>
<?cs /if ?> <?cs /if ?>
&#124; <a href="<?cs var:toroot ?>downloads/samples/<?cs var:projectDir ?>.zip" &#124; <a href="<?cs var:toroot ?>downloads/samples/<?cs var:projectDir ?>.zip"
onclick="_gaq.push(['_trackEvent', 'Samples', 'Download', <?cs var:projectDir ?>]);" onclick="ga('send', 'event', 'Samples', 'Download', <?cs var:projectDir ?>);"
>Download</a> >Download</a>
</div><!-- end sum-details-links --> </div><!-- end sum-details-links -->

View File

@@ -622,7 +622,7 @@ var:sdk.linux_download
} }
}, 500); }, 500);
}); });
_gaq.push(['_trackEvent', 'SDK', 'ADT and Tools', $("#downloadForRealz").html()]); ga('send', 'event', 'SDK', 'IDE and Tools', $("#downloadForRealz").html());
return true; return true;
} else { } else {
$("label#agreeLabel,#bitpicker input").parent().stop().animate({color: "#258AAF"}, 200, $("label#agreeLabel,#bitpicker input").parent().stop().animate({color: "#258AAF"}, 200,