Skip to main content

Recharge

Connect Recharge to Polar and install the Pixel to track subscription orders

Sachi avatar
Written by Sachi
Updated yesterday

Overview

This guide walks you through how to connect your Recharge account to Polar Analytics and configure the Polar Pixel to track subscription checkouts. This setup ensures your Recharge data flows into Polar and that your marketing attribution captures recurring subscription orders—helping you recover up to 85% of previously untracked conversions.

In this article, you’ll learn:

  • How to connect Recharge to Polar Analytics via API

  • How to generate and configure the required API token

  • How to install the Polar Pixel for Recharge custom checkout

  • Troubleshooting and what to do if you use Shopify Checkout Integration

Connecting Recharge to Polar Analytics

Before you start, make sure your Recharge store has data available. Polar can’t ingest metrics from an empty source.

Step 1: Go to the Connectors Page

  • Log in to your Polar Analytics account.

  • Navigate to the Connectors page and search for Recharge.

  • Click Connect to Polar Analytics.

Step 2: Generate Recharge API Token

To authorize the connection, you’ll need to generate an API token from Recharge:

  1. Log in to your Recharge Admin Portal.

  2. Navigate to Apps > API tokens.

  3. Click Create an Admin API Token.

  4. In the Permission section, select Read Access for all scopes.

  5. Click Save to generate the token.

  6. Copy the Access Token—you’ll need it for the next step.

⚠️ Note: You must be the store owner or have the right permissions to generate an API token. More details on this here.

Step 3: Complete the Setup in Polar

  1. Go back to the Connectors page in Polar.

  2. Paste the API token into the Recharge connector setup.

  3. Select the Shopify store associated with your Recharge account.

  4. Click Connect.

Once connected, your Recharge data will start syncing with Polar. Please keep in mind it takes 24 hours before a new data source appears.

Installing the Polar Pixel for Recharge Custom Checkout

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.

Step 1: Access Checkout Settings

  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:

htmlCopyEdit<script> try { window.shopifyShopURL = 'REPLACE_WITH_SHOPIFY_URL'; window.headlessEmail = '{{email}}'; } catch(e) {} </script> <script> !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)}(); </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:

  1. Click Save at the bottom of the page.

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

Metrics and Dimensions

To have access to the full list of available metrics and dimensions for Shopify, you can check using the Custom Table builder.

Available Metrics

Raw

  • Active Customers Snapshot

  • Churned Customers

  • Cost of Products (COGs)

  • Discounts

  • Gross Sales

  • Net Product Quantity

  • New Discounts

  • New Gross Sales

  • New Returns

  • New Shipping

  • New Subscriptions

  • New Subscriptions Cost of Products

  • New Tax

  • Product Price

  • Returns

  • Shipping

  • Shipping Pre Refunds

  • Shipping Refunds

  • Tax

  • Tax Pre Refunds

  • Tax Refunds

  • Total Active Subscribers

  • Total Active Subscriptions

  • Total Customers

  • Total Subscriptions

Computed

  • Average Charge Value

  • Churned Sales

  • Churned Subscriptions

  • Gross Margin

  • Gross Profit

  • Net Sales

  • New Sales

  • Total Charges

  • Total Sales


Available Dimensions

  • Billing City

  • Billing Country

  • Billing Province

  • Billing Zip

  • Charge Frequency

  • Charge Id

  • Charge Status

  • Charge Type

  • Charge Type Raw

  • Created Date

  • Created Timestamp

  • Customer Created Date

  • Customer First Charge Date

  • Customer First Charge Processed Date

  • Customer Has Valid Payment Method

  • Customer Id

  • Customer Number Subscriptions

  • Customer Status

  • Error

  • Error Type

  • Is Charge

  • Is Charge Shipping

  • Is Refund

  • Is Subscription Product

  • Last Charge

  • Last Charge Attempt Date

  • Next Charge Scheduled Date

  • Note

  • Customer Number Charges

  • Number Times Tried

  • Order Frequency

  • Processed Date

  • Processed Timestamp

  • Processor Name

  • Product Id

  • Product Title

  • Product Type

  • Customer Type

  • Retry Date

  • Scheduled Date

  • Shipments Count

  • Shipping City

  • Shipping Country

  • Shipping Frequency

  • Shipping Province

  • Shipping Zip

  • Shopify Customer Id

  • Shopify Order Id

  • Sku

  • Store

  • Store Currency

  • Subscription Add On

  • Subscription Attribution

  • Subscription Cancellation Reason

  • Subscription Cancellation Reason Comments

  • Subscription Cancelled Date

  • Subscription Created Date

  • Subscription Discount Code

  • Subscription Duration Days

  • Subscription Expire After Specific Number Of Charges

  • Subscription Id

  • Subscription Number Charges Until Expiration

  • Subscription Options

  • Subscription Source

  • Subscription Status

  • Subscription Widget Id

  • Tags

  • Timezone

  • Total Weight

  • Transaction Id

  • Updated Date

  • Updated Timestamp

  • Utm Campaign

  • Utm Content

  • Utm Data Source

  • Utm Medium

  • Utm Source

  • Utm Tag Id

  • Utm Term

  • Utm Time Stamp

  • Variant Id

  • Variant Title


F.A.Q.s

When are charges processed?

By default, charges are processed for recurring queued orders after midnight Eastern Time (ET) for the current day.

Did this answer your question?