# Pass UTMs to ThriveCart Checkout with UTM Grabber

## UTM attribution overview

This guide explains how to pass HandL UTM Grabber attribution into ThriveCart checkouts. UTM Grabber captures UTM source, medium, campaign, term, content, click IDs, referrer, and landing page data in first-party cookies. ThriveCart does **not** persist UTMs across page views — parameters must be present on the checkout URL when the customer completes their order. This guide shows how to bridge that gap using UTM Grabber's built-in link append features and ThriveCart passthrough variables.

### The core problem

Per [ThriveCart's UTM documentation](https://support.thrivecart.com/help/utm-tracking-reporting/):

> *"UTM parameters must exist in the checkout URL when the customer completes their order. UTM parameters are not cookied, and so will not follow the customer around as they browse your site."*

HandL UTM Grabber **does** cookie attribution data in the visitor's browser via the `handl_utm` object. Your job is to push that stored data onto every ThriveCart checkout link or embed **at click time** — before the customer pays.

### Method 1 — Append standard UTMs with the `utm-out` class

ThriveCart natively recognizes the five standard UTM parameters on checkout URLs (`utm_source`, `utm_medium`, `utm_campaign`, `utm_content`, `utm_term`). If you are on ThriveCart **Pro+** with **Stripe Connect+** enabled, these appear in ThriveCart's Sources / Segmentation reporting.

Add the `utm-out` class to any link or button that points to your ThriveCart checkout. UTM Grabber automatically appends all tracked parameters from cookies to the href.

```
<a href="https://yoursubdomain.thrivecart.com/your-product/" class="utm-out">
  Buy Now
</a>
```

The link is rewritten client-side to something like:

```
https://yoursubdomain.thrivecart.com/your-product/?utm_source=google&utm_medium=cpc&utm_campaign=spring_sale&gclid=abc123
```

You can also wrap a parent element:

```
<div class="utm-out">
  <a href="https://yoursubdomain.thrivecart.com/your-product/">Buy Now</a>
</div>
```

See [Appending UTMs using class name attributes](https://docs.utmgrabber.com/books/102-getting-started-for-handl-utm-grabber-v3/page/appending-utms-to-the-buttons-using-class-name-attributes-selectively) for full details.

#### Optional: append UTMs to all links globally

If your sales page uses standard WordPress content (not a page builder that bypasses filters), enable **Append UTM** in the HandL UTM Grabber options tab. This appends tracked parameters to outbound links site-wide — including ThriveCart buy buttons — without adding `utm-out` to each link manually.

See [Appending UTM Globally](https://docs.utmgrabber.com/books/102-getting-started-for-handl-utm-grabber-v3/page/appending-utm-globally). If your theme or page builder does not support this, stick with `utm-out` on individual ThriveCart links.

### Method 2 — Passthrough variables for click IDs and custom params

ThriveCart's native UTM reporting only covers the five standard `utm_*` tags. For `gclid`, `fbclid`, `msclkid`, referrer, landing page, first-touch fields, or any [custom parameters](https://docs.utmgrabber.com/books/102-getting-started-for-handl-utm-grabber-v3/page/adding-a-custom-parameter), use ThriveCart's **passthrough** query format.

Per [ThriveCart passthrough documentation](https://support.thrivecart.com/help/passing-custom-variables-through-the-checkout/), append variables like:

```
?passthrough[gclid]=abc123&passthrough[fbclid]=xyz789&passthrough[utm_source]=google
```

Passthrough data is included in order webhooks, Zapier payloads, API responses, and your custom success page query string — but is **not** shown on customer receipts.

#### Dynamic passthrough builder from `handl_utm`

Add this script on your WordPress sales page to read UTM Grabber cookies and rewrite all ThriveCart links with both standard UTMs and passthrough variables:

```
<script>
(function () {
    if (typeof handl_utm === 'undefined') return;

    function buildThriveCartParams() {
        var standard = [];
        var passthrough = [];
        var utmKeys = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_content', 'utm_term'];

        Object.keys(handl_utm).forEach(function (key) {
            var val = handl_utm[key];
            if (!val || val === '') return;
            if (utmKeys.indexOf(key) !== -1) {
                standard.push(key + '=' + encodeURIComponent(val));
            } else {
                passthrough.push('passthrough[' + key + ']=' + encodeURIComponent(val));
            }
        });

        return standard.concat(passthrough).join('&');
    }

    function appendParams(url, paramString) {
        if (!paramString) return url;
        var sep = url.indexOf('?') === -1 ? '?' : '&';
        return url + sep + paramString;
    }

    var params = buildThriveCartParams();

    document.querySelectorAll('a[href*="thrivecart"]').forEach(function (link) {
        link.href = appendParams(link.href, params);
    });

    window.thrivecartPassthrough = params;
})();
</script>
```

### Embeddable ThriveCart checkout

If you embed ThriveCart directly on your WordPress page, add passthrough variables to the embed div using `data-thrivecart-querystring`:

```
<div
  data-thrivecart-account="yoursubdomain"
  data-thrivecart-tpl="v2"
  data-thrivecart-product="1"
  class="thrivecart-embeddable"
  data-thrivecart-embeddable="tc-yoursubdomain-1-XXXXXX"
  data-thrivecart-querystring="passthrough[gclid]=VALUE&passthrough[utm_source]=VALUE">
</div>
<script async src="//tinder.thrivecart.com/embed/v1/thrivecart.js" id="tc-yoursubdomain-1-XXXXXX"></script>
```

Generate the `data-thrivecart-querystring` value dynamically from `handl_utm` with a small server-side or client-side script so click IDs and custom fields are always current.

### Limitations and when to use Method 3

<div id="bkmrk-limitations-callout" style="padding: 1rem 1.25rem; border-left: 4px solid #f0ad4e; background: #fff8e6; margin: 1rem 0;">**ThriveCart does not cookie UTMs.** If a visitor lands with UTMs, browses several pages, then reaches checkout through a link that was *not* rewritten by UTM Grabber, attribution is lost. Always ensure every path to checkout runs through `utm-out`, global append, or the passthrough script above.

**Native UTM reporting requires Pro+.** ThriveCart's built-in Sources reporting (filtering by UTM in the dashboard) requires a **Pro+** license and **Stripe Connect+** on the product. Standard plan users should rely on passthrough + webhooks instead.

**Only five UTMs in native reporting.** `gclid`, `fbclid`, `msclkid`, referrer, and custom fields are *not* part of ThriveCart's native UTM dashboard — use passthrough and send them to your CRM via [Method 3: Webhook on success page](https://docs.utmgrabber.com/books/thrivecart-integration/page/track-utms-in-thrivecart-via-webhook-on-success-page).

</div>### Verify tracking

1. Visit your sales page with test UTM parameters in the URL (e.g. `?utm_source=test&utm_campaign=docs&gclid=test123`)
2. Confirm UTM Grabber stored the values (check cookies or use browser dev tools: `handl_utm` in console)
3. Hover over or inspect your ThriveCart buy link — UTMs and passthrough params should be appended
4. Complete a test purchase and verify data in ThriveCart reporting (Pro+) or in your webhook/Zapier payload