Skip to main content
The EF.conversion() method fires a conversion event and returns a Promise that resolves with both the conversion ID and transaction ID.

Basic Usage

Parameters

Attribution fallback: when transaction_id is not supplied, the SDK attempts to locate it automatically by checking — in order — (1) the first-party cookie on the current page’s domain, then (2) the third-party cookie on the tracking domain. Passing transaction_id explicitly (for example, from EF.getTransactionId(offer_id)) is always more reliable than relying on cookie lookup.

Return Value

Returns a Promise resolving with an object containing conversion_id and transaction_id:

Examples

Sale conversion with amount:
Post-conversion event:
Using advertiser ID instead of offer ID:
Passing currency: the SDK sends the sale value through amount, but currency is not a native field. Pass it through parameters so it reaches the server postback (for example, when the advertiser converts the amount to the offer’s default currency):
Use the standard three-letter currency code (USD, EUR, etc.). Passing a timestamp: conversion timestamps aren’t supported natively. Pass a UNIX timestamp through parameters: