# Track UTMs in ThriveCart via Webhook on Success Page

## UTM attribution overview

This guide explains how to send **full** HandL UTM Grabber attribution from ThriveCart orders to Zapier, Make (Integromat), your CRM, or any webhook — including click IDs and custom parameters that ThriveCart's native UTM reporting does not cover. Use ThriveCart passthrough variables plus a custom success page or order webhook to capture every field UTM Grabber has stored.

If you only need the five standard UTMs in ThriveCart's dashboard (Pro+), see [Method 1 &amp; 2: Pass UTMs to ThriveCart checkout](https://docs.utmgrabber.com/books/thrivecart-integration/page/pass-utms-to-thrivecart-checkout-with-utm-grabber).

### How ThriveCart passes data after purchase

ThriveCart includes passthrough variables in three places after an order completes:

- **Custom success page URL** — passthrough keys appear as query-string parameters
- **Webhook payload** — all passthrough variables are included in the POST body ([ThriveCart webhook docs](https://support.thrivecart.com/help/using-webhook-notifications/))
- **Zapier** — passthrough data is available in Zap triggers

Per [ThriveCart passthrough documentation](https://support.thrivecart.com/help/passing-custom-variables-through-the-checkout/), any `passthrough[key]=value` sent into checkout is associated with the order and forwarded to these destinations.

### Step 1 — Pass UTM Grabber data into checkout via passthrough

Before the customer checks out, ensure UTM Grabber data reaches ThriveCart as passthrough variables. Use the passthrough builder script from Method 1, or manually append to your checkout URL:

```
https://yoursubdomain.thrivecart.com/your-product/?utm_source=google&utm_medium=cpc&utm_campaign=spring&passthrough[gclid]=abc123&passthrough[fbclid]=xyz789&passthrough[handl_landing_page]=https://yoursite.com/landing
```

See the full list of trackable parameters in [Native WP Shortcodes](https://docs.utmgrabber.com/books/102-getting-started-for-handl-utm-grabber-v3/page/native-wp-shortcodes).

### Step 2 — Set a custom success / thank-you page

In ThriveCart, configure your product to redirect to a custom success page on your WordPress site after purchase. ThriveCart appends passthrough variables to the redirect URL automatically.

Example success page URL after order:

```
https://yoursite.com/thank-you/?gclid=abc123&fbclid=xyz789&utm_source=google&order_id=12345
```

Configure the success page under your ThriveCart product settings. See [Setting your after order success / thank you page](https://support.thrivecart.com/help/setting-your-after-order-success-thank-you-page/).

### Step 3 — Trigger your webhook on the success page

On your WordPress thank-you page, add a script that merges URL parameters (from ThriveCart passthrough) with any remaining `handl_utm` cookie data, then sends everything to your webhook.

Replace the webhook URL with your own Zapier, Make, or custom endpoint.

```
<script>
var qvars = {};
window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m, key, value) {
    qvars[key] = decodeURIComponent(value.replace(/\+/g, ' '));
});

// Merge ThriveCart passthrough (from URL) with UTM Grabber cookie data
qvars = Object.assign({}, (typeof handl_utm !== 'undefined' ? handl_utm : {}), qvars);

setTimeout(function() {
    var data = new URLSearchParams(qvars).toString();
    console.log('Sending to webhook:', data);

    var xmlHttp = new XMLHttpRequest();
    xmlHttp.open('GET', 'https://hooks.zapier.com/hooks/catch/YOUR_ID/YOUR_KEY/?' + data, true);
    xmlHttp.send(null);
}, 1000);
</script>
```

This follows the same pattern as our general guide: [Triggering Zapier on Thank you Page](https://docs.utmgrabber.com/books/zapier-integration/page/triggering-zapier-on-thank-you-page).

### Alternative — ThriveCart order webhook (no success page script)

Instead of a client-side script on your thank-you page, configure a ThriveCart webhook under **Settings &gt; API &amp; Webhooks &gt; Webhooks &amp; Notifications**. ThriveCart sends a POST on `order.success` that includes all passthrough variables you passed into checkout.

Point the webhook directly to Zapier's Catch Hook URL or Make's Custom Webhook module. Map fields like `passthrough[gclid]`, `passthrough[utm_source]`, customer email, and order total to your CRM.

This approach works on **all ThriveCart plans** — you do not need Pro+ for webhook-based attribution.

### What data gets sent

- **Standard UTMs** — `utm_source`, `utm_medium`, `utm_campaign`, `utm_term`, `utm_content`
- **Click IDs** — `gclid`, `fbclid`, `msclkid`
- **Context** — `handl_landing_page`, `handl_ref`, `handl_url`
- **First-touch** — `first_utm_source`, `first_utm_campaign`, etc. (if enabled in UTM Grabber)
- **Custom parameters** — any fields configured in UTM Grabber settings
- **Order context** — customer email, order ID (from ThriveCart success URL or webhook payload)

### Zapier / Make setup

1. Ensure passthrough variables are reaching checkout (see [Method 1 &amp; 2](https://docs.utmgrabber.com/books/thrivecart-integration/page/pass-utms-to-thrivecart-checkout-with-utm-grabber))
2. Create a Zap or Make scenario with **Webhooks → Catch Hook** (or use ThriveCart's native Zapier integration)
3. Complete a test purchase and confirm all UTM / click ID fields arrive in the payload
4. Map fields to HubSpot, Salesforce, Google Sheets, or your reporting tool

### Why use this method?

- **Works on all ThriveCart plans** — no Pro+ or Stripe Connect+ required
- **Full attribution** — send `gclid`, `fbclid`, first-touch, and custom params, not just five UTMs
- **CRM-ready** — tie revenue to campaign source in HubSpot, ActiveCampaign, Salesforce, etc.
- **Offline conversion ready** — pass `gclid` back to Google Ads via Zapier or your CRM workflow