Skip to main content

Stripe Pricing Table

Attribute conversions from Stripe pricing tables to the right affiliate.

This integration allows you to track affiliate-referred clicks and conversions when using Stripe Pricing Tables. By connecting Trackdesk to your pricing table, the system automatically captures the Click ID and passes it to Stripe, ensuring accurate conversion attribution.

Note: You can identify if you are using this feature by inspecting your website's code. Look for the <stripe-pricing-table> HTML tag.

⚠️ Important:

  • Compatibility: This integration works for pages containing one or multiple pricing tables.


​

Before you start

Ensure you have the following information and access ready:

  • Access to your Stripe Dashboard.

  • Your Trackdesk Tenant ID (Click Your Trackdesk identifiers at the top right of any Settings page).

  • A Trackdesk Personal Token (Generated in Settings → Integrations → Personal tokens).

  • Access to your website's HTML source code or tag manager.

Step-by-step instructions

Step 1: Install the Trackdesk Stripe app

  1. Visit the Stripe Marketplace and install the Trackdesk App.

  2. Once installed, open the app settings within your Stripe Dashboard.

  3. Enter your Tenant ID and Personal Token.

  4. Click Save Changes.

Step 2: Install the click tracking script

Add the click tracking script to every page of your website, including all landing pages. Place it as high as possible in the <head>, ideally right after the opening <head> tag, so the click is recorded before the visitor can leave the page.

<!-- Trackdesk tracker begin -->
<script async src="//TENANT_ID.trackdesk.com/main.js"></script>
<script>
(function(t,d,k){(t[k]=t[k]||[]).push(d);t[d]=t[d]||t[k].f||function(){(t[d].q=t[d].q||[]).push(arguments)}})(window,"trackdesk","TrackdeskObject");

trackdesk("TENANT_ID", "click");
</script>
<!-- Trackdesk tracker end -->

Replace TENANT_ID with your Tenant ID.

Step 3: Add the pricing table helper script

This script establishes the connection between the Click and the Stripe pricing table. Choose one of the following scenarios based on your website structure. Add the script right before the closing </body> tag of the page where your pricing table is, so the elements it updates already exist.

Scenario A: Pricing table is on a different page than the landing page

Use this if the user lands on your homepage but navigates to a separate pricing page to see the table.

<!-- Trackdesk set client_reference_id pricing table helper function begin -->
<script>
(function () {
var cookie = document.cookie.match("(^|;)\\s*trakdesk_cid\\s*=\\s*([^;]+)");
if (Array.isArray(cookie)) {
try {
var trakdeskCid = JSON.parse(cookie.pop());
var cid = trakdeskCid["cid"];
document.querySelectorAll("stripe-pricing-table").forEach(function (e) {
e.setAttribute("client-reference-id", cid);
});
} catch (e) {
console.log(e);
}
}
})();
</script>
<!-- Trackdesk set client_reference_id pricing table helper function end -->

Scenario B: Pricing table is on the same page as the landing page

Use this if your landing page directly contains the pricing table. This version waits briefly so the Click ID exists before the pricing table is updated.

<!-- Trackdesk set client_reference_id pricing table helper function, click script on the same page as helper script begin -->
<script>
(function () {
var linksUpdated = false;
setInterval(function () {
var cookie = document.cookie.match("(^|;)\\s*trakdesk_cid\\s*=\\s*([^;]+)");
if (Array.isArray(cookie) && !linksUpdated) {
try {
var trakdeskCid = JSON.parse(cookie.pop());
var cid = trakdeskCid["cid"];
document.querySelectorAll("stripe-pricing-table").forEach(function (e) {
e.setAttribute("client-reference-id", cid);
});
} catch (e) {
console.log(e);
} finally {
linksUpdated = true;
}
}
}, 300);
})();
</script>
<!-- Trackdesk set client_reference_id pricing table helper function, click script on the same page as helper script end -->


​

Testing your integration

Before officially launching your affiliate program, we highly recommend running a test click and conversion to verify everything is set up correctly. For the steps, see Testing an Offer.

⚠️ Important: When testing, note the following:

  • Our Stripe app works across all Stripe environments: Live mode, Test mode, and Sandbox mode.

  • Our Stripe app checks for new conversions every 15 minutes. To speed this up during testing, go to the Trackdesk Stripe app settings in your Stripe Dashboard and click the Check Now button to force a manual sync.

If you run into any tracking issues, see our Stripe Integration Troubleshooting guide.

Did this answer your question?