How to test my Google Analytics tag?
1/ By using the datalayer plugin
- Open Google Chrome
- Download the "Datalayer Checker" extension for Google Chrome
- Go to the page of your site you want to test, here we'll take the product page
- Open the Datalayer extension by clicking on its icon in your list of extensions
- Click on "{data}" to open the details of the data detected and sent to Google Analytics
2/ 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:
- Make sure that you have correctly entered the measurement ID of your GA4 tag in the module by following this FAQ
- Log into your Google Analytics account and check that the selected account is the one where you created the GA4 property linked to your site. Select your GA4 property:
- Go to the "Realtime" tab:
"Realtime" reports let you monitor activity on your site as it happens.
For example:
-
- 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_wishlist" 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 "button.wishlist-button-add", your theme uses the custom element "button.wishlist-button", then replace ".button.wishlist-button-add" by "button.wishlist-button" in the add-to-cart event field:
Don't forget to save.
- Go back to your store and add an item to your wishlist. Wait a few moments: you should see the add-to-wishlist 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 migrate from Universal Analytics to Google Analytics 4?
- How to create a GA4 property for my website?
- How to track the activity accross different devices with User-ID parameter?
- How to configure the module?
- What is the Google Analytics consent mode?