This page shows how to integrate your site with Afflixo (script + conversion).
Add this in your <head> (script loads from current origin — e.g. this page’s domain — so it works locally and in production):
Loading…
Checking…
Visitors arriving with ?ref=CODE or /ref=CODE get a cookie set. Current affiliate code from cookie: —
Conversions need an affiliate. Normally the visitor arrives via ?ref=CODE and the cookie is set; here you can enter an affiliate code to test without a referral visit (get a code from the merchant’s affiliate dashboard).
Affiliate code (optional — from cookie if you came via ?ref=CODE, or type one to test):
Parameters: orderId, amount (required); currency, affiliateCode, transactionId, email, productName, note (optional). Copy to your order confirmation page:
if (window.Affiliate.getAffiliateCode()) {
window.Affiliate.trackConversion({
orderId: 'YOUR_ORDER_ID', // required
amount: 99, // required (number)
currency: 'USD', // optional, default 'USD'
affiliateCode: undefined, // optional, uses cookie if omitted
transactionId: undefined, // optional
email: undefined, // optional
productName: undefined, // optional
note: undefined // optional, max 1000 chars
})
.then(function() { /* success */ })
.catch(function(err) { console.warn('Conversion track failed', err); });
}