1
0
mirror of https://github.com/ryanoasis/nerd-fonts.git synced 2024-12-19 20:12:52 +02:00
nerd-fonts/_includes/analytics.html
Ryan L McIntyre a0a73c77ee Styling tweaks to home and downloads pages + JS improvements
* improves download page links and adds other download/install options
* adds some more styling to home page to be a bit more striking
* removes reliance on jQuery and rewrites most of the JavaScript
* misc formatting fixes
2019-08-01 23:57:41 -07:00

27 lines
979 B
HTML
Executable File

{% if jekyll.environment == "production" %}
{% if site.google_analytics_key %}
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics_key }}"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '{{ site.google_analytics_key }}']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '{{ site.google_analytics_key }}');
</script>
{% endif %}
{% else %}
<script>
function gtag() { console.log('noop'); }
</script>
{% endif %}