Provide site search information to Universal Analytics from Google Tag Manager -


On our site, on which we have recently started using Google Tag Manager for all our tracking needs.

Previously, we had Google Analytics (now upgraded to Universal Analytics) site search enabled; we did not have _ga.push -statents with search parameters sent to Google Analytics , The terms used by us were the search string and which were the number of similar products, such as in an event:

_gaq.push (['_ trackPageview', ' / Search? Q = [SEARCH STRING] and cat = [number of results] ']);

Google Analytics has achieved these standards and used them in site search.

Now we have a GTM set up. I think we should really be able to leave this stage, events from many GTMs and other Google Analytics things are already integrated in the GTM already.

From GTM, we have the search string in our data layer as well as the number of results and more information used for site search Google Analytics.

The question is: how should send information to Google Analytics and how should you set GA to get the best possible way?

Tow Steiner ,

The thing is that As a query parameter in your search string url (in your example, its name is q ). In the GA web interface, you can set up the Site Search setting, and you can fill the search parameters.

You were sending virtual pageviews for that reason, and with that you have to do good with GTM. However, the best way would be to add the search parameter to the URL such as:

image description Enter here

By default, the GTM document path uses the url path for the path (= page ) dimension. If you attach your search string, you can set up search query parameters in the Analytics interface (see Settings> Site Search) and so on.

I used the {{search string}} macro to capture the search phrase - but since I'm not sure how the search has been implemented on your site, how do you do it (Data Layer Variables, custom JavaScript macros, etc.) - and make sure that it returns the search query as a parameter. It should look like this:

 ? Q = Search  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -