Integrating the transaction tag is essential to track sales generated through the iAdvize platform. This script captures key information such as the unique transaction ID and its amount, ensuring accurate tracking of post-conversation conversions.
This guide explains how to manually install the transaction tag on your website to ensure a proper and effective integration.
1. Integrate the transaction tag into your website’s code
1.1. Add the script to the payment confirmation page
-
Insert the JavaScript code just before the
</body>
tag of your payment confirmation page. -
The transaction tag must be placed before the main iAdvize tag on this page.
-
The main iAdvize tag is mandatory — without it, transactions will not be tracked.
1.2. Exemple d’intégration
<script>
// Configuring the iAdvize transaction tag
window.iAdvizeInterface = window.iAdvizeInterface || [];
window.iAdvizeInterface.push(function(iAdvize) {
iAdvize.recordTransaction({
amount: 123.45, // Replace this value with the actual transaction amount
id: 'unique-identifier-XXXX' // Unique transaction identifier
});
});
</script>
💡 Replace 123.45 with the actual transaction amount (using a dot as the decimal separator).
💡 Replace unique-identifier-XXXX with the unique transaction ID generated by your system.
After your onboarding, if you want to find your various tags, go to Projects from your profile, then select Code to insert.
This video will guide you through the process:
2. Best practices and tips
-
Place the script on all payment confirmation pages to ensure accurate transaction tracking.
Do not insert this script on any page other than those dedicated to payments.
Do not alter the structure of the code provided by iAdvize to avoid errors.
Test across different browsers and devices to verify compatibility and proper script functionality.
If your site is a Single Page Application (SPA), refer to the documentation on technical constraints related to transactions to properly adapt the integration.