Skip to main content

Logging Order and Revenue Data

Updated over 3 weeks ago

By sending order data to Triggerbee, you will be able to analyze how your campaigns are performing in terms of generating sales.

Logging order data to Triggerbee can be done in two ways:

  • Using one of our Integration Apps, for example, Centra or Shopify.

  • Scripting order data using the Triggerbee script API

Log Order Data via Triggerbee Javascript API

On your Orderconfirmation page, call the Triggerbee javascript API using the event method like this:

triggerbee.event({ 
type: 'purchase',
id: 123,
data: {
revenue: 1500
}
})

Revenue should be entered in same currency as in your Triggerbees account setting. The ID (123 in example) can be Order ID or any unique ID associated with purchase.

Note: Only use dots to separate decimals in the revenue variable.

Correct example:

triggerbee.event({
type: 'purchase',
data: {
couponCode: 'welcome15',
revenue: 1500.0,
identity: {
email: '[email protected]'
}
}
});

Incorrect example:

triggerbee.event({
type: 'purchase',
data: {
couponCode: 'welcome15',
revenue: 1500,0,
identity: {
email: '[email protected]'
}
}
});

Setting identity

You should also pass the identity of the customer to the event in the data object. And optionally, if a coupon code / voucher was used, pass it along so that Triggerbee can calculate attribution on campaigns.

A more complete example would be like this:

triggerbee.event({ 
type: 'purchase',
id: 123, // Order ID or similar
data: {
couponCode: 'welcome10',
revenue: 1500,
identity: {
email: '[email protected]',
firstname: 'John',
lastname: 'Doe'
}
}
});
Did this answer your question?