Implementing Google Analytics BACKEND
-
[ Moderator note: moved to Fixing WordPress. Please do not use Developing with WordPress for these topics. ]
Hi,
I would like to implement Google Analytics on my wordpress site and want to exclude all internal traffic, to do this I need to add a Google Analytics code to a page that only internal users visit. So every user that visit that particular page won’t be counted in Google Analytics.
So the best spot to add this would be according to me the “Dashboard” of WordPress.
Can somebody give me an idea where and how I could add this and if this addin would be lost if it update WordPress?The code would look something like this:
<!– Google Analytics –>
<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-XXXXX-Y’, ‘auto’);
ga(‘send’, ‘pageview’, {
‘dimension1’: ‘internal’
});
</script>
<!– End Google Analytics –>Thanks for the help!
- The topic ‘Implementing Google Analytics BACKEND’ is closed to new replies.