Mobile app version of vmapp.org
Login or Join
Cugini213

: Ga() call doesn't affect goal flow Using Wordpress, I included the following in header.php: <head> ... <!-- Google Analytics --> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){

@Cugini213

Posted in: #GoogleAnalytics

Using Wordpress, I included the following in header.php:

<head>
...
<!-- 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','https://www.google-analytics.com/analytics.js','ga');

ga('create', '(my tracking code)', 'auto');
ga('send', 'pageview');
</script>
<!-- End Google Analytics -->
</head>


Created a goal in google analytics:


And added the following to a button:

<a .. onClick="ga('send', 'event', 'category', 'action');" .. >


When I visit the site and click the button, I see that one user is connected ('Users right now' = 1) but no change in goal flow:

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Cugini213

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme