Skip to main content

How-To: Set up Polar Pixel on Recharge

This article details how to set up the Polar Pixel on your Recharge account.

PolarBears avatar
Written by PolarBears
Updated over a week ago

Overview

To collect purchase data from customers who check out via Recharge, you’ll need to make a small configuration change. This setup allows the Polar Pixel to track checkout activity and attribute Recharge subscription orders, increasing order coverage by up to 85% on average.

This guide applies only to merchants using the older version of Recharge with the custom checkout. If your store uses the Shopify Checkout Integration, please follow this guide instead: How-To: Polar Pixel Installation.

Installing Polar Pixel on Recharge

Step 1: Access the Checkout Settings in Recharge

  1. Log in to your Recharge account here.

  2. Navigate to Storefront > Checkout.


⚠️ Can’t find the "Checkout" menu?

If the Checkout tab isn’t visible:

  • Go to Storefront > Customer Portal.

  • Scroll down to the Customer portal login section.

  • Enable “Manage subscriptions on checkout”.

  • The Checkout tab should now appear.

Step 2: Add the Polar Pixel Script to the Thank You Page

  1. Scroll down to the Thank you page field.

  2. Paste the following code below any existing scripts:

<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>

⚠️ Don’t forget to update this line:

Replace 'REPLACE_WITH_SHOPIFY_URL' with your actual Shopify store URL.
Example: window.shopifyShopURL = 'example_shop.myshopify.com';

Step 3: Save & Confirm

After pasting and editing the code:

  • Click Save at the bottom of the page.

  • Verify that the script is correctly applied by completing a test purchase and checking that the data is reflected in Polar Analytics.

For Stores Using the Shopify Checkout Integration

If your Recharge account is on the Shopify Checkout Integration platform, this guide does not apply. All checkouts are handled directly by Shopify, so tracking scripts must be added in your Shopify admin, not in Recharge.

➡️ To install the Polar Pixel on Shopify, please follow this guide:
How-To: Polar Pixel Installation & Tracking Parameter Setup Guide

Did this answer your question?