-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generalize analytics support in default theme
As the number of privacy-preserving analytics options proliferates, it no longer makes sense to support specific solutions provided by ad-tracking corporations.
- Loading branch information
1 parent
5435dd0
commit 639173d
Showing
4 changed files
with
13 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,3 @@ | ||
{% if GOOGLE_ANALYTICS %} | ||
<script type="text/javascript"> | ||
(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', '{{GOOGLE_ANALYTICS}}', '{{GA_COOKIE_DOMAIN if GA_COOKIE_DOMAIN else 'auto'}}'); | ||
ga('send', 'pageview'); | ||
</script> | ||
{% endif %} | ||
{% if GAUGES %} | ||
<script type="text/javascript"> | ||
var _gauges = _gauges || []; | ||
(function() { | ||
var t = document.createElement('script'); | ||
t.type = 'text/javascript'; | ||
t.async = true; | ||
t.id = 'gauges-tracker'; | ||
t.setAttribute('data-site-id', '{{GAUGES}}'); | ||
t.src = '//secure.gaug.es/track.js'; | ||
var s = document.getElementsByTagName('script')[0]; | ||
s.parentNode.insertBefore(t, s); | ||
})(); | ||
</script> | ||
{% if ANALYTICS %} | ||
{{ ANALYTICS }} | ||
{% endif %} |
This file was deleted.
Oops, something went wrong.