-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix errors when only Google tracking code is provided
- Loading branch information
Ian Morland
committed
Jun 21, 2020
1 parent
57320e6
commit c1ab797
Showing
3 changed files
with
37 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!-- Google Optimise --> | ||
<!-- Page-hiding snippet (recommended) --> | ||
<style>.async-hide { opacity: 0 !important} </style> | ||
<script>(function(a,s,y,n,c,h,i,d,e){s.className+=' '+y;h.start=1*new Date; | ||
h.end=i=function(){s.className=s.className.replace(RegExp(' ?'+y),'')}; | ||
(a[n]=a[n]||[]).hide=h;setTimeout(function(){i();h.end=null},c);h.timeout=c; | ||
})(window,document.documentElement,'async-hide','dataLayer',2000, | ||
{'%%OPT_TRACKING_CODE%%':true});</script> | ||
<!-- Google Analytics with Optimize plugin --> | ||
<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', '%%TRACKING_CODE%%', 'auto'); | ||
ga('require', '%%OPT_TRACKING_CODE%%'); | ||
</script> | ||
<!-- End Google Optimise --> | ||
|
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