I have a WordPress plugin in which I am going to run advertising campaigns, and I would like to send users directly to the plugin directory page , but I need to register traffic so that it displays in my Google Analytics.
I am trying to create a small βaverage personβ script I can use for this, but I am struggling to find a working solution out of all the potential that I find.
I am using the new Google Analytics tracking code:
<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-2xxxx3-1', 'angelleye.com');
ga('send', 'pageview');
</script>
From what I read, I need to add javascript redirects to it, but the delay is 1 or 2 seconds, so that Google Analytics has time to track before the redirect occurs. I'm not good enough with javascript to do this, I think.
Any information would be greatly appreciated. Thank!
source
share