Google Analytics (server behind firewall and code snipet)
-
Hi
because my server can’t make connections to outside i can’t connect to my google analytics account.
Also the analytics code you have after the sucessfull connection, at least for us, isn’t complete.
Here an example of what we use:
<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’, ‘UA-XXXXXXX-X’, ‘auto’);
ga(‘require’, ‘displayfeatures’);
ga(‘set’, ‘campaignSource’, ‘Facebook Instant Article’);
ga(‘set’, ‘campaignMedium’, ‘social’);
ga(‘send’, ‘pageview’);</script>
I think you could add an alternative box where we could paste the analytics code we want to use. With this, the firewall problem and the custom analytics code is solved.
Thanks
The topic ‘Google Analytics (server behind firewall and code snipet)’ is closed to new replies.