# Track User Journey

You can track the complete user journey for each recorded conversion by capturing UTM parameters (like `utm_source`, `utm_medium`, `utm_campaign`, etc.) at the time a user lands on your page and linking them to the final conversion. This helps you understand which traffic sources and campaigns are driving results. Using **Offer18’s WebSDK**, you can seamlessly capture these UTM details, associate them with user sessions, and ensure they are recorded accurately when the conversion happens—giving you full visibility into attribution and campaign performance.

### To track user journey following the below instruction

### **1. Offer Setup**

For tracking user journey, 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.

{% code overflow="wrap" %}

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

{% endcode %}

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

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

### 2. Code Placement

Add the following code snippet into all landing pages except Order confirmation / Order Success (Thank you) after creating an offer.\
\ <mark style="color:purple;">Placement : Header</mark>

{% code overflow="wrap" %}

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

{% endcode %}

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

<pre class="language-html"><code class="lang-html">&#x3C;script src="https://web-resources.offer18.net/sdk/web/WebSDK.js">&#x3C;/script>
<strong>&#x3C;script>
</strong>    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: '',
        }
    })
&#x3C;/script>

</code></pre>


---

# 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/track-user-journey.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.
