Working with the click ID

Before you start

Transmitting a click ID in the conversion code allows tracking and attribution even without cookies or in case no cookie is found or available.

The idea is to transmit an ID when a user clicks is redirected to a shop or a web site. This ID then is saved by the shop/website, for example in a first party cookie or in the database. When the conversion is called, it is transmitted in the conversion code.

For the ID you can use the default Ingenious click ID. The possibility exists to use custom click IDs as well, e.g., if you want to use existing IDs that you have in your system. The next two sections explain both variants.

Assigning and transmitting a click ID to a shop

Transmitting the default click ID

The default click ID is automatically generated by the Ingenious Platform and assigned to the click. You only need to configure the transmission.

The click ID will be transmitted as query parameter in the URL with every click. This happens with the use of the additional parameter tool.

You reach this page by clicking on ‘manage advertiser’ in the advertiser section main navigation menu. On the page with the overview of all the advertisers on your platform, click on the icon next to the relevant advertiser. You will find the additional parameter feature in the middle of the page.

  • Start to create a new parameter by clicking on the icon. If you do so, three new fields will appear under the columns ‘parameter name’, ‘value type’ and ‘value’.

  • Under ‘parameter name’ fill in the parameter name the system via which you will trigger the conversion code requires.

  • Under ‘value type’, select ‘dynamic’.

  • Under ‘value’ select ‘click ID’.

When you are done, scroll down the page and click on the button ‘save’ in the right lower corner.

Example result:{CLICK_ID}

read more here: Additional parameters

Transmitting a custom click ID

The default click ID is automatically generated by the Ingenious Platform. However you can also assign a custom click ID. A custom click ID could be an existing Click ID of your own system or the ID of a tool that you use. To assign a custom click ID to a click, you need to pass your click ID in the form of a query parameter with the click tracking request.

Make sure you have a query parameter name for custom click ID tracking configured for your Platform. If you do not have it yet, please contact our Customer Success team.

To add a click ID, place an ampersand sign (&) at the end of the tracking URL and use your query parameter name as the name of the parameter. Subsequently, add the equal sign (=) and the value you want to use. See this example of a click tracking URL with a click ID:


The platform will store the custom click ID with the click. This enables you to pass this ID with a conversion to connect the click with the conversion.

If you need to transmit your custom click ID to the shop, please configure it in the Additional Parameter Settings of the advertiser.

Saving the parameter and fetching it

The shop/ website reads the clickID from the URL and saves it either in a first party cookie or a database.

When saving it in a cookie we recommend to to this server side (e.g. with PHP).

Then, before executing the conversion code, the click ID needs to be fetched from the cookie/ the data base so that it can be transmitted in the conversion code.

Examples for saving the click ID

Code example PHP: Set cookie with clickID server side

1 2 3 4 5 <?php if(isset($_GET["clickid"])) {     setcookie("clickid", $_GET["clickid"], time() + 365*24*60*60); } ?>


Code example Javascript: Set cookie with clickID browser side

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 <html> <head> </head> <body>     <div id="mydiv">Hello, this a Test Page</div>     <script>         function setCookie(cname, cvalue, exdays) {             var d = new Date();             d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));             var expires = "expires=" + d.toUTCString();             document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";         }         function getCookie(cname) {             var name = cname + "=";             var decodedCookie = decodeURIComponent(document.cookie);             var ca = decodedCookie.split(';');             for (var i = 0; i < ca.length; i++) {                 var c = ca[i];                 while (c.charAt(0) == ' ') {                     c = c.substring(1);                 }                 if (c.indexOf(name) == 0) {                     return c.substring(name.length, c.length);                 }             }             return "";         }         function saveClickId(qparam) {             //Get ClickID and save to Cookie             var urlParams = new URLSearchParams(;             if (urlParams.has(qparam)) {                 var cli = urlParams.get(qparam);                 setCookie(qparam, cli, 60);             }         }         (function () {             //read new value with name clickid             saveClickId('clickid');             //show value in Browser             var para = document.createElement("P");             var t = document.createTextNode("This is the ID: " + getCookie('clickid'));             para.appendChild(t);             document.getElementById("mydiv").appendChild(para);         })();     </script> </body> </hmtl>


Examples for fetching the click ID

Code example PHP: Fetch clickID from cookie server side

1 2 3 4 5 <?php if(isset($_COOKIE["clickid"])) {     $clickid = $_COOKIE["clickid"]; } ?>

Code example Javascript: Fetch the clickID from cookie browser side

1 2 3 4 5 6 7 8 9 10 11 12 13 <script> function getCookie(cname) {     var name = cname + "="; var ca = document.cookie.split(";"); for (var i = 0; i < ca.length; i++) {         var c = ca[i]; while (c.charAt(0) == " ") {             c = c.substring(1);         } if (c.indexOf(name) == 0) {             return c.substring(name.length, c.length);         }     } return ""; } var clickid = getCookie("clickid"); </script>

Implementing the conversion code with click ID

When implementing the conversion code, add all the parameters you need. Make sure, that the click ID that you fetched from the cookie is transmitted. This happens with the parameter ‘clickId’ when you use the Javascript code or with ‘cli’ when you use the image pixel or server to server callback URL. 

Further reading on how to implement the conversion code: