Overview
AvantLink released the AvantLink Merchant Tracking app for Shopify in September 2021. After the release two items occurred that need to be remedied:
- Shopify deprecated the "Product Item Price" variable. This needs to be updated to ensure AvantLink continues to receive accurate data.
- An intermittent issue was identified where incorrect order numbers were being reported in AvantLink. Upon investigation, it was determined that Shopify sends incorrect data when their platform is under heavy load. Instead of sending AvantLink the Merchant's order number, Shopify instead sends the Shopify internal transaction id. This symptom can be seen by going to Classic Reports and running the Sales Commission Details report:
Steps to Resolve
To ensure AvantLink receives accurate data, Merchants that integrated with the AvantLink Merchant Tracking app before May 15, 2023 will need to:
- Uninstall the Old AvantLink Merchant Tracking App.
- Install the new AvantLink Merchant Tracking App.
If your integration started after May 15, 2023 follow the steps outlined in the Shopify Tracking Integration Guide.
Part 1: Uninstall the Old AvantLink Merchant Tracking App
- Log into your Shopify store.
- Navigate to "Settings"
- Navigate to "Apps and sales channels" and uninstall the "AvantLink Merchant Tracking App"
- After uninstalling the AvantLink Merchant Tracking app stay in Shopify "Settings". Click on "Checkout"
- Scroll down to the "Order status page" section and look for the "Additional scripts" input.
- Delete the entire AvantLink Order Confirmation Script and click SAVE. Be careful to not delete any portion of other scripts you may have in that box. If you have questions, copy all of the scripts that are in that text box and email it to your integration rep.
The entire AvantLink script that needs to be deleted looks like this:
<script type="text/javascript">
var _AvantMetrics = _AvantMetrics || [];
{% for discount_application in checkout.discount_applications %}
{% capture coupon_code %}{{ discount_application.title }}{% endcapture %}
{% endfor %}
_AvantMetrics.push(['order', { order_id:'{{id}}', amount: '{{subtotal_price | money_without_currency}}', state: '{{billing_address.province_code}}', country: '{{billing_address.country_code}}', ecc: '{{coupon_code}}', tax: '{{enter_tax}}', shipping: '{{enter_shipping}}', currency: '{{ currency }}', new_customer: {% if customer.has_account == true %}'N'{% else %}'Y'{% endif %}}]);
{% for line in line_items %}
_AvantMetrics.push(['item', {order_id: '{{id}}', variant_sku: '{{line.sku}}', price: '{{line.price | money_without_currency}}', qty: '{{line.quantity}}' }]);
{% endfor %}
</script>
Part 2: Install New AvantLink Merchant Tracking App
- Log into your Shopify store.
- Install the AvantLink Merchant Tracking app.
- Configure the app
- Enter your merchant ID. The merchant id was included in your Shopify ReIntegration email.
Note: The merchant id will not be displayed when you come back to the app, but it will be saved in the tracking script associated with your Shopify store. - Copy the AvantLink script and then click the Settings > Checkout > Order Processing link.
Scroll down to the Order status page section and paste the AvantLink script into the Additional Scripts input. There is a link in AvantLink the app to take you to this page. If there are existing scripts in that field, place the AvantLink script at the top. Be careful to not overwrite anything.
Note: If your store has installed an app that adds a post-purchase page to your store's checkout an additional field will be displayed for adding tracking script for post-purchase events. Do NOT add the AvantLink script to that box, add it to the Script box that is outlined in the screenshot below. - Save your changes on both the AvantLink App and the Shopify Checkout page.
- Contact your AvantLink technical Integration rep and Perform a few tracking tests to ensure everything is working as expected