---
title: "TikTok click ID (ttclid) lost on Webflow"
description: "The ttclid from TikTok ad clicks is not saved in the ttclid cookie on your Webflow site. Check Webflow 301 redirects, locales, consent and the pixel setup."
updated: "2026-10-23"
url: "https://ispixelworking.com/guides/tiktok.click_id_not_set/webflow"
---

# TikTok click ID (ttclid) lost on Webflow

Fix guide · Webflow · medium · about 30 min · updated 2026-10-23

For the finding “Click ID from TikTok ads is not stored” (`tiktok.click_id_not_set`).
Also for: [Any website](https://ispixelworking.com/guides/tiktok.click_id_not_set/generic), [Shopify](https://ispixelworking.com/guides/tiktok.click_id_not_set/shopify), [WordPress](https://ispixelworking.com/guides/tiktok.click_id_not_set/wordpress), [Framer](https://ispixelworking.com/guides/tiktok.click_id_not_set/framer).

## What this means

When someone clicks a TikTok ad, TikTok adds a click ID to the landing page address: `?ttclid=...`. The TikTok Pixel on your Webflow site should read it and store it in a first-party cookie that is also named **`ttclid`**, so that a lead or purchase later can be tied back to the ad click. On your site, the click ID did not make it into that cookie, or was not sent with the pixel's events.

Why it costs you money:

- TikTok has a weaker link between ad clicks and conversions, which lowers attribution and reported results.
- Campaigns optimize on less complete data, so you may pay more per result.
- If you send server events through the TikTok Events API, they usually take the click ID from the same cookie, so they lose it too.

## How to confirm it yourself

Our check opens your page in a browser in the EU as if arriving from a TikTok ad, with a test click ID in the URL, accepts the cookie banner and then looks for the click ID. If our report shows a **redirect chain**, start there: it often shows exactly where the click ID was dropped.

1. Open a **private (incognito) window**, open developer tools (F12) on **Network**, and tick *Preserve log*.
2. Open the exact URL your ads use, with a made-up click ID added: `https://yourdomain.com/landing?ttclid=test123`. (This sends a normal page view to your own pixel. It does not create an ad click.)
3. If the first request is a redirect (`301`, `302`, `307`, `308`), check its **Location** header. Does the new address still contain `ttclid=test123`?
4. Accept the cookie banner, wait a few seconds, then go to **Application > Cookies** (Chrome) or **Storage > Cookies** (Firefox) and look for `ttclid`. It should hold `test123`. You should also see `_ttp`, the pixel's browser ID.

## How to fix

Work through the chain: the link must arrive with `ttclid`, the pixel must run on that page, and it must be allowed to write first-party cookies.

1. **Point your ads at the final address.** Webflow redirects your other connected domains (for example the version without `www`) to the default domain, set in **Site settings > Publishing > Production** with **Make default**. In our tests on Webflow-hosted sites, Webflow also redirected `http` to `https` and removed a trailing slash from page addresses, and all of these redirects kept the query string. Still use the exact final address in every ad (default domain, `https`, no trailing slash), so the visitor lands without a redirect.
2. **Do not send ads through Webflow 301 redirects.** In our tests, redirect rules from **Site settings > Publishing > 301 redirects** sent visitors to the new address **without** the query string, so `?ttclid=...` was lost before the pixel could run. This includes the redirect Webflow creates when you change a page's slug and tick **Permanently redirect the old URL to this new one**. Check every ad URL against your redirect list, and update ads to link to the new page directly.
3. **Check localized pages.** Webflow's 301 redirects do not apply to localized subdirectories, so `/es/old-url` needs its own rule, and that rule is a 301 redirect like the others: keep it out of ad URLs too. The automatic routing to a visitor's preferred locale (on Localize plans that include it) uses a `302` redirect; in our test it kept the query string, but link ads for a given language to that locale's URL anyway.
4. **Check redirects outside Webflow**, such as a domain registrar's forwarding, rules in a proxy or CDN in front of the site, link shorteners or campaign link tools. These commonly drop the query string. TikTok notes the click ID can be up to 1,000 characters long; do not truncate it.
5. **Check scripts that clean the address bar.** A script that removes query parameters after the page loads (for example Finsweet's **removequery** Attribute, or custom "clean URL" code) can erase `ttclid` before a consent-gated pixel starts. Remove it from landing pages. Keep the TikTok base code early in **Site settings > Custom code > Head code**, as TikTok recommends.
6. **Make sure the pixel runs on the landing page after consent.** The pixel reads `ttclid` from the address of the page it runs on. If it only starts on the next page, `ttclid` is no longer in the address. With TikTok's consent commands, `ttq.grantConsent()` must run right after Accept on the same page; with a consent tool that blocks the script, it must release the script without a reload; with GTM, the TikTok tags must fire on the consent event, not only on the next page view. See "TikTok Pixel does not fire after consent".
7. **Check that first-party cookies are on.** In TikTok Events Manager, open **Tools > Events > Data sources**, select your pixel and open the **Settings** tab. First-party cookies are on by default, but can be switched off there; when they are off, no new first-party cookies are set.
8. **Check that your consent tool keeps the cookie.** After Accept, `ttclid` and `_ttp` should stay, including on the next page. Some tools delete cookies when the visitor changes preferences; Finsweet's older Cookie Consent documents that it erases cookies in that case.
9. **Pass the click ID to your server events.** If you forward Webflow form submissions to the Events API from a webhook or automation, your server never sees the visitor's cookies. Add two hidden text inputs to the form, named `ttclid` and `ttp`, and fill them from the cookies when the form is submitted, for example in **Footer code**:

   ```html
   <script>
     function cookieValue(name) {
       var m = document.cookie.match('(?:^|; )' + name + '=([^;]*)');
       return m ? decodeURIComponent(m[1]) : '';
     }
     document.querySelectorAll('form').forEach(function (form) {
       form.addEventListener('submit', function () {
         var clickId = form.querySelector('input[name="ttclid"]');
         var browserId = form.querySelector('input[name="ttp"]');
         if (clickId) clickId.value = cookieValue('ttclid');
         if (browserId) browserId.value = cookieValue('_ttp');
       });
     });
   </script>
   ```

   Then send the values as `user.ttclid` and `user.ttp` in the Events API event. Check a test submission in **Site settings > Forms** (or your webhook log) to confirm the fields arrive filled.
10. **Publish** to your custom domain after any change.

## Common causes

- Ads link to an old URL that Webflow now 301-redirects (often after a slug change), and the redirect drops the query string.
- A localized page needs its own redirect, or ads link to the primary locale and rely on routing.
- A registrar forwarding rule, proxy rule or link shortener in front of the site drops `ttclid`.
- A script removes query parameters from the address before the pixel starts.
- The pixel waits for consent and only starts on the next page.
- First-party cookies are switched off in the pixel's settings.
- Server events built from Webflow form webhooks carry no `ttclid` or `ttp`.

## How to verify the fix

1. Repeat the test above using the exact ad URL: no redirect drops `?ttclid=test123`, and after accepting cookies the `ttclid` cookie holds `test123`.
2. Open another page of the site: `ttclid` is still there.
3. Re-run the check on IsPixelWorking. The issue should be gone, and the redirect chain in the report (if any) should keep the click ID.

## Questions people ask

### Does the TikTok Pixel set first-party cookies on Webflow?

Yes. TikTok says the pixel stores the click ID in a first-party cookie named `ttclid` under your website's domain, and first-party cookies are on by default in the pixel's settings. You do not need a TikTok partner integration or a Webflow setting for that.

## Sources

- TikTok Business Help Center, TikTok Click ID (`ttclid` appended to landing page URLs): https://ads.tiktok.com/resources/help/article/tiktok-click-id?lang=en
- TikTok API for Business, Send TikTok Click ID (ttclid) (pixel stores it in a first-party cookie named `ttclid`, up to 1,000 characters, `user.ttclid`): https://business-api.tiktok.com/portal/docs?id=1771100879787009
- TikTok API for Business, Send TikTok Cookie (_ttp) (`user.ttp` from the `_ttp` cookie): https://business-api.tiktok.com/portal/docs?id=1771100936446977
- TikTok Business Help Center, Using cookies with TikTok Pixel (`ttclid` and `_ttp` first-party cookies, on by default, no new cookies when off): https://ads.tiktok.com/resources/help/article/using-cookies-with-tiktok-pixel?lang=en
- TikTok API for Business, Events API 2.0 setup guide for Web (first-party cookies in pixel Settings): https://business-api.tiktok.com/portal/docs?id=1771100865818625
- TikTok Business Help Center, TikTok Pixel Helper (place the pixel code early in the head): https://ads.tiktok.com/resources/help/article/tiktok-pixel-helper-2.0?lang=en
- TikTok API for Business, Pixel Cookie consent mode (`grantConsent`): https://business-api.tiktok.com/portal/docs?id=1795929012554754
- Webflow Help, How do I set up redirects in Webflow? (Site settings > Publishing > 301 redirects, slug-change redirects, localized subdirectories): https://help.webflow.com/hc/en-us/articles/33961294898835-How-do-I-set-up-redirects-in-Webflow
- Webflow Help, Set a default domain (Site settings > Publishing > Production, Make default): https://help.webflow.com/hc/en-us/articles/33961339571475-Set-a-default-domain
- Webflow Help, Localized SEO and locale routing (locale routing uses 302 redirects): https://help.webflow.com/hc/en-us/articles/33961235675155-Localized-SEO-and-locale-routing
- Webflow Help, Custom code in head and body tags (Head code, Footer code): https://help.webflow.com/hc/en-us/articles/33961357265299-Custom-code-in-head-and-body-tags
- Webflow Help, How do I add forms in Webflow? (webhooks, submissions in Site settings > Forms): https://help.webflow.com/hc/en-us/articles/33961347548563-How-do-I-add-forms-in-Webflow
- Finsweet Attributes, removequery ("Remove the URL query parameters from the URL after the page loads"): https://github.com/finsweet/attributes/tree/master/packages/removequery
- Finsweet Cookie Consent README (cookies erased when preferences change): https://cdn.jsdelivr.net/npm/@finsweet/cookie-consent@1/README.md
- IsPixelWorking live test, 2026-10-04 (responses served by Webflow hosting, with a click ID in the query string): non-default domain to default domain, `http://` to `https://` and `/page/` to `/page` (all `301`) and Webflow locale routing (`302`) kept the query string; custom 301 redirect rules on several sites dropped it.
