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

EF.conversion({
  offer_id: 1
});

Parameters

ParameterTypeRequiredDescription
offer_idintegerOne of offer_id or aid requiredThe offer identifier
aidintegerOne of offer_id or aid requiredThe advertiser identifier
transaction_idstringNoEverflow transaction ID (improves attribution accuracy)
amountnumberNoSale amount (for Revenue Per Sale offers)
event_idintegerNoEvent identifier for post-conversion events
adv_event_idintegerNoGlobal advertiser event identifier
coupon_codestringNoPromotional code
order_idstringNoOrder reference ID
user_idstringNoUser tracking identifier
verification_tokenstringNoRequired if advertiser uses verification tokens
emailstringNoContact email
adv1adv5stringNoAdvertiser placement values
parametersobjectNoFree-form custom key–value parameters

Return Value

Returns a Promise resolving with an object containing conversion_id and transaction_id:
EF.conversion({
  offer_id: 1,
  amount: 29.99,
  event_id: 11
}).then(function(conversion) {
  console.log('Conversion ID:', conversion.conversion_id);
  console.log('Transaction ID:', conversion.transaction_id);
});

Examples

Sale conversion with amount:
EF.conversion({
  offer_id: 1,
  amount: 49.99,
  order_id: 'ORD-12345',
  transaction_id: EF.getTransactionId(1)
});
Post-conversion event:
EF.conversion({
  offer_id: 1,
  event_id: 3,
  transaction_id: EF.getTransactionId(1)
});
Using advertiser ID instead of offer ID:
EF.conversion({
  aid: 2,
  amount: 9.99
});