Cookieless integration with Shopify

Step 1 : Create Offer

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 an offer in Offer18 dashboard.

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


Step 2 : Code Placement

  1. From your Shopify admin, go to Online Store » Themes.

  2. Find the theme that you want to edit, and then click ... (3 dots) » Edit code

  3. Click on theme.liquid » Place the below code in '<head>' tag

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

Users must replace '<YOUR-CLICK-ID-PARAMETER>' with the clickid parameter used when creating the offer.


Step 3 : Place below script in Shopify Checkout

  1. Go to Shopify store » Settings » Checkout

  2. In Additional Script under Order status page section » Place script » Submit

<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>


You can collect conversion data using various Offer18 Postback Parameters and Shopify data attributes.

Offer18 Postback Parameter

Shopify Parameter

currency

{{ currency }}

sale

{{ total_price | money_without_currency }}

adv_sub4

{{ total_price | money_without_currency }}

adv_sub5

{{ order_number }}

coupon

{{ checkout.discount_applications[0].title }}

Last updated