Add google analytics events

This commit is contained in:
Cole Bemis 2017-05-02 22:56:14 -07:00
parent fbd59fb925
commit fa1d0d897d
2 changed files with 22 additions and 3 deletions

View File

@ -5,8 +5,20 @@
<p class="description">Simply beautiful open source icons</p> <p class="description">Simply beautiful open source icons</p>
</div> </div>
<div class="header-button-group"> <div class="header-button-group">
<a class="button button-primary" href="feather-{{ site.data.package.version }}.zip" download>Download</a> <a
<a class="button button-secondary" href="https://twitter.com/intent/tweet?text=Feather%20-%20Simply%20beautiful%20open%20source%20icons%20by%20%40colebemis%20colebemis.github.io/feather" target="_blank">Tweet</a> class="button button-primary"
href="feather-{{ site.data.package.version }}.zip"
download
onclick="ga('send', 'event', 'download', 'click', 'all');">
Download
</a>
<a
class="button button-secondary"
href="https://twitter.com/intent/tweet?text=Feather%20-%20Simply%20beautiful%20open%20source%20icons%20by%20%40colebemis%20colebemis.github.io/feather"
target="_blank"
onclick="ga('send', 'event', 'share', 'click', 'twitter');">
Tweet
</a>
</div> </div>
</div> </div>
</header> </header>

View File

@ -7,7 +7,14 @@
<div class="tooltip"> <div class="tooltip">
<p class="tooltip-icon-name">{{ icon }}</p> <p class="tooltip-icon-name">{{ icon }}</p>
<!-- TODO: remove tabindex="-1" --> <!-- TODO: remove tabindex="-1" -->
<a class="tooltip-download" href="{{ icon_path }}" download tabindex="-1">Download</a> <a
class="tooltip-download"
href="{{ icon_path }}"
download
tabindex="-1"
onclick="ga('send', 'event', 'download', 'click', '{{ icon }}');">
Download
</a>
</div> </div>
</div> </div>
{% endfor %} {% endfor %}