How to test my Google Analytics tag?

By using dataLayer plugin

First download https://chrome.google.com/webstore/detail/datalayer-checker/ffljdddodmkedhkcjhpmdajhjdbkogke

And go to product page to test, for example we are testing product page



By using real time overview in Google Analytics

To check the correct functioning of the tag on your site, you can observe in real time the display of the events in your Google Analytics account. To do this, follow this procedure:

First, make sure that:

Log into your Google Analytics account and make sure that the account you selected is the one where you created the GA4 property linked to your site. Select your GA4 property (even if you have associated a UA property, you must be on the GA4 property to test):

 

 

Go to the "Realtime" tab:

 

 

"Realtime" reports let you monitor activity on your site as it happens.

For example:

If your store is already generating traffic, you should already see data in these reports. 

Browse your store in a new tab and place a test order: if the tag is working properly you should see events triggered in real time as you progress through the conversion tunnel.

Observe in particular the "Views by page title and screen name" and "Event count by event name" reports: each time you display a page, you should see the name of this page appear a few seconds later in the "Views by page title and screen name" report. At each step of your test order, you should see the corresponding events ("add_to_cart", "view_cart", "begin_checkout", "add_shipping_info" etc... up to "purchase") appear in the "Number of events by event name" report:

 

If the click events (like "add_to_cart" or "add_payment info") do not appear, it may be because your theme does not use the default HTML elements. You must then ask your technical contact to indicate the HTML elements to be taken into account instead of the default ones. To do this, go to the "Event customization" section of the "Advanced settings" tab of the module. For each event triggered by a click, we have indicated the default HTML element used:

 

 

If your theme uses other HTML elements, specify them by replacing the default ones.

For example, if instead of using the HTML element ".add-to-cart", your theme uses the custom element ".add-to-shopping-cart", then replace ".add-to-cart" by ".add-to-shopping-cart" in the add-to-cart event field:

 

 

Don't forget to save. Go back to your store and add an item to the cart. Wait a few moments: you should see the add to cart event appear in the "Event count by event name" report.

Other FAQs in this category