Install tracking scripts on your website
This documentation will guide you to implement Affilae Tracking.
➜ Go to step 2 if you use redirect tracking links.
- Implement Affilae Tag on every pages of your website. The Affilae Tag will allow you to track events such like clicks and conversions from your partners.
- Trigger the Conversion Tag when you want to track an event such like a sale or lead.
① Affilae Tag – Track clicks from your partners
Affilae Tag, which should be embedded on all pages of your website (or landing pages), detects clicks from affiliate websites and protect you from click fraud.
Notes:
- The Affilae Tag for your website is different for each program.
- The Affilae Tag must be added on every page of your website including confirmation page.
- The Affilae Tag must be added within the
head
section tag OR alternatively just after the openingbody
tag. - Verify your CSP configuration.
"default-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' https://static.affilae.com/; img-src 'self' https://static.affilae.com/ https://lb.affilae.com/; frame-src 'self' https://lb.affilae.com/; connect-src https://lb.affilae.com/"
How does it work?
- The Tag below starts asynchronously downloading the library from our domain
static.affilae.com
. - The Tag is initialized by the content of the variable
_ae
which is mandatory. - The Tag also creates
AeTracker
object to handle events like new click/conversion. - The Tag should look like the code below, please replace
PROGRAM_ID
with your own program ID.
➜ Affilae Tag extra settings
Variable | Required? | Description | Values |
---|---|---|---|
pid | Required | Unique id for your affiliate program. | This value is generated automatically and available on your program’s configuration page. |
advertiserFirst | Optional | The number of minutes elapsed from the first visit to the advertiser’s site which will be counted as being a part of the conversion process if “Split commission” sharing mode is active. | Integer value. Default: 26600 (15 Days). |
cookieExpiration | Optional | Expiration of the cookie to track clicks. | Integer value. Default: 43200 (30 Days). |
skipMouse | Optional | Disable mouse detection to trigger a click. | This value must be true or false .Default: false . |
timerLimit | Optional | Timer in seconds to detect mouse activity. | Integer value Default: 10 |
allowIframing | Optional | Allows or prevents the advertiser’s web site from being loaded through an HTML iframe embedded on another site. | This value must be true or false .Default: true . |
forceReferer | Optional | Affiliate clicks must originate from a web site. Set this parameter to true in order to prevent affiliates from generating affiliate clicks through emailings. | This value must be true or false .Default: false . |
host | Optional | Only available if you have custom SSL domain name options activated for your plan. Hostname address of the server which will receive the tracking of affiliate clicks. | URL Default: https://lb.affilae.com |
customVar | Optional | Allows you to include a custom variable in the tracking code (used for cross-selling, cashbacks, etc…). | Character string “URL encoded” |
cookieNameForAdvertiserFirst | Optional | Cookie name to allow the detection of whether a visitor has already been to the advertiser’s site before having clicked on an affiliate link. | String of characters without spaces or special characters [a-zA-Z0-9]. Default: AeFirst |
referrer | Optional | Allows you to manually specify the URL of the referring web site to be associated with the tracking. | URL Default: document.referrer |
tagType | Optional | Conversion Tag type iframe or pixel | String Default: pixel |
fp | Optional | Enable FingerPrint | This value must be true or false .Default: true . |
firstParty | Optional | Enable First Party Cookie | This value must be true or false .Default: true . |
② Conversion Tag – Track leads and sales
The conversion Tag triggers an event to our sever in order to track a new conversion.
The server is then able to detect whether a user has been part of an affiliate tracking process or not and a conversion is created if at least one contributor is found.
Conversion Tag must be embedded on the conversion confirmation pages of your web site: order confirmation pages / thank you pages…
Different types of Tags are available to better match your needs. You must create one conversion Tag for each existing rules (i.e. KEY). If required you can add a fall-back Tag by using the JS Tag and iframe Tag together.
JS Tag
Note: This Tag requires Affilae Tag Implementation (Check Step 1).
Iframe Tag – Fall-back
Note: valid for redirect.
Image Tag – Fall-back
Note: valid for redirect.
➜ Parameters to be set:
productNoProducts IDs list, separator `;`.
Variable | Required | Value Information |
---|---|---|
key | Yes | This key is supplied to you on the “conversion code” page available through your affiliate program Configuration dashboard. e.g. |
id | Yes | Populate this parameter with a unique identifier, for example, a unique order number. If you use this code to confirm a subscription to a newsletter yet you do not have an automatically generated unique identifier, you can, for example, use the user’s email Hash (e.g. MD5) to populate this parameter. |
amount | Yes for sales | Total amount Excluding Tax of an order, which will serve as the basis for calculating the commission and Revenue generated. e.g. |
payment | Yes if conversion requires payment | If the conversions are subject to payment, specify the client’s mode of payment, if not simply leave this parameter blank:
|
customer | Yes if revenue share is activated | Your client identifier if the “Revenue Share” option is activated. Please use an identifier that will not change over time, the best being the ID number used in your database. Leave this parameter blank if you do not use the Revenue Share option. |
cv | No | custom variable that will be available in the interface and API: products, new customer etc. |
voucher | No | Should be replaced by the voucher code that was applied during the check-out process. Value is case sensitive. Use ; as a separator to add multiples codes. |