Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f0d118a
Update integrationCapture.ts to include Pinterest
jciafardone Dec 6, 2025
20e5c56
test: add Pinterest _epik click ID tests
jciafardone Dec 9, 2025
6b060f0
test: add Pinterest _epik tests for cookies and localStorage
jciafardone Dec 9, 2025
e11cf61
Update src/integrationCapture.ts
jciafardone Dec 17, 2025
2dfa771
feat: add support for Pinterest epik parameter (without underscore)
jciafardone Dec 17, 2025
0097412
Merge branch 'development' into patch-1
jciafardone Jan 13, 2026
fd32377
Update integrationCapture.ts
jciafardone Jan 13, 2026
6f8b9f5
Update integrationCapture.ts
jciafardone Jan 16, 2026
f0da933
Apply suggestion from @rmi22186
jciafardone Mar 7, 2026
db0f071
Fix epik/_epik Pinterest.click_id test: accept either key name and as…
jciafardone Mar 7, 2026
ec2971b
test: assert Pinterest.click_id in integration capture suite
jciafardone May 14, 2026
6e95191
test: dedupe Snapchat/Pinterest custom flag assertions for Sonar
jciafardone May 14, 2026
a2e669a
test: reduce Sonar duplication in integration capture suite
jciafardone May 14, 2026
59255fd
test: further dedupe integration capture suite for Sonar
jciafardone May 14, 2026
67e887a
test: data-driven integration capture cases for Sonar duplication
jciafardone May 14, 2026
4cc9fa8
fix(test): repair Pinterest epik/_epik Jest test and #getClickIdsAsCu…
jciafardone May 14, 2026
53288fd
fix(test): use globalThis instead of window for Sonar
jciafardone May 14, 2026
ad190b7
fix(test): drop redundant .0 from commerce Revenue literal
jciafardone May 14, 2026
63f81ac
fix(test): use globalThis in tests-integration-capture for Sonar
jciafardone May 14, 2026
84979c4
fix(integrationCapture): close _epik mapping before _scid
jciafardone May 14, 2026
ef32e83
test(integration-capture): clarify epik/_epik custom flag collision test
jciafardone May 14, 2026
63d6c75
fix(integrationCapture): dedupe Pinterest epik/_epik by source priority
jciafardone May 14, 2026
48c78fe
test(integration-capture): dedupe Jest setup for Sonar duplication
jciafardone May 14, 2026
0e4f824
fix(test): drop redundant cast in clickIdsAfterFullCaptureAllMode
jciafardone May 14, 2026
c5abf7d
revert(test): use window instead of globalThis in integration capture…
jciafardone May 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions src/integrationCapture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,19 @@ const integrationMappingExternal: IntegrationIdMapping = {
mappedKey: 'SnapchatConversions.ClickId',
output: IntegrationOutputs.CUSTOM_FLAGS,
},

// Pinterest
// https://developers.pinterest.com/docs/track-conversions/track-conversions-in-the-api/
// https://help.pinterest.com/en/business/article/pinterest-tag-parameters-and-cookies
epik: {
mappedKey: 'Pinterest.click_id',
output: IntegrationOutputs.CUSTOM_FLAGS,
},
_epik: {
mappedKey: 'Pinterest.click_id',
output: IntegrationOutputs.CUSTOM_FLAGS,
},

// Snapchat
// https://developers.snap.com/api/marketing-api/Conversions-API/UsingTheAPI#sending-click-id
_scid: {
Expand Down Expand Up @@ -182,6 +195,26 @@ export default class IntegrationCapture {
delete cookies['_fbc'];
}

// Pinterest Rules
// epik and _epik both map to Pinterest.click_id. Prefer query params over
// localStorage and cookies (same rationale as Facebook fbclid vs _fbc).
// https://help.pinterest.com/en/business/article/pinterest-tag-parameters-and-cookies
const hasPinterestQuery =
!isEmpty(queryParams['epik']) || !isEmpty(queryParams['_epik']);
if (hasPinterestQuery) {
delete cookies['epik'];
delete cookies['_epik'];
delete localStorage['epik'];
delete localStorage['_epik'];
} else {
const hasPinterestLocalStorage =
!isEmpty(localStorage['epik']) || !isEmpty(localStorage['_epik']);
if (hasPinterestLocalStorage) {
delete cookies['epik'];
delete cookies['_epik'];
}
}

// ROKT Rules
// If both rtid or rclid and RoktTransactionId are present, prioritize rtid/rclid
// If RoktTransactionId is present in both cookies and localStorage,
Expand Down
Loading
Loading