Hi,
we´ve implemented a custom search at a view. Is it possible somehow to track the selected search parameters by Google Analytics?
I´ve found these threads, but I wonder, if I can use the ajax method?
https://toolset.com/forums/topic/track-ajax-custom-search-with-google-analytics/
or is it not possible by now:
https://toolset.com/forums/topic/tracking-of-toolset-views-search-in-google-analytics/
Regards,
Hello,
How do you want the Google Analytics to track the search parameters?
if you have installed Google Analytics into your website, it should be able to record all URLs visited by user, for example:
versteckter Link
The parameter is tracked in the URL.
Hi,
I would like to track the search parameter as event type. For some url clicks I could set this, but I don´t know, how I can set it for a form on the single fields (selects / radio buttons), which can trigger an event at GA. So I could see, what search parameter are used how often.
Regards,
There isn't such kind of feature within Views plugin, it needs custom codes, which is out the range of Toolset support.
You might also consider other workarounds, for example:
versteckter Link
Thanks. How can I insert the given search parameters from my view search to this link, which is executed and how can I add the google campaign url to the submit button. Is there any onclick event (js) what I can use?
I´ve tried the following, but it doesn´t seem to be right:
jQuery(document).ready(function(){
jQuery('form.wpv-filter-form').submit(function(e){
return this.href + '?utm_source=partnersuche';
});
});
According to google document:
versteckter Link
Google Analytics can track some specific URL parameter names, for example, in URL:
versteckter Link
Google Analytics can track those:
- utm_source
- utm_medium
...
you need to edit your view, in section "Search and Pagination" pass the same URL parameter name as above.
But it is only a workaround, for your reference.
For other question:
Is there any onclick event (js) what I can use?
There isn't such built-in feature within Toolset or existed solutions, as I mentioned above, it needs custom codes, you might consider our "Toolset Contractors":
https://toolset.com/contractors/