How to test the triggering of the purchase event (order) on my site?
To test the triggering of the "purchase" event on your site, follow these steps:
Step 1: Disable ad blockers
Disable any ad blocker that might be installed on your browser (like "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 triggering properly.
Step 2: Consent Configuration
a/ Configure consent management
Make sure to properly configure consent management. To do this, please follow this FAQ.
b/ Accept cookies
Regardless of your cookie consent banner module, it's important to perform the following test by accepting all cookies on your cookie consent banner. Indeed, we will be testing the technical implementation of your tag, so if the test works when all cookies are allowed, it means that everything is technically in place for tracking information to be sent to Google. Later, you can test different types of consent. If you then notice a stop or abnormal decrease in data collection in your Google Analytics account, then the problem will be coming from your cookie banner module (see this FAQ).
Step 3: Open Tag Assistant
Go to tagassistant.google.com
Click on "Add domain":
Enter your site's URL and click on "Connect":
The Tag Assistant tool will open your site's homepage in a new tab. This is the tab where you'll need to perform the tests.
In the Tag Assistant window, click on the "Continue" button:
Tag Assistant should normally have detected your Google Analytics tag and you should see a window like this:
Step 4: Test order and tag functionality verification
In the tab of your site opened by Tag Assistant, after accepting cookies on your consent banner, place a test order on your store.
Important:
- Don't perform the test with a free order, the test won't work because a free PrestaShop order doesn't redirect to the order confirmation page.
- It's important to stay in the tab opened by Tag Assistant to place your order (a small "Tag Assistant" window at the bottom right of the tab should be displayed indicating that you are in the tab connected to Tag Assistant)
Once on the order confirmation page, go to the Tag Assistant tab. You should see, in the left menu, an "Order Confirmation" section corresponding to the purchase event:
In this section click on "purchase":
Then click on "Data Layer":
Verify that your order data sent to Google Analytics is correct as shown below:
- If you can see the "purchase" event and its values in Tag Assistant, it means your Google Analytics tag is working correctly and everything is technically in place for order tracking in your Google Analytics account. If later you don't see any orders in your Google Analytics account, or if you notice a significant decrease in their number, please refer to this FAQ.
- If you don't see the "purchase" event: it means the execution of the Google Analytics tag has been blocked. Please refer to this FAQ to learn about possible causes and how to resolve them. Once the problem(s) are resolved, restart the test following the previous procedure.