Build your own thank-you and share page
KickoffLabs pages already include a post-signup view with the lead’s share link, points and rank. If you’d rather send people to a page on your own site, you can build it yourself with the kol.js campaign script. It’s safe to do in the browser: the page never needs your API key, and it only gets the public parts of the lead’s record.
Download the sample page (one HTML file, no build step).
How it works
Section titled “How it works”- Someone signs up on your KickoffLabs page, ContestBox or AnyForm.
- KickoffLabs sends them to your page and adds
?kolid=SHARE_IDto the URL. - kol.js on your page reads
kolid, saves it in a cookie, and loads that lead’s public details. - Your page shows those details: name, spot, referrals, points and share link.
The cookie means the page still works when they come back later without kolid in the URL.
Set it up
Section titled “Set it up”- Download the sample and replace
YOUR_CAMPAIGN_IDwith your campaign id. You’ll find it in your campaign’s dashboard URL (/campaigns/123456/) and in the campaign script under Pages & forms → AnyForm bridge. - Change the copy, colors and the “Go to the signup page” link to match your site.
- Upload the page to your site, for example
https://yoursite.com/thanks. - In KickoffLabs, open Pages & forms → Shared settings → Share & redirect. Set Default post-signup destination to Custom URL, paste your page’s URL into Custom redirect URL, and save. A page with its own post-signup redirect uses that instead, so check each page’s Post-signup confirmation too.
- Publish, sign up with a test email in a private window, and check that you land on your page with your name and share link showing.
What the page can read
Section titled “What the page can read”kol.js gives your page the lead’s public record. These are the useful fields:
| Field | What it is |
| --- | --- |
| first_name | First name, if you collect it |
| social_url | Their personal share link |
| social_id | Their share id (the kid in the share link) |
| contest_score | Points |
| contest_score_rank | Spot when ranked by points |
| rank | Spot by signup order |
| referrals | Friends who signed up from their link |
| lead_count | Total signups in the campaign |
| waitlisted | Whether they’re still on the waitlist |
| completed_actions | Ids of bonus actions they’ve completed |
Email, phone number, last name, custom fields, tags and UTM data are never sent to the browser this way. If you need those, look the lead up from your own server with the Leads API and your API key, or receive them with an outbound webhook.
Use the lead in your own code
Section titled “Use the lead in your own code”kol.js fires browser events you can listen for. Add your listeners before kol.js finishes loading (the sample adds them in a script at the end of the page, and kol.js loads async).
// The visitor is a known lead (from ?kolid= or the cookie)window.addEventListener('kol:knownlead', function (event) { var lead = event.detail.lead document.getElementById('name').textContent = lead.first_name || ''})
// The lead's details changed, for example after a signup on this pagewindow.addEventListener('kol:leadchange', function (event) { var lead = event.detail.lead})
// No signup found for this visitorwindow.addEventListener('kol:anonymouslead', function () { // show a "sign up first" message})After kol.js has loaded, window._kol.currentLead also holds the known lead.
Keep it secure
Section titled “Keep it secure”- Never put your API key in a web page. Anyone can read page source. The sample doesn’t use one, and it doesn’t need one.
- Use
textContent, notinnerHTML, when you show names. Names are typed in by your visitors. - Check the share link is a web link (
https://orhttp://) before you put it in a link or button, so ajavascript:value can never run. The sample does this. - Don’t add
{{email}}to the redirect URL. URLs end up in browser history, analytics and server logs. KickoffLabs fills it in only with the email the visitor just submitted, and leaves it blank when a returning visitor is recognized by their link.kolidis all this page needs. - Treat the share id as public. It’s in every share link, so don’t use it to unlock anything private.
Share buttons
Section titled “Share buttons”The sample builds its own share links for X, Facebook, WhatsApp, LinkedIn and email, and adds a Share… button that opens the phone’s share sheet where the browser supports it. Referral credit comes from the share link itself, so these buttons don’t need to report anything back to KickoffLabs.
Troubleshooting
Section titled “Troubleshooting”- The page says “Join the list first” right after signing up. Check the URL has
?kolid=. If it doesn’t, the redirect isn’t going through KickoffLabs: check the post-signup destination settings above. - Nothing loads. Open the browser console. Check the campaign id in the script tag, and that an ad blocker isn’t blocking
b.kickoffpages.com. - The numbers look old. kol.js caches the lead for a short time. Reload the page after a minute.
Need help? Email support@kickofflabs.com with your page URL and a test lead email.