# Cookieless Tracking

### Track Conversions without using cookies

In order to track conversions without using third party cookies, follow the instructions given below.

#### **1. Offer Setup**

For Cookieless tracking, it is mandatory to include click ID parameter and token in the Offer URL and also for all the landing pages while creating offer in Offer18 dashboard.

```
Example: https://example.com/?<YOUR-CLICK-ID-PARAMETER>={tid}
```

Like this example link user must replace `<YOUR-CLICK-ID-PARAMETER>` with the clickid parameter of their choice.

<figure><img src="/files/VwU1Ujq4xW6wPXOq5NT4" alt=""><figcaption></figcaption></figure>

***

#### 2. Code Placement

Users must add the following code snippet into all landing pages after creating an offer.

<mark style="color:purple;">Placement : Header (All Pages)</mark>

```html
<script src="https://web-resources.offer18.net/sdk/web/WebSDK.js"></script>
<script>
    window.Offer18WebSDK.initializeUrlParam('<YOUR-CLICK-ID-PARAMETER>');
</script>
```

{% hint style="info" %}
User must replace **\<YOUR-CLICK-ID-PARAMETER>** with the clickid parameter used when creating the offer.
{% endhint %}

After adding the script user needs to add the following script in thankyou / order-confirmation page

<mark style="color:purple;">Placement : Thank you Page/Order Success Page (One Page)</mark>

```html
<script src="https://web-resources.offer18.net/sdk/web/WebSDK.js"></script>
<script>
    window.Offer18WebSDK.trackConversion({
        domain: '',
        accountId: '',
        offerId: '',
        coupon: '', 
        postbackType: '', // 'iframe' or 'pixel'
        isGlobalPixel: false, // true or false
        allowMultiConversion: false, // true or false
        conversionData: {
            event: '', // Event Name (Please specify the event)
            payout: '', // Payout Amount (Please specify the payout amount)
            sale: '', // Sale Amount (Please specify the sale amount)
            currency: '',
            adv_sub1: '',
            adv_sub2: '',
            adv_sub3: '',
            adv_sub4: '',
            adv_sub5: '',
        }
    })
</script>
```

{% tabs %}
{% tab title="Object Configuration - window\.Offer18WebSDK.trackConversion()" %}

1. **domain** (Mandatory) : Postback domain of the user.
2. **accountId** (Mandatory) : Offer18 account id of the user.
3. **offerId** (Mandatory) : Id of the campaign.
4. **coupon :** Coupon code can be used here
5. **postbackType** : It can be either `'iframe'` or `'pixel'`, default value is `'iframe'`.&#x20;
6. **isGlobalPixel** : User can configure global pixel by setting this `true` , default value is `false`.
7. **allowMultiConversion** : User can allow MultiConversion by setting this `true` , default value is `false`.
8. **conversionData** : This object contains the parameters which can be used to get values from network.
   {% endtab %}
   {% endtabs %}

#### **Example code**&#x20;

```html
<script src="https://web-resources.offer18.net/sdk/web/WebSDK.js"></script>
<script>
    window.Offer18WebSDK.trackConversion({
        domain: 'example.o18.link',
        accountId: '0000',
        offerId: '00000000',
    });
</script>
```

***

## Debug Mode

To enable debug mode in an SDK, add the following code inside your script:

```html
<script>
    window.Offer18WebSDK.activateDebugMode();
</script>
```

Enabling debug mode allows user to get more detailed information about the working of the SDK, including any errors or debugging messages.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://knowledgebase.offer18.com/network/sdk/cookieless-tracking.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
