EF.click() / EF.conversion() calls or add custom logic around them. They build on the basics in Click Tracking and the Tracking Recipes.
Click and conversion on the same page
When a single page load needs to record both a click and a conversion — for example a Meta “PageView” that should attribute the click and immediately convert — fire the conversion inside the click’s.then(), so it runs only after the click resolves with a transaction ID. A short setTimeout adds a safety margin.
Chaining the conversion inside
.then() already guarantees it runs after the click is recorded (the promise resolves with the transaction ID). The setTimeout is an extra safeguard so the conversion never races ahead of the click on slow connections.Chaining across multiple Everflow accounts
This extends the EF-to-EF recipe to more than two accounts. Each hop fires a click against its owntracking_domain; the transaction ID returned by one hop is passed into the next hop’s sub5 (or sub2), which the downstream account reads back via a Partner Postback.
Three accounts deep (Advertiser → Partner → Sub-Partner)
The chain fires inside-out: the sub-partner click resolves first, its transaction ID becomes the partner click’ssub2, and the partner’s transaction ID becomes the advertiser click’s sub5.
- Partner Postback (advertiser account):
&transaction_id={sub5} - Sub-Partner Postback (partner account):
&transaction_id={sub2}
Each hop reserves a sub-placement (
sub5, then sub2) to carry the upstream transaction ID. Plan your sub usage so the chain doesn’t overwrite a sub you need for reporting.Parallel partners
When one advertiser works with several independent partners on the same page (Partner A viaaffid2, Partner B via affid3) rather than a nested chain, the structure is the same if / else if / else shape — each branch fires the matching partner’s click, then chains the advertiser click with the partner’s transaction ID in sub5. Use whichever partner parameter (affid2, affid3, …) is present on the inbound URL to select the branch.
Preventing duplicate clicks with a global script
When the click script is placed globally (on every page) and the landing page’s URL parameters are “sticky” (persist across navigation), the same partner’s click can fire more than once — so the last-touch transaction may not be the one that converts. Deduplicate by comparing the inboundaffid against the ef_affid first-party cookie the SDK writes on every successful click, and only fire when they differ.
Logic:
- Direct linking — if
affid(URL) ≠ef_affid(cookie) → fire the click; if they match → skip it. - Redirect — always fire.
This prevents duplicate clicks within the same partner. If Partner A’s link is clicked and then Partner B’s, Partner B still gets a fresh transaction ID — last-touch attribution is preserved across different partners.
