Skip to content

Add data-stub-attribution-campaign-force to clear cookie and re-attri…#1206

Open
slightlyoffbeat wants to merge 1 commit intomainfrom
data-stub-force
Open

Add data-stub-attribution-campaign-force to clear cookie and re-attri…#1206
slightlyoffbeat wants to merge 1 commit intomainfrom
data-stub-force

Conversation

@slightlyoffbeat
Copy link
Copy Markdown
Contributor

Introduces a third data attribute option for stub attribution campaign control.

When data-stub-attribution-campaign-force is set on a page, any existing attribution cookie is invalidated and a fresh attribution request is made, ensuring the forced campaign value is always captured, even if the user visited another page first.

The three tiers are now:

  • data-stub-attribution-campaign: fallback when no utm_campaign in URL
  • data-stub-attribution-campaign-override: wins over URL params, respects cookie
  • data-stub-attribution-campaign-force: wins over URL params AND clears cookie

…bute

Introduces a third data attribute option for stub attribution campaign control.

When data-stub-attribution-campaign-force is set on a page, any existing attribution cookie is invalidated and a fresh attribution request is made, ensuring the forced campaign value is always captured, even if the user visited another page first.

The three tiers are now:
- data-stub-attribution-campaign: fallback when no utm_campaign in URL
- data-stub-attribution-campaign-override: wins over URL params, respects cookie
- data-stub-attribution-campaign-force: wins over URL params AND clears cookie
@maureenlholland maureenlholland added the Needs Review Awaiting code review label Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review Awaiting code review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants