Not what you’re looking for?

Submit a Ticket
?

Tracking : Partnerize Shopify Integration

__________________________________________________________________________________________________________________

This article will review:

  • How the Partnerize Shopify Integration functions
  • How to install the application and enable all features
  • What tracking features are included
  • Access to additional technical documentation

__________________________________________________________________________________________________________________

Index

Overview

Partnerize has a Shopify application which allows brands that use Shopify as their eCommerce platform to easily integrate their conversion tracking.  This integration uses a 1st party cookie tracking solution via a Partnerize tag. This ensures that the brand’s tracking is not reliant on 3rd party cookies, and is therefore ITP (and equivalent) compliant.  

The application enables brands to create and enable a Partnerize tag, which is then implemented onto all site pages.  The integration also implements a conversion tracking pixel to trigger at checkout, and automatically reads the transactional data from Shopify to easily format the data, to be able to send it to Partnerize for purchase tracking, which reduces the need for any complex integration and development work.

In addition to conversion tracking, the integration will also handle the validation of transactions where items have been returned, based on the transaction statuses within Shopify.

__________________________________________________________________________________________________________________

Implementation Steps

Install Application 

  • Within the Shopify App Store, locate the Partnerize app - https://apps.shopify.com/partnerize
  • Click 'Add app'
  • Choose the store for which the app should be installed
  • Click Install App:

Screenshot_2021-03-31_at_14.58.02.png

Configure Application 

Once the application has been installed, the configuration settings must be applied.  

__________________________________________________________________________________________________________________

NOTE:

Before configuring the cartridge, the below information is required, which can be obtained via the Partnerize platform: 

  • API Key (Settings > Account Settings > User Application Key) (first key)
  • User Key (Settings > Account Settings > User API Key) (second key)
  • Brand ID (Settings > Brand Settings > Advertiser ID)
  • Campaign ID - This will be provided by the Partnerize Integrations Team

If access to the Partnerize platform is required, contact your Partnerize Customer Success Manager for more information.  

__________________________________________________________________________________________________________________

Once this information had been obtained:

  • Access the Partnerize app
  • The Account Information screen will be displayed:

Screenshot_2021-03-30_at_16.35.00.png

  • Input the required values and click Save

__________________________________________________________________________________________________________________

NOTE:

If an error is returned stating "You do not have "update" access on this resource", check that the keys and IDs entered are correct. 

__________________________________________________________________________________________________________________

  • Once saved, this will automatically perform two actions:
    • Generate the Partnerize tag and deploy the JavaScript tag to all site pages
      • The tag will take approximately 15 minutes to propagate
    • Generate the conversion pixel tracking code, which will automatically appear shortly after

__________________________________________________________________________________________________________________

NOTE:

Partnerize has developed a first party pixel tracking solution which allows brands to track unique click referrals without the use of cookies, making it ITP compliant and a completely cookie-less tracking solution.

The First Party Tracking solution is a JavaScript tag which is placed into the bottom of the brands content on every page which a user may be redirected to and the resultant checkout page.  

__________________________________________________________________________________________________________________

Screenshot_2022-06-28_at_15.09.14.png

  • Copy the above tracking code
  • Navigate to Settings > Checkout > Order Status page
  • Paste the previously copied code into Additional Scripts and Save:

Screenshot_2022-06-28_at_15.11.29.png

Tracking NET transaction value

Within the tracking code, the tracked transaction value for each line item will be the NET item value (i.e. the item value minus any taxes or other charges).  However, there is a Shopify store setting (not linked to the Partnerize app) that, if enabled, will overwrite this and the store datalayer will pass the GROSS transaction value into the tracking pixel.  This setting is the 'All prices include tax' flag within the 'Taxes and Duties' section. 

This can be overwritten by using a different tracking code snippet to the one that is automatically generated by the app.  If you have the 'All prices include tax' flag enabled within Shopify, but you want to ensure that NET transaction values are passed to Partnerize for all tracked sales, please use the below code under 'Alternative tracking code to track NET transaction value' as an alternative.

__________________________________________________________________________________________________________________

NOTE:

  • You MUST ensure that the correct campaign ID is added to the code.  This should be the campaign ID that you have been provided with by the Partnerize Integration team:

campaign:{{ENTER YOUR PARTNERIZE CAMPAIGN_ID}}

  • The version of the code below will ensure that 20% tax (VAT) is deducted from the GROSS transaction value, to ensure that the Partnerize tracking always tracks NET.  If your local tax percentage differs to this, you will also need to update this within the code at the very start of the snippet, for example:

{% assign VAT = 1.20 %}

  • 1.20% represents a 20% tax rate
  • The percentage can be changed, should your local tax rate differ

__________________________________________________________________________________________________________________

Alternative tracking code to track NET transaction value

  • Navigate to Settings > Checkout > Order Status page
  • Paste the below code into Additional Scripts and Save
{% assign VAT = 1.20 %}<div data-partnerize="https://prf.hn/conversion/campaign:{{ campaign_id }}/conversionref:{{ order_number }}/customertype:{% if customer.orders_count < 2 %}new{% else %}existing{% endif %}/voucher:{% for discount in order.discounts %}{{ discount.code }}{% endfor %}/currency:{{ currency }}/country:{{ checkout.shipping_address.country_code }}/shopify_order_id:{{ order_id }}/{% assign sub_total = 0 %}{% for line_item in line_items %}{% assign sub_total = line_item.line_price | plus: sub_total %}{% endfor %}{% assign sub_total = sub_total | append: '.00' %}{% for line_item in line_items %}[category:{{ line_item.product.type }}/shopify_variant_id:{{ line_item.variant_id }}/sku:{{ line_item.sku }}/value:{% if order.discounts_amount > 0 %}{% assign discount = order.discounts_amount | divided_by: sub_total %}{% assign discount_percentage = 1 | minus: discount %}{% assign afterDiscountPrice = line_item.price | times: discount_percentage %}{{ afterDiscountPrice | times: 0.01 | divided_by: VAT | round: 2 }}{% else %}{{ line_item.price | times: 0.01 | divided_by: VAT | round: 2 }}{% endif %}/quantity:{{ line_item.quantity }}]{% endfor %}" style="display:none"></div>

Conversion Tracking Pixel 

As part of the configuration, the Partnerize conversion pixel will also be implemented onto the brand website check out page, and will fire unconditionally (i.e. it will fire for ALL sales).  Therefore, the brand must ensure that there is a process in place for any cross channel duplication.  

The pixel will automatically read transactional data at check out, and format the pixel.  Example pixel below:

https://prf.hn/conversion/campaign:123456/conversionref:00000901/customertype:new/currency:USD/country:US/shopify_order_id:3692686552/[category:Tops/shopify_variant_id:897735521/sku:701642811398M/value:14.99/quantity:1]

If a Partnerize clickref has been set in the local storage cookie, the clickref will be retrieved and added to the pixel:

https://prf.hn/conversion/campaign:123456/conversionref:00000901/customertype:new/currency:USD/country:US/shopify_order_id:3692686552/[category:Tops/shopify_variant_id:897735521/sku:701642811398M/value:14.99/quantity:1]/clickref:1011leS5tcVr

__________________________________________________________________________________________________________________

NOTE:

Campaigns must have S2S tracking enabled to ensure that the Partnerize clickref is generated.  

__________________________________________________________________________________________________________________

Testing

Once the tags are deployed, they should be tested by submitting a test transaction via the brand’s live website.  A non session test should be performed, which simulates a returning customer who originally followed a partner link but purchased at a later date. Providing the sale is made within the cookie period of the brand, the transaction should track successfully.

Testing Instructions

  • Follow a test partner link.  To obtain a link, go to the ‘Partners’ section of the Partnerize platform, locate the ‘test’ partner account, copy the tracking link and paste it into the browser window.  Email integrations.support@partnerize.com if you cannot locate the link
  • Let browser load page
  • Once loaded, exit browser
  • Reopen browser and go directly to brand site without following test link
  • Purchase multiple items (if applicable)
  • Save order number with purchase costs
  • Provide source code from thank you page and order/transaction ID to integrations.support@partnerize.com

Expected Outcome

  • Transactions is recorded in the Partnerize dashboard
  • All parameters are populated correctly, and that the conversion call is correctly formatted.  The following parameters should be checked closely:
    • Value - Ensure that this is populated with the NET item value for each item
    • Currency - Ensure that this is populated with the correct currency used at point of sale
    • Clickref - Check that the most recent clickref has been passed into the parameter
  • Check that the tracking solution has been fired from the live confirmation page

Validations

The Partnerize Shopify application will automatically process transaction validations for returned items between Shopify and Partnerize, to ensure that transaction statuses are in sync across the two platforms.  For example, if an order status in Shopify has been set to REFUND, whether this is for all items within the order or only individual items within the order, the conversion item status will be automatically updated to ‘rejected’ within the Partnerize system.  The validations job runs every minute, so the update to the status in the Partnerize system will occur shortly after the update within Shopify.

Approvals would need to be handled separately within the Partnerize platform, by either;

  • Manually approving any transactions which remain in a pending status
  • Setting a force approval period, to automatically approve any remaining pending transactions after a specified number of days, typically once the returns period has passed

__________________________________________________________________________________________________________________

NOTE:

The validations job will only sync the statues between Shopify and Partnerize once the Shopify status for the item/order is set to REFUNDED, not RETURNED.

__________________________________________________________________________________________________________________

Next Steps

  • Request a campaign_id from the Partnerize Integration team.  Email integrations.support@partnerize.com if you do not already have this.
  • Install the Shopify application and apply all configuration settings using the instructions above.  Inform the Partnerize Integration team once this has been completed
  • Perform testing using the above instructions - Transactions will need to be submitted via the brand’s live website, so that the implementation can be fully tested.  

__________________________________________________________________________________________________________________

FAQ's

Please refer to our Shopify FAQ guide here: Shopify FAQ's

 

 

Was this article helpful? 0 out of 0 found this helpful

Didn't get the answer you need?

Get in Touch