Skip to content

Conversion Tracking

Conversion tracking lets you measure the actions visitors take on your site after clicking a Wortise ad — purchases, sign-ups, or any custom event you care about.

This page covers the JavaScript tag setup and the cookie used to attribute conversions.

  1. Add the global snippet to ALL pages

    Place this snippet in the <head> or at the top of the <body> on every page of your website:

    <script async src="https://cdn.resources.wortise.com/sdk/wtag.js"></script>
    <script>
    window.wDataLayer = window.wDataLayer || [];
    function wtag(){wDataLayer.push(arguments);}
    wtag('config');
    </script>

    This does two things:

    • Loads the tracking script asynchronously (non-blocking).
    • When a visitor arrives via a Wortise ad click, captures the click ID (wclid) from the URL and stores it in a first-party cookie.
  2. Track conversions

    On the page where a conversion happens (e.g., order confirmation, sign-up thank-you page), add:

    <script>
    wtag('event', 'conversion', {
    type: 'purchase',
    value: 29.99
    });
    </script>
    ParameterTypeRequiredDescription
    typestringNoConversion type (e.g. purchase)
    valuenumberNoMonetary value of the conversion
  1. A user clicks a Wortise ad and is redirected to your site with a ?wclid=xxx parameter in the URL.
  2. The SDK detects this parameter and stores it in a _wcl first-party cookie (30-day expiry, scoped to your root domain).
  3. When the user completes a conversion, the SDK reads the cookie and sends a request to the Wortise conversion endpoint.
  4. The cookie works across subdomains (a click on www.example.com is tracked on checkout.example.com).
PropertyValue
Name_wcl
Expiry30 days
DomainRoot domain (e.g. .example.com)
Path/
SameSiteLax