The integration of the transaction tag is essential to track sales generated through the iAdvize platform. This script allows key information to be retrieved, such as the unique transaction ID and its amount, ensuring accurate conversion tracking after a conversation.
This guide explains how to manually install the transaction tag on your site to ensure a correct and efficient integration.
1. Integrating the transaction tag into your site's code
1. Trigger this script on payment confirmation pages
- Trigger this JavaScript code as soon as possible on your payment confirmation pages
- The main iAdvize tag must be present, otherwise transactions will not be recorded.
2. Integration example
<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 identifier generated by your system.
After your onboarding, if you want to retrieve your various tags, you can access Projects from your profile, then Code to insert.
This video will guide you:
2. Verify the transaction tag installation
Once your tags have been implemented, you can test whether they have been correctly integrated.
Go to your Settings > Integration > Test the integration
- Start an iAdvize conversation on your site
- Complete a transaction on your site
- Copy the URL of the order confirmation page
- Paste the URL into the Precise diagnostic tab to check if the transaction data is correctly retrieved.
3. Best practices and recommendations
- Place the script on all payment confirmation pages to ensure proper transaction tracking.
- Do not insert this script on other pages than those dedicated to payments.
- Do not modify the structure of the code provided by iAdvize to avoid errors.
- Test on different browsers and devices to check compatibility and proper script operation.
- If you notice transaction discrepancies between iAdvize and your analytics tools, consult the documentation on technical constraints related to transactions to adapt the integration.