Skip Navigation

[Resolved] Is there a way to track views search filter queries for statistics/analysis?

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 8.98 hours from now. Thank you for your understanding.

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by Kristin 6 years, 5 months ago.

Assigned support staff: Caridad.

Author
Posts
#290051

Hi there,

Is there any way to track queries that are produced using Views' search/filter functionality. Say I have a view with 3 filters: Size, Shape, Color.

I need a way to record what combinations and frequencies users are searching on the front-end using each of those filters. Any specific methods/hooks/filters you know of that I can use?

Thanks!

#290125

You should be able to use Google Analytics "Event tracking".
hidden link

You can call the _trackEvent function with Javascript to send the values searched for.

Please let me know if you are satisfied with my reply and any other questions you may have.

Regards,
Caridad

#293176

Right, I'm well aware of Google Event Tracking, however we need a native WP solution.

I'm imagining we could just hook into the

wpv_filter_query

filter and checking for any custom tax/meta queries, right? Is there a better way to access the parametric filter criteria more directly?