Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Analytics and GA4 – search results
This topic contains 5 replies, has 2 voices, and was last updated by Ernest Marcinko 1 year, 9 months ago.
- AuthorPosts
- June 3, 2021 at 11:24 am #33529
Hi,
We are having troubles tracking the search query’s into Google analytics GA4.
We are using Ajaxsearchpro on our client website, we’ve defined a custom string, calling it into analytics and testing in liveview but nothing happen. It seems that GA4 does not grab the data, do you have any solution to patch that ? Have u already heard about that problem ?
The GA script is called in the website header using the GDPR module called : https://tarteaucitron.io/fr/
We are using that solution on almost every projects, everything is fine with analytics at this time, we can catch the pageview and everything, except the search query’s.Thank you in advance for your help, i join 3 screenshots to this ticket. The Back-office configuration / the WP head integration / The string integrated into GA4.
Best.
FrédéricAttachments:
You must be logged in to view attached files.June 4, 2021 at 12:20 pm #33536Hi Frédéric,
I think I can only see one problem there, the
Best,baclesse_search
parameter is on the wrong line. It should be in theq,s,search,query,keyword
line.
In the current GA configuration it serves as a search category parameter, which works in combination with the search parameters, which is not happening ever. If you move it to the first line, it should start tracking over time.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
June 4, 2021 at 12:27 pm #33537Thank you for your reply Ernest,
I’ve already tried that approach and added it to the first line before, but i couldn’t track the data that way also unfortunately.
I’ll give it a new try and see what happen.
I should have some data displayed in the real time view in GA4.I’ll keep you up to date.
Thank you.
FredericJune 4, 2021 at 12:36 pm #33539I just checked the javascript console on your site. Neither the “ga” nor the “gtag” global google analytics tracking functions are defined unfortunately – which basically means the tracking code is not present. That module probably uses some sort of a built-in way of tracking, or is hard coded somewhere, I uses a different internal method for tracking.
Best,
If you place the native GA tracking code to the site, it will work for sure.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
June 4, 2021 at 12:38 pm #33540You have to accept the cookies to get the GA ready.
You have a cookie banner on the bottom of your window (accept /deny / parameters) in french 😉 j’accepte.Frédéric
June 4, 2021 at 12:42 pm #33541Thank you!
I already did, but there the variables/functions are still missing from the global scope, as if the tracker is not defined.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.