All Collections
Multi-Platform Subscription App (Not for Shopify)
Apps & Integrations
How to integrate Lead Dyno affiliate tracking with PayWhirl
How to integrate Lead Dyno affiliate tracking with PayWhirl

This article explains how to use the Lead Dyno javascript library to track affiliate sales when invoices are processed on PayWhirl

Ryan P. avatar
Written by Ryan P.
Updated over a week ago

First, you will need to add the LeadDyno tracking code to every page your PayWhirl customers can potentially view in the system. This includes ALL widgets, the cart, and the various pages within your hosted customer portal.

To accomplish this, simply copy/paste your tracking code from your Lead Dyno account - into your PayWhirl account in the Custom Tracking Scripts App

Your tracking code for every page should look like the one below but should have an actual value for "YOUR_PUBLIC_KEY" (ie. 364738362872873) from your Lead Dyno account.

<script type="text/javascript" src=""></script>

  LeadDyno.key = "YOUR_PUBLIC_KEY";

Next, you will need to include the following snippet of code in the PayWhirl Custom Scripts App in the CONVERSION section (loads after purchases only):

<script type="text/"javascript" src=""></script>

  LeadDyno.key = "YOUR_PUBLIC_KEY";
LeadDyno.recordPurchase('{{}}', {
purchase_code: '{{}}',
purchase_amount: '{{invoice.amount_due}}'
}, function() {
console.log("Purchase successfully sent to LeadDyno");

This will inject your customer's email address, the invoice id, and the purchase total into your Lead Dyno script before it loads and is sent off to your account. 

Note: You can also use the Lead Dyno javascript library if you would like to customize the integration further with specific lead information. For support with advanced implementations, please contact the Lead Dyno team through the appropriate channel.

Related Articles:

Please let us know if you have any questions.

The PayWhirl Team

Did this answer your question?