How to test my Google Analytics tag?
To test your Google Analytics tag, please follow the procedure below:
Step 1: Deactivating ad blockers
Deactivate any ad blockers that may be installed on your browser (such as "AdBlock" or others) for your store's domain. If you don't do this, the test may not work and you won't know if the tag is triggered correctly.
Step 2: Consent configuration
a/ Configure consent management
Configure your consent management correctly. To do so, please follow this FAQ.
b/ Accept cookies
Whatever your cookie consent banner module, it's important to perform the following test by accepting all cookies on your cookie consent banner. This is because we'll be testing the technical implementation of your tag, so if the test works when all cookies are enabled, this means that everything is technically in place for tracking information to be sent to Google. Secondly, you can test the different types of consent. If you then find that your Google Analytics account stops receiving data, or that there is an abnormal drop in the amount of conversions being sent, then the problem lies with your cookie banner module (see the end of this FAQ).
Step 3: Google Analytics tag configuration
a/ With Datalayer Checker tool
In Google Chrome's browser (if you don't have Chrome, you can easily install it by clicking here), install the "Datalayer Checker" extension.
Once you've installed the Datalayer Checker extension, pin it to your browser for ease of use. To do this, click on the extensions icon in the top right-hand corner of your Chrome browser, then on the pin corresponding to the Datalayer Checker extension:
To find out whether your Google Analytics tag is indeed sending information about your visitors' activity to Google, you need to test its triggering on the pages of your site. Let's take the example of a product page. You don't need to test your tag on every page of your site: if your tag works for one, it'll work for all. However, if you want, you can specifically test the "purchase" event by following this FAQ.
After accepting cookies on your consent banner, go to a product page in your store and click on the Datalayer Checker icon:
Click on "{data}" to open the details of the data detected and sent to Google Analytics, as below:
- If you can see the product information in the Datalayer Checker, this means that your Google Analytics tag is working properly, and that technically everything is in place for your store activity to be tracked in your Google Analytics account. If you subsequently observe no data in your Google Analytics account, or a significant loss of data, please refer to this FAQ.
- If you do not see any data, this means that the Google Analytics tag has been blocked. Please refer to this FAQ for possible causes and solutions. Once you've solved the problem(s), repeat the test as described above.
Note:
If only certain click events, such as "add_to_wishlist" or "add_payment_info" do not appear in the Datalayer Checker, it may be because your theme does not use the default HTML elements. In this case, please refer to this FAQ to know how to proceed.
b/ 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 and 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 you can see the product information in the Datalayer Checker, this means that your Google Analytics tag is working properly, and that technically everything is in place for your store activity to be tracked in your Google Analytics account. If you subsequently observe no data in your Google Analytics account, or a significant loss of data, please refer to this FAQ.
- If you do not see any data, this means that the Google Analytics tag has been blocked. Please refer to this FAQ for possible causes and solutions. Once you've solved the problem(s), repeat the test as described above.
Note:
If only certain click events, such as "add_to_wishlist" or "add_payment_info" do not appear in the Datalayer Checker, it may be because your theme does not use the default HTML elements. In this case, please refer to this FAQ to know how to proceed.