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 the procedure below:
Step 1: Datalayer Checker setting up
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:
Step 2: 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 3: Consent configuration
Configure consent management
Configure your consent management correctly. To do so, please follow this FAQ.
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 4: Test order and verification of tag operation
After accepting cookies on your consent banner, place a test order on your store. Important: don't perform the test with a free order, as PrestaShop does not redirect to the order confirmation page for free orders.
Once on the order confirmation page, click on the "Datalayer Checker" extension icon in the top right-hand corner of your browser:
Click on "{data}" and check that the "purchase" event appears, with your order data as shown below:
- If you can see the "purchase" event and its value in the Datalayer Checker, this means that your Google Analytics tag is working properly, and that technically everything is in place for the orders to be tracked in your Google Analytics account. If you subsequently observe no orders in your Google Analytics account, or a significant drop in the number of orders, please refer to this FAQ.
- If you do not see the "purchase" event: 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.