Set up an affiliate program with Affilae
Adding the Tracking Script
Section titled “Adding the Tracking Script”Enter your Affilae Identifier in the Advanced trackers tab of your site (Settings > Sites, pencil icon).
This is your ID found in the Affilae tracking script.
<script type="text/javascript"> var _ae = { "pid":"5f0a1b2c3d4e5f6a7b8c9d0e", // your Affilae identifier }</script>As soon as this field is filled in, Ciklik adds the Affilae tracking script itself on every page of your shop. You don’t need to add it through Google Tag Manager or in your site’s Extra tags in the head field: it would be loaded twice.
The field only accepts a program ID: 24 hexadecimal characters (digits and letters a to f). An e-mail address or a conversion key is rejected.
Configuring Affiliate Programs
Section titled “Configuring Affiliate Programs”Affilae provides you with a key (a sequence of numbers and letters) for your affiliate program.
Example: In Affilae, find your Key: 5f0a1b2c3d4e5f6a7b8c9d0e-5f0a1b2c3d4e5f6a7b8c9d1f
This is the Affilae Tag that you can enter in the back office in the Affilae Tag field of your plans or shop products, depending on what you want. The expected format is “rule-program”: two 24-character hexadecimal identifiers separated by a hyphen.
Different keys can be entered for plans and shop products to set up different commission rules.
Conversion Tracking (Native)
Section titled “Conversion Tracking (Native)”The conversion script is automatically integrated by Ciklik during order confirmation. No additional configuration is necessary.
A conversion is only sent for a sale made on the site, and only if the ordered plan or product has a valid Affilae Tag. Subscription renewals are not sent.
Data Sent to Affilae
Section titled “Data Sent to Affilae”For each conversion, the following data is transmitted:
| Parameter | Description |
|---|---|
key | Affilae key (configured on the plan or product) |
id | Order ID |
amount | Order amount excluding tax and shipping |
currency | Order currency |
payment | Payment method (online) |
voucher | Promo code used (if applicable) |
subid | User ID |
customer | User ID |
Promo Code / Coupon Tracking
Section titled “Promo Code / Coupon Tracking”Promo code tracking is automatic. When a customer uses a promo code for their order, it is automatically transmitted to Affilae via the voucher parameter.
This allows you to activate Affilae’s conversion tracking via promo code feature and automatically attribute commissions to ambassadors based on their code.
Data Available in the dataLayer (for GTM)
Section titled “Data Available in the dataLayer (for GTM)”If you want to customize your tracking via Google Tag Manager, the order data including the coupon is available in the dataLayer.
order.confirmation Event
Section titled “order.confirmation Event”{ event: "order.confirmation", ecommerce: { purchase: { actionField: { id: "ORDER_ID", affiliation: "SITE_NAME", revenue: 99.00, tax: 16.50, shipping: 4.90, coupon: "PROMO_CODE" }, products: [...] } }}purchase Event
Section titled “purchase Event”{ event: "purchase", ecommerce: { currency: "EUR", value: 99.00, tax: 16.50, total_discount: 10.00, transaction_id: "ORDER_ID", coupon: "PROMO_CODE", items: [...], user_data: {...} }}Available GTM Variables
Section titled “Available GTM Variables”| dataLayer Variable | Description |
|---|---|
ecommerce.purchase.actionField.id | Order ID |
ecommerce.purchase.actionField.revenue | Amount including tax |
ecommerce.purchase.actionField.tax | Tax amount |
ecommerce.purchase.actionField.coupon | Promo code used |