Skip to content

Persist awc as a cookie so it survives a new tab - #789

Open
vitorrgg wants to merge 2 commits into
mainfrom
fix/awin-conversion-tracking
Open

Persist awc as a cookie so it survives a new tab#789
vitorrgg wants to merge 2 commits into
mainfrom
fix/awin-conversion-tracking

Conversation

@vitorrgg

Copy link
Copy Markdown
Member

Awin's own "last click direto" test scenario (affiliate click, then
open a fresh tab and navigate directly) was losing the awc value
because it was only ever stored in sessionStorage, which a manually
opened tab does not inherit. The fallback-cookie read logic already
existed but nothing wrote that cookie — now it does.

vitorrgg and others added 2 commits July 20, 2026 19:16
…k pixel

- send-to-awin.ts: use the store's real currency instead of a hardcoded
  BRL fallback, fix a bug where product category was never actually sent
  (wrong field name), validate traffic channel against Awin's accepted
  values, and sanitize basket fields against forbidden pipe characters
- Add a client-side fallback conversion pixel, redundant to the existing
  server-to-server call, per Awin's tracking policy (packages/storefront)
- Expose the Awin advertiser ID to the storefront client for the pixel

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Awin's own "last click direto" test scenario (affiliate click, then
open a fresh tab and navigate directly) was losing the awc value
because it was only ever stored in sessionStorage, which a manually
opened tab does not inherit. The fallback-cookie read logic already
existed but nothing wrote that cookie — now it does.
@vitorrgg
vitorrgg requested a review from leomp12 July 30, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant