mirror of
https://github.com/bigchaindb/site.git
synced 2024-11-25 03:03:16 +01:00
add some custom GA events, closes #17
This commit is contained in:
parent
02041493e3
commit
9b2b77a3c5
@ -1,7 +1,7 @@
|
||||
//
|
||||
// Google Analytics
|
||||
//
|
||||
var GoogleAnalytics = (function(w,d) {
|
||||
var GoogleAnalytics = (function(w,d,$) {
|
||||
|
||||
var app, _private;
|
||||
|
||||
@ -14,6 +14,16 @@ var GoogleAnalytics = (function(w,d) {
|
||||
// jQuery('.js-tracking-').on('click', function() {
|
||||
// ga('send', 'event', [eventCategory], [eventAction], [eventLabel]);
|
||||
// });
|
||||
|
||||
// Menu clicks
|
||||
$('.js-tracking-menu').on('click', function() {
|
||||
ga('send', 'event', 'menu_click', 'link_click', 'text_link', true);
|
||||
});
|
||||
|
||||
// Terminal interaction
|
||||
$('.js-tracking-terminal').on('click', function() {
|
||||
ga('send', 'event', 'terminal', 'terminal_click', 'selection', true);
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
@ -100,4 +110,4 @@ var GoogleAnalytics = (function(w,d) {
|
||||
|
||||
return app;
|
||||
|
||||
})(window, document);
|
||||
})(window, document, jQuery);
|
||||
|
@ -9,7 +9,7 @@
|
||||
{% assign active = 'active' %}
|
||||
{% endif %}
|
||||
|
||||
<a class="menu__link {{ active }}" href="{{ link.url }}">{{ link.title }}</a>
|
||||
<a class="menu__link {{ active }} js-tracking-menu" href="{{ link.url }}">{{ link.title }}</a>
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
@ -22,7 +22,7 @@
|
||||
{% assign active = 'active' %}
|
||||
{% endif %}
|
||||
|
||||
<a class="menu__link {{ active }}" href="{{ link.url }}">{{ link.title }}</a>
|
||||
<a class="menu__link {{ active }} js-tracking-menu" href="{{ link.url }}">{{ link.title }}</a>
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
@ -20,7 +20,7 @@
|
||||
{% assign active = 'active' %}
|
||||
{% endif %}
|
||||
|
||||
<a class="menu__link {{ active }}" href="{{ link.url }}">{{ link.title }}</a>
|
||||
<a class="menu__link {{ active }} js-tracking-menu" href="{{ link.url }}">{{ link.title }}</a>
|
||||
|
||||
{% endfor %}
|
||||
|
||||
|
@ -73,7 +73,7 @@ js: page-front.min.js
|
||||
<p><a href="https://bigchaindb.readthedocs.org/">Read documentation</a> | <a href="https://github.com/BigchainDB/bigchaindb"><svg class="icon icon--social icon--github"><use xlink:href="/assets/img/sprite.svg#github"></use></svg> GitHub</a></p>
|
||||
</div>
|
||||
<div class="grid__col">
|
||||
<figure class="terminal highlight">
|
||||
<figure class="terminal highlight js-tracking-terminal">
|
||||
<code>
|
||||
<span class="comment"># install bigchaindb</span>
|
||||
<span><span class="ne">pip</span> install <span class="cp">bigchaindb</span></span><br/>
|
||||
|
Loading…
Reference in New Issue
Block a user