# 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="https://295230641-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F41f2EboJipeUA6flsLGK%2Fuploads%2FQzgGO8K2E6ZcWQqNdCgd%2Fimage.png?alt=media&#x26;token=d1fd46c4-2a5f-4ac0-a08a-b3e7a35f1181" 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>
