Nest Google Analytics ID

This commit is contained in:
Oliver Davies 2019-04-23 02:36:03 +01:00
parent cb9d69a2b7
commit 631485e004
2 changed files with 3 additions and 2 deletions

View file

@ -3,4 +3,5 @@ imports:
- sculpin_site.yml
url: https://www.oliverdavies.uk
short_url: oliverdavies.uk
google_analytics_tracking_id: UA-11967257-1
google_analytics:
id: UA-11967257-1

View file

@ -25,7 +25,7 @@
{% block body %}{% endblock %}
</div>
{% if site.google_analytics_tracking_id %}
{% if site.google_analytics.id %}
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', '{{ site.google_analytics_tracking_id }}', 'auto'); ga('send', 'pageview');</script>
{% endif %}