Skip to content

Commit

Permalink
Support for longer tracking scripts
Browse files Browse the repository at this point in the history
Instead of a Google Analytics tracking code, you can now add an entire optional tracking mechanism
  • Loading branch information
nfreader committed Mar 14, 2019
1 parent a61b087 commit cbe9b38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -8,3 +8,4 @@ src/conf/alert.html*
src/conf/candidates.json
composer.lock
/.db
/templates/tracker.html
13 changes: 1 addition & 12 deletions templates/base/index.html
Expand Up @@ -8,18 +8,7 @@
{% for k, v in ogdata %}
<meta property="og:{{k}}" content="{{v}}" />
{% endfor %}
{% if statbus.UA %}
<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','https://www.google-analytics.com/analytics.js','ga');

ga('create', '{{statbus.UA}}', 'auto');
ga('send', 'pageview');

</script>
{% endif %}
{% include 'base/tracker.html' ignore missing %}
<style>
/* Move down content because we have a fixed navbar that is 3.5rem tall */
body {
Expand Down

0 comments on commit cbe9b38

Please sign in to comment.