<head>. Once installed, it automatically tracks every visitor who arrives through a partner’s referral link and stores their referral code in a first-party browser cookie. You can then use the SDK’s methods to attribute sign-ups, leads, and sales back to the right partner — no backend code required for most common workflows.
Install the snippet
1
Copy your snippet from Kiflo
- Log in to your Kiflo account.
- Click your name in the upper-right corner and select Account.
- In the left menu, click Integration.
- Copy the JavaScript snippet displayed on the page — it is pre-populated with your own
apiKey, so you do not need to modify it.
2
Paste the snippet into your website
Paste the snippet inside the Replace
<head> tag of every page on your website. If you use a tag manager, you can deploy it through Google Tag Manager as a Custom HTML tag.YOUR_API_KEY with the value from your Kiflo Integration settings (Kiflo pre-fills this for you when you copy the snippet directly from the dashboard).3
Verify your installation
Go back to Kiflo and click Verify your installation in the Integration section. Kiflo will check whether the snippet is detected on your domain.If your URL is not yet on the authorized list but the snippet is detected, Kiflo will prompt you to add it to the list of authorized URLs. Authorize your domain to complete the setup.
Advanced: cross-subdomain tracking
By default, Kiflo sets the tracking cookie on the exact domain where the snippet runs. If you host different parts of your funnel on separate subdomains (for example, a marketing site onlanding.example.com and a sign-up form on app.example.com), you need the cookie to be accessible across all of them.
Use the useDomain parameter to pin the cookie to your root domain so every subdomain can read it:
useDomain to your root domain (e.g., "example.com") — not a subdomain. Deploy this version of the snippet on every subdomain you want to participate in tracking.
Remember to update both
YOUR_API_KEY and "example.com" in the snippet. If you copy the snippet from the Kiflo dashboard, the apiKey is already filled in — only add useDomain manually.Cookie and GDPR
The Kiflo JS SDK stores a first-party cookie namedkfl_key on your domain for up to 30 days. This cookie tracks referral partner attribution. If your website serves visitors in the EU, update your Cookie Policy to include this cookie under the Functional / Tracking (referral attribution) category.
Next steps
Now that the SDK is installed, connect your forms to Kiflo:- Create a Customer — attribute sign-ups to the source partner and trigger rewards on conversion.
- Create a Lead — record demo requests and other qualified leads with their referring partner.
- Create a Partner — connect your partner application form so new partners are created directly in Kiflo.
