Reputation: 11
I want to track my searches on my website, so I have set up tracking in google analytics.
It started to track queries perfectly as I set up “s” as a query parameter.
However, tracking is happening to people who have clicked on the search button which takes you to the search result page.
Example: https://keralagardens.buzz/?s=rose&post_type=product&product_cat=0
But for me, I want to track ajax search also, so could you please tell me the query parameter for Google analytics tracking?
Ajax request format https://keralagardens.buzz/wp-admin/admin-ajax.php?action=woodmart_ajax_search&number=20&post_type=product&product_cat=0&query=rosee
Thanks
Upvotes: 1
Views: 281
Reputation: 14189
You have to send a virtual pageview to Google Analytics each time you show ajax result:
Upvotes: 1