Configuring visitor & lead tracking for your Clickfunnels website
LeadDyno offers a very simple integration with Clickfunnels, making it incredibly easy to get an affiliate program going for your online Clickfunnels website.
In this article
In the Clickfunnels back office, please go to the Settings - Head Tracking Code section and add the tracking snippet below there.
<script type="text/javascript" src="https://static.leaddyno.com/js"></script>
<script>
LeadDyno.key = "YOUR_PUBLIC_KEY"
LeadDyno.recordVisit();
LeadDyno.autoWatch();
</script>
The "YOUR_PUBLIC_KEY" part will need to be replaced with your LeadDyno public key which can be found in the Account - Profile section of LeadDyno.
Then, please add the snippet below in the Settings - Body Tracking section of Clickfunnels.
<script>
(function() {
document.querySelectorAll('.elButtonMain').forEach(function(btn) {
btn.addEventListener('click', function(el) {
try {
document.querySelectorAll(".containerInner input[type=text], input[type=email]").forEach(function(input) {
var val = input.value;
if(/\S+@\S+\.\S+/.test(val)) {
LeadDyno.recordLead(val);
}
})
} catch (e) {
console.log(e);
}
});
});
})();
</script>
Afterward, to ensure that your latest changes get saved, please go to the bottom of the page in Clickfunnels and click on the "Save and Update Settings" button.
At this point, the visitor&leads from your Clickfunnels website will get tracked with LeadDyno.
Clickfunnels 2.0
LeadDyno also supports Clickfunnels 2.0. Please note that the same scripts as above apply. The only change is that under your Code session you will have to place it on the Header Code
and Footer Code
as seen in the image below.
Header Code
<script type="text/javascript" src="https://static.leaddyno.com/js"></script>
<script>
LeadDyno.key = "YOUR_PUBLIC_KEY"
LeadDyno.recordVisit();
LeadDyno.autoWatch();
</script>
The "YOUR_PUBLIC_KEY" part will need to be replaced with your LeadDyno public key which can be found in the Account - Profile section of LeadDyno.
Footer Code
<script>
(function() {
document.querySelectorAll('.elButtonMain').forEach(function(btn) {
btn.addEventListener('click', function(el) {
try {
document.querySelectorAll(".containerInner input[type=text], input[type=email]").forEach(function(input) {
var val = input.value;
if(/\S+@\S+\.\S+/.test(val)) {
LeadDyno.recordLead(val);
}
})
} catch (e) {
console.log(e);
}
});
});
})();
</script>
Configuring the purchase tracking
In order to track purchases from your Clickfunnels website with LeadDyno, you can use one of the 3 methods presented in our installation guide.
Enabling AutoApprove (Optional)
Because the purchase information is coming from the LeadDyno javascript library, purchases must be approved before affiliate commissions are generated. If you find this a hassle and want to simply automatically approve purchases, you can enable “AutoApprove” of purchases by clicking the “AutoApprove” button on the purchase screen in LeadDyno:
Limitations / Known Issues
We recommend disabling express checkout options (such as Google Pay, ShopPay, AmazonPay) as the purchases made through express checkout will get tracked, but the affiliate referral most likely won't. This is due to the fact that the express checkout forms are hosted by iframe elements that can't be penetrated by Javascript, so the LeadDyno code can not interact with it and ensure that the lead is tracked when the purchase is made.