Skip to main content
All CollectionsAttribution
How-To: Add the Polar Pixel to 3rd-Party Checkouts
How-To: Add the Polar Pixel to 3rd-Party Checkouts

This guide shows you how to install the Polar Pixel on your supported 3rd-party checkout platforms to ensure comprehensive order coverage.

Abby Garland avatar
Written by Abby Garland
Updated over 9 months ago

To ensure that the Polar Pixel is able to comprehensively track conversions and attribute them to the correct channels and campaigns, you'll need to ensure that the Polar Pixel is installed everywhere where a user can complete purchases for your brand. If you have a 3rd-party checkout solution that sends data to Shopify for order processing, use the instructions in this guide to install the Polar Pixel in those locations.

Note: If you don't find your checkout solution in the list below, don't hesitate to contact the Customer Support team via the in-app live chat.

Before you begin:

Ensure that the Polar Pixel is included in your current Polar Plan. If you're not sure, reach out to your dedicated Customer Success Manager. You'll also need access to the checkout solutions' settings in order to paste a snippet of JavaScript code. This process generally takes 5 minutes or less.

Supported Checkout Solutions:

  • Better Cart

  • Recharge (Custom checkout)

  • Upscribe

  • Checkify

  • Funnelish


Better Cart

1. Open the Better Cart app within your Shopify store. Click the "Settings" button from the left-side navigation menu then scroll down to "Custom Scripts".

2. Click Create Custom Script button on the right side of the screen. You will then be presented with a modal where you can select where the script will be placed as well as the area to paste your custom scripts.

3. Select "Thank You Page" in the dropdown, enter a Name (something you would recognize, e.g. "Thank you page")

4. Copy and paste the code presented below. Important: Replace <REPLACE_WITH_SHOPIFY_URL> with your MyShopify domain.

<script> 
try {
window.shopifyShopURL = 'REPLACE_WITH_SHOPIFY_URL';
window.headlessEmail = '{{email}}';
} catch(e) {}
</script>
<script>
/* Begin Polar Analytics Pixel */
!function(){function load(retry){var PA=new XMLHttpRequest;PA.open("GET","https://cdn-production.polaranalytics.com/pap.txt?"+(new Date).toISOString().slice(0,10).replace(/-/g,""),!0),PA.send(),PA.onreadystatechange=function(){4===PA.readyState&&200===PA.status?setTimeout(function(){return eval(PA.responseText)},40):(299<PA.status||PA.status<200)&&retry&&load(retry-1)}}load(10)}();
/* End Polar Analytics Pixel */
</script>


Recharge (Custom checkout)

The Recharge app has two checkout solutions - a Shopify one (default for anyone signing up with Recharge since 2020) and a custom Recharge one. Polar Analytics automatically supports the Shopify Recharge checkout. The below solution is ONLY for the custom Recharge checkout.

Step 1. Login to your Recharge Account here, go to the "Storefront" section and click on the "Checkout" sub-section.

⚠️ If you do not see the "Checkout" sub-section in the storefront section: Go to the "Customer Portal" sub-section, scroll down to the "Customer portal login" field and click "Enable manage subscriptions on checkout". The "Checkout" sub-section should appear. ⚠️

Step 2. Scroll down to the 'Thank you page' field, then copy and paste the below code alongside any other scripts you have already set up there.

<script> 
try {
window.shopifyShopURL = 'REPLACE_WITH_SHOPIFY_URL';
window.headlessEmail = '{{email}}';
} catch(e) {}
</script>
<script>
/* Begin Polar Analytics Pixel */
!function(){function load(retry){var PA=new XMLHttpRequest;PA.open("GET","https://cdn-production.polaranalytics.com/pap.txt?"+(new Date).toISOString().slice(0,10).replace(/-/g,""),!0),PA.send(),PA.onreadystatechange=function(){4===PA.readyState&&200===PA.status?setTimeout(function(){return eval(PA.responseText)},40):(299<PA.status||PA.status<200)&&retry&&load(retry-1)}}load(10)}();
/* End Polar Analytics Pixel */
</script>

⚠️ After copy-pasting your code, replace the 'REPLACE_WITH_SHOPIFY_URL' with your own Shopify store URL. ⚠️

Here's an example:

window.shopifyShopURL = 'example_shop.myshopify.com';

Step 3. Save & check your modifications have been adequately applied.


Upscribe

Contact upscribe.io Support and ask them to add the following tracking code to the Thank You page. Important: Replace <REPLACE_WITH_SHOPIFY_URL> with your MyShopify domain.

<script> 
try {
window.shopifyShopURL = 'REPLACE_WITH_SHOPIFY_URL';
window.headlessEmail = '{{email}}';
} catch(e) {}
</script>
<script>
/* Begin Polar Analytics Pixel */
!function(){function load(retry){var PA=new XMLHttpRequest;PA.open("GET","https://cdn-production.polaranalytics.com/pap.txt?"+(new Date).toISOString().slice(0,10).replace(/-/g,""),!0),PA.send(),PA.onreadystatechange=function(){4===PA.readyState&&200===PA.status?setTimeout(function(){return eval(PA.responseText)},40):(299<PA.status||PA.status<200)&&retry&&load(retry-1)}}load(10)}();
/* End Polar Analytics Pixel */
</script>


Checkify

  1. Select the desired type: Script in the header.

  2. Choose the page (destination) where you want to add the script: Only for Thank You page.

  3. Give the script a name by filling Script title.

  4. Enter the code in the field below. Important: Replace <REPLACE_WITH_SHOPIFY_URL> with your MyShopify domain.

  5. Click Save changes.

<script> 
try {
window.shopifyShopURL = 'REPLACE_WITH_SHOPIFY_URL';
window.headlessEmail = '{{email}}';
} catch(e) {}
</script>
<script>
/* Begin Polar Analytics Pixel */
!function(){function load(retry){var PA=new XMLHttpRequest;PA.open("GET","https://cdn-production.polaranalytics.com/pap.txt?"+(new Date).toISOString().slice(0,10).replace(/-/g,""),!0),PA.send(),PA.onreadystatechange=function(){4===PA.readyState&&200===PA.status?setTimeout(function(){return eval(PA.responseText)},40):(299<PA.status||PA.status<200)&&retry&&load(retry-1)}}load(10)}();
/* End Polar Analytics Pixel */
</script>


Funnelish

  1. Open the Funnelish “All funnels” page. Click the funnel you want to add the Polar Pixel to. On the bottom left of the next page, click on the “Settings” gear button.

  2. Click on “Custom codes” under the Custom codes section. Select the “Create a new code” button.

  3. Rename the code to your likings in the “Name” textbox. Uncheck “Lazy Load” so it is off. Check “Append to page head.”

  4. Copy and paste the code presented below. Important: Replace <REPLACE_WITH_SHOPIFY_URL> with your MyShopify domain.

  5. Click Save changes.

<script> 
try {
window.shopifyShopURL = 'REPLACE_WITH_SHOPIFY_URL';
window.headlessEmail = '{{email}}';
} catch(e) {}
</script>
<script>
/* Begin Polar Analytics Pixel */
!function(){function load(retry){var PA=new XMLHttpRequest;PA.open("GET","https://cdn-production.polaranalytics.com/pap.txt?"+(new Date).toISOString().slice(0,10).replace(/-/g,""),!0),PA.send(),PA.onreadystatechange=function(){4===PA.readyState&&200===PA.status?setTimeout(function(){return eval(PA.responseText)},40):(299<PA.status||PA.status<200)&&retry&&load(retry-1)}}load(10)}();
/* End Polar Analytics Pixel */
</script>


Did this answer your question?