V
V
vvvadimos2016-08-26 15:43:31
Google Analytics
vvvadimos, 2016-08-26 15:43:31

Why is the click statistics not displayed in Google Analytics in part of the site on Wordpress?

There is a website, there are regular pages, there is a blog, a blog on Wordpress. On the part of the site that is not on WordPress, the buttons have such codes, for example: onclick="ga('send', 'event', 'button', 'click', 'test-click')". After clicking on such a button, click statistics in Google Analytics are immediately displayed, but if such a code is written on a button on a blog, then nothing is displayed. All files and scripts on the two parts of the site are the same, located in the same place. But the blog is like this. Unfortunately, I can't provide a link to the site.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor Vorotnev, 2016-08-26
@vvvadimos

In order for onclick events for GA and tracking to work, the GA javascript library must be included in the document. On the regular part of the site, you have it, but on the WordPress part, you don’t have it, which is why it doesn’t process tracking. Connect the plugin or manually the script itself via wp_enqueue_script(). How to do this - google, the network is full of materials, including instructions on the Google Analytics website.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question