Installing LeadDyno

In this article

Pre-Installation: Account Setup

Before installing LeadDyno, you must sign up for an account here and then get your public and private keys via Your Account Page.


Installing LeadDyno for your site typically involves three steps:

  • Installing Visitor Tracking;
  • Configuring Lead Tracking;
  • Adding Purchase Tracking.

This guide will help you through each step.

Note: If you are using a platform that we integrate with, such as PayPal or Shopify your installation may be much simpler. View all our integrations.

Visitor Tracking

To get visitor tracking going, add the following code to each page on your site:

<script type="text/javascript" src=""></script>
  // If you use multiple sub-domains, set the root domain here
  // LeadDyno.domain = "";
  LeadDyno.key = "YOUR_PUBLIC_KEY"

Where "YOUR_PUBLIC_KEY" is replaced with the public key from your user page above. This will load the LeadDyno library and begin tracking where your visitors are coming from.

Note: This code should be on every page of your site, similar to Google Analytics.

Lead Tracking

The next step is to capture the email address of your visitors. There are a few different ways to do this:


The easiest way to track leads is to call  autoWatch(), which will automatically watch all inputs on your site for a lead email. To enable this, simply add the following code:



If you are familiar with jQuery, you can use selectors to tell LeadDyno to watch particular inputs for a lead email:"#email"); // will watch fields with the ID 'email'

Record Lead

If you want more control over when the lead email is captured, you can call the  recordLead() function in your own client site event listeners (e.g. on a form.submit () event handler): PayPal or Stripe )

$('#my-form').submit(function(){       LeadDyno.recordLead($("#email").val());     });

Purchase Tracking

Purchase tracking can be done in one of three ways:

Using Integrations

If you are using a billing system that we integrate with, purchase tracking is very simple: a link to documentation for supported integrations is in the sidebar of every documentation page.


If you are not using one of the systems we integrate with, the next option is to use LeadDyno’s REST API.

You will issue  POST and DELETE requests to the URL to create and cancel purchases, respectively.

Additional parameters and documentation can be found in the Purchases API docs.

Using Javascript

Finally, you may track purchases via the Javascript library. You can do this by adding the following javascript code to the ‘Thank You’ page  after a user has purchased:

  LeadDyno.recordPurchase("", {
    purchase_amount: "12345" 

and, to record cancellations, invoke the following javascript:


Note: Purchases created via the Javascript API will need to be approved via the Purchases Page before they are credited to affiliates, in order to prevent fraudulent purchases.

Still need help? Contact Us Contact Us