How to test my Google Analytics tag?
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:
- You have correctly entered the measurement ID of your GA4 tag in the module by following this FAQ
- If you are also using a UA property, you must have filled in the tracking ID in the module by following this FAQ
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.
- Users in last 30 minutes: indicates the number of users per minute
- Users by source, medium, or campaign: indicates where your users are coming from
- Users (existing or new) by audience: indicates the profile of your users
- Views by page title and screen name: allows you to know which content they engage
- Event count by event name: indicates which events are triggered
- Conversions by event name: indicates which conversions are performed
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
- Where to find the measurement ID of my GA4 property?
- How to create a GA4 property for my website?
- How to configure the module?
- Where to find the tracking ID of my UA property?
- What is the Google Analytics consent mode?
- How to add a UA property to my existing GA4 property?
- How to create both a UA property and a GA4 property?
- How to add a GA4 property to my existing UA property?