This topic contains 4 replies, has 2 voices, and was last updated by
- March 3, 2020 at 1:26 am #26088
How can I use Google Tag Manager to track Ajax searches in Google Analytics?
The documentation describes how to use a Google Analytics script (outside of Google Tag Manager) to track ajax searches in Google Analytics. I was successfully using those instructions and getting search data logged as pageviews in Google Analytics.
Here’s the code snippet that was working fine….
ga(‘create’, ‘UA-12345678-9’, ‘auto’);
Then I switched all my scripts over to using Google Tag Manager instead of directly embedding them in the <head> section of the site.
So Google Analytics is now using Google Tag Manager to do all its tracking, instead of a script directly embedded in the site’s <head> section.
If I continue to use the code snippet (above) I would be “going around” Google Tag Manager rather that allowing Google Tag Manager to manage this script.
How can I capture Ajax search terms as pageviews, but through Google Tag Manager rather than through a separate script embedded in the <head> section of the site?
Thanks.March 3, 2020 at 10:40 am #26096Keymaster
At the moment this is not possible, but the good new is, that version 4.18 is finishing the testing phrase on our demo site – which supports the GTAG integration method, and implement a more advanced events tracking feature, which looks like this, and results in this.
This will be released within 3 days or sooner, all tests seem to be very promising. If it is okay for you, I suggest waiting for that, then you don’t need any duplicate code segments, the plugin should handle everything natively.Best,
If you like my products, don't forget to rate them on codecanyon :)
March 3, 2020 at 3:44 pm #26116
Nice! Looks promising. I’ll stay tuned for the release. Thanks.March 5, 2020 at 7:46 pm #26152
Hey, I just noticed a new version (4.18) has been released. But when I click “update” I get an error message: “Update Failed: Plugin update failed.” I have the file from CodeCanyon if that helps. Does this release have the Google Tag Manager fix? And if so, how can I update to it? Thanks.March 6, 2020 at 10:01 am #26160
You must be logged in to reply to this topic.