Leadtosale

Custom trackers

The purpose of custom trackers

There are a number of different channels that a prospective lead can engage with you through your website. These aren’t necessarily through forms and phone calls. For example, you may use Acuity Scheduling to book appointments or a tool like Drift to qualify and chat to visitors of your website.

Therefore, form and call trackers are not sufficient to track every lead source from your website. To address this, we created the custom event tracker. This tracker will allow you to track any event that you can listen for on your website using JavaScript.

Creating a custom tracker

Head to the “TRACKERS” section of your container. Then, push the “CUSTOM TRACKER” button in the new trackers section of the page.

Configuring a custom tracker

There are four options to configure when creating a custom tracker.

Custom tracker name (required) - used to differentiate between different custom trackers. This field is required.

Send New Leads To GA - send events to the container’s configured Google Analytics property when new leads come in.

Require email address - will treat new leads without email addresses as invalid, and will not send events to GA or count as leads in your dashboard. These can be accessed using the Invalid filter in your leads dashboard.

Alert Users on New Leads - notify users when new leads are created by email. You may want to do this if you’re running the online marketing campaign for a client, or you simply want to monitor new leads in real time as they come in. Users need to be added to the business in order to be selectable here.

Once you’re finished configuring, hit “SAVE” to create your custom tracker.

Using your custom tracker

To get instructions for your custom tracker, select it from the trackers page after creating it.

You can create new leads for your custom tracker using the document.createLead method, like the below:

document.createLead({email: "some_email@test.com", phone: "555-5555",});

We recommend each lead has either an email address, phone number, or other unique identifier, so you can reconcile these with sales data from your CRM later.

Example usage: Form tracker workarounds

If your form does not have a submit button (type=“submit”,) or your fields are not direct children of the <form> tag, you’ll need to use the custom event tracker to track your form submissions instead of a form

For example, with the website builder Duda, you can use their JavaScript API to listen for form submissions, like the below.

<script>
//subscribe to form submit event
dmAPI.subscribeEvent(dmAPI.EVENTS.FORM_SUBMISSION, function(data) {
console.log("Form data is: " + data);
});
</script>

If you wanted to track these with the custom event tracker, you could implement something like this:

<script>
//subscribe to form submit event
dmAPI.subscribeEvent(dmAPI.EVENTS.FORM_SUBMISSION, function(data) {
document.createLead(data)});
</script>

This data is already formatted as JSON, so is easily used to create a new lead. In other scenarios, you may need to transform your data before you send it to Leadtosale.

You can send leads from multiple tools to a single custom tracker but we do not currently support more than one custom tracker per container, for example to segment leads by tracker on your dashboard. If you would like us to support this in future, or you have any other questions, send us a message in Intercom.

 

Supermetrics