Tracking Clicks & Conversions with GTM and the API
Updated August 5, 2026
How Click ID Tracking Works
Influise uses server-side click ID tracking. Each influencer gets a redirect link ({brandSlug}.influise.com/c/{slug}) that records a click server-side and appends a unique clid to the destination URL.
- Influencer shares their tracking link. A visitor clicks it.
- Our server records a Click and redirects to your destination URL with
?clid={clickId}&utm_source=...appended. - GTM Tag 1 (All Page Views) reads
clidfrom the URL and stores it in a persistent cookie. - When a conversion happens, the Influise Conversion template (Tag 2, Pixel mode) reads the cookie automatically and fires a pixel to
/api/conversion. - Influise validates the click, attributes the conversion to the right influencer (and campaign if applicable), and deduplicates by
customerId.
Set a Workspace URL in Settings (e.g.mybrand) before tracking links are generated. Your links will then bemybrand.influise.com/c/their-slug.
Tag 1 — Store the Click ID Cookie
Trigger: All Page Views. Use Custom HTML or the GTM template.
(function() { var clid = new URLSearchParams(window.location.search).get('clid'); if (clid) document.cookie = 'influise_clid=' + encodeURIComponent(clid) + '; path=/; max-age=31536000; SameSite=Lax'; })();
This stores the clid in a 1-year cookie. If the visitor arrives via a new tracking link, the cookie is overwritten — last-click attribution. You can also download the Influise Click ID Cookie GTM template from the Integrations page.
Tag 2 — Influise Conversion (GTM Tag Template)
Tag 2 uses an importable GTM Tag Template — no JavaScript to write. Download it from the Integrations page and import via GTM → Templates → Tag Templates → New → ⋮ → Import. Set Send Mode to Pixel. The influise_clid cookie is read automatically — fill in:
- Send Mode — Pixel (send directly to Influise)
- API Key — your Influise API key (pre-filled on the Integrations page)
- Customer ID — GTM variable for a stable unique customer identifier
- Conversion Value — GTM variable for order value (leave blank to use influencer default)
- Payment / Order ID — GTM variable for a unique order ID (prevents double-counting in Every conversion mode)
- Endpoint URL — optional first-party proxy URL for adblocker bypass
If a cookie is found, the pixel sends clickId for standard attribution. With no cookie, it falls back to customerId + paymentId lookup. It exits silently if neither a cookie nor a Customer ID is available.
Direct API (without GTM)
Standard conversion — customer arrived via a tracking link:
POST /api/conversion with header X-API-Key: <your API key> and body { "clickId": "<clid value>", "customerId": "<id>", "conversionValue": 500 }
Recurring or cross-device — no new click:
POST /api/conversion with body { "customerId": "<same id as first conversion>", "paymentId": "<unique payment id>", "conversionValue": 500 }
clickId is optional — omit it for recurring or cross-device events; the original influencer is looked up from the customer's first recorded conversion. paymentId is required when clickId is absent and Every conversion mode is enabled.
Key Notes
- Your API key is on the Settings page. Keep it secret — it never needs to leave your server.
- The
influise_clidcookie persists for 1 year and is overwritten on each new tracking link visit. - Conversions outside a configured attribution window are rejected.
- A native WordPress / WooCommerce plugin is available from the Integrations page for automatic purchase and registration tracking without GTM.