How to get leads from referral links?

Referral links (or affiliate links) in Kiflo can be used to track visitors and leads from your website. Leads are automatically associated with the partner who referred them. It works just like an affiliate platform.

You have many ways to build and connect a lead form to your Kiflo account. This article covers the different possibilities and will help you choose the best option depending on your tech stack.

In this article

For custom websites

This section covers how to connect a lead form to Kiflo when you have a custom-made website (HTML/Javascript).

Step 1: Install Kiflo tracking code

First things first, you need to install the Kiflo javascript snippet on your website. It is similar to Google Analytics snippet and will handle:

  • Tracking cookies for visitors and leads
  • Communication between your website and your Kiflo account

To install the Kiflo javascript snippet, please refer to this page:

Step 2: Build your custom lead form

Be sure to have completed the previous step before connecting the lead form.

Depending on your tech stack you have many ways to build forms. We won't cover all the details for all JS frameworks but instead, give you guidelines you can adapt to your use cases.

Here is an example of a lead form using pure HTML:

<form method="post" onsubmit="sendLeadToKiflo(); return false;">
    <input type="text" placeholder="Firstname" id="firstname">
    <input type="text" placeholder="Lastname" id="lastname">
    <input type="email" placeholder="Email" id="email">
    <input type="text" placeholder="Company Name" id="companyName">
    <button type="submit">Submit</button>

You can of course customize it to ask for additional information. If you do so, you will need to customize lead properties in Kiflo to match the fields in the lead form.

And here is an example of how you can connect this form with Kiflo:

function sendLeadToKiflo() {
    var firstname = document.getElementById('firstname').value;
    var lastname = document.getElementById('lastname').value;
    var email = document.getElementById('email').value;
    var companyName = document.getElementById('companyName').value;
    kiflo('lead', {
        status: 'Pending',
        properties: {
            firstName: firstname,
            lastName: lastname,
            email: email,
            companyName: companyName
    () => {
      /* Handle success */
   (err) => {
      /* Handle error */

You can find more details on how to use the kiflo('lead', ...) function on this page:

For WordPress websites

We have a dedicated Kiflo plugin for WordPress to offer you a seamless way to track leads, checkout:

For external forms (HubSpot forms, Typeform, etc)

For HubSpot Forms, please refer to the dedicated page

For any other integrations, please contact the support:

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