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.

Installation

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="https://static.leaddyno.com/js"></script>
<script>
  // If you use multiple sub-domains, set the root domain here
  // LeadDyno.domain = "yourdomain.com";
  LeadDyno.key = "YOUR_PUBLIC_KEY"
  LeadDyno.recordVisit();
</script>

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:

AutoWatch

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:

LeadDyno.autoWatch();

Watch

If you are familiar with jQuery, you can use selectors to tell LeadDyno to watch particular inputs for a lead email:

jQuery, you can use selectors to tell LeadDyno to watch particular inputs for a lead email:

LeadDyno.watch("#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.

The REST API

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 http://api.leaddyno.com/v1/purchases 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("{customer_email}", {
    purchase_amount: "{purchase_amount}" 
  });

You should replace the {customer_email} and {purchase_amount} with variables representing the customer's email address and the price of the purchase.

and, to record cancellations, invoke the following javascript:

  LeadDyno.recordCancellation();

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.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us