How Tracking Works
Understand the end-to-end click tracking, attribution, and commission pipeline.
Drapier uses server-side click tracking combined with client-side attribution to connect publisher referrals to completed purchases. This page explains every step from the moment a consumer clicks a link to when a commission is created.
Overview
The tracking pipeline has three phases:
- Click tracking — Record the click and redirect the consumer to the product page.
- Attribution — Store the click ID on the consumer's browser so it persists through the shopping session.
- Commission creation — When a purchase occurs, match the order back to the originating click and create a commission.
The click flow
sequenceDiagram
participant User
participant Publisher as Publisher Site
participant IN as Drapier
participant Store as Brand Storefront
participant Script as Attribution Script
Note over User,Script: Phase 1 — Click Capture
User->>Publisher: Views affiliate content
User->>IN: Clicks tracking link
IN->>IN: Records click
IN-->>User: Redirects to product page
Note over User,Script: Phase 2 — Attribution
User->>Store: Lands on product page
Store->>Script: Attribution script runs
Script->>Script: Stores click ID in cookie + localStorage
Script->>Store: Attaches click ID to cart
Note over User,Script: Phase 3 — Purchase & Commission
User->>Store: Browses, adds to cart, checks out
Store->>IN: Order placed (with click ID)
IN->>IN: Matches order to click, creates commissionStep by step
1. Consumer clicks a tracking link
The publisher places a link on their site in the format:
https://click.drapier.io/{publisher_id}/{product_id}?sub_id={optional}When a consumer clicks this link, Drapier records the click and redirects the consumer to the product page.
2. Click is recorded
The system records the click with your publisher ID, the product ID, an optional sub-ID, the referring page, and a timestamp. Click records expire automatically after 30 days, matching the attribution window.
3. Consumer is redirected to the product page
The consumer is immediately redirected to the product page on the brand's storefront with a click ID appended to the URL:
https://italist.com/us/women/bags/handbags/prada-galleria/12345?icg_click=01J5K8M2N3P4Q5R64. Attribution script stores the click ID
Each brand storefront (Italist, HEWI, Verishop) includes a lightweight attribution script that runs on every page. When the page loads, the script:
- Checks the URL for an
icg_clickparameter. - If found, stores the click ID in both a first-party cookie (
_icg_click) andlocalStorage. - The cookie has a 30-day expiry matching the attribution window.
This dual-storage approach ensures the click ID survives common scenarios like cookie clearing or private browsing mode switching.
5. Consumer makes a purchase
During checkout, the attribution script reads the stored click ID and attaches it to the order. This value travels with the order through the checkout flow.
6. Commission is created
When the order is placed:
- Drapier receives the order details along with the click ID.
- The system looks up the click to identify the publisher.
- If the click is valid and within the 30-day window, a commission is created in
PENDINGstatus. - The commission links you, the order, and the click together.
Server-side vs. client-side tracking
Drapier uses a hybrid approach:
| Layer | What it does | Why |
|---|---|---|
| Server-side | Records every click | Reliable, not affected by ad blockers or browser restrictions |
| Client-side (Attribution script) | Stores click ID on the consumer's browser | Bridges the gap between click and purchase across page navigations |
The server-side component ensures every click is recorded accurately. The client-side component connects a purchase back to the originating click, even if the consumer browses multiple pages or returns later.
Privacy
- No raw IP addresses are stored. IP addresses are hashed before storage and the originals are discarded immediately.
- First-party cookies only. The attribution script uses a first-party cookie scoped to the brand's domain. No third-party cookies are set.
- No fingerprinting. Attribution relies on explicit click IDs, not browser fingerprinting or probabilistic matching.
- Automatic expiration. Click records and cookies both expire after 30 days.
- Cookie consent. The attribution script respects the storefront's cookie consent mechanism. If a consumer declines tracking cookies, the click ID is only stored in
localStorage(which does not require consent under most regulations).