---
title: "Set up an affiliate program with Affilae"
description: "Connect Affilae to your store: tracking ID, Affilae tag on your plans and products, automatic conversion tracking and promo codes sent to Affilae."
url: https://www.ciklik.academy/en/acquisition/programme-d-affiliation-affilae/
lang: en
lastUpdated: 2026-10-09
---

# Set up an affiliate program with Affilae

> Box store
>
> This page applies to box stores hosted by Ciklik. Using the PrestaShop module? [See the PrestaShop documentation](https://www.ciklik.academy/en/prestashop/).

## 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.

```html
<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

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)

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

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

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.

> Note
>
> If no promo code is used, the `voucher` parameter will be empty.

---

## 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

```javascript
{
  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

```javascript
{
  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

| 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      |

## See also

[Google Analytics 4, Google Ads and Tag Manager](https://www.ciklik.academy/en/parametres-marketing/google-analytics-ads-et-tag-manager/)

[Create a discount coupon](https://www.ciklik.academy/en/acquisition/creer-un-coupon-de-reduction/)

[Create a plan](https://www.ciklik.academy/en/abonnements/creer-une-formule/)
