Cookie CAID

Introduction

The CAID cookie: your VIP pass for a top level tracking visitors on your website! 🌐 Powered by Commanders Act, the CAID cookie, is your go-to for identifying and tracing a visitor's journey across different browsing sessions.

Its construction is essential, especially in the context of restrictions imposed by privacy and security policies such as ITP (Intelligent Tracking Prevention).

The CAID is automatically created/managed by Commanders Act servers if you choose the proxy method (WAF or on-premise proxy)

You must create it yourself, on your own server, in the case of "First Party" tracking via CNAME or A-Record, but it is not necessary if you use a proxy. In this documentation, you'll find all the information you need to build it.

Ready to elevate your tracking game and conquer the challenges? Dive in, and let's make your On-Premise CAID cookie the superhero of your website! 🚀

When creating your CAID's cookie, apply the following requirements:

"CAID" (in uppercase)

✔️ Contains 20 random characters

✔️ Preceded by the year the cookie was created

🎉 Available on the entire domain and its sub-domains. 🚀 Accessible client-side and server-side

Lifetime

✔️Cookie's expiry date: maximum 13 months after creation date.

Creation and Deposit

✔️Created by the company server (On-Premise). ✔️Deposited on the main domain and all associated sub-domains. (.mydomain.com)

Accessibility

✔️Accessible to all, including servers and JavaScript scripts on the page.

Code snippets

Here are some examples of snippet code to create your On-Premise CAID cookie

<?php ​
$cookie_name = "CAID";​
$year = date("Y");​
$random_numbers = substr(str_shuffle(str_repeat('0123456789', 20)), 0, 20);​
$cookie_value = $year . $random_numbers;​
$expiration = time() + (13 * 30 * 24 * 60 * 60); // 13 mois ​
$path = "/"; // Disponible sur tout le domaine​
setcookie($cookie_name, $cookie_value, $expiration, $path);​
?>​

Last updated