# Track UTMs in Bookeo via Flattened Source Parameter

## UTM attribution overview

This guide explains how to pass HandL UTM Grabber attribution into Bookeo bookings using the `?source=` parameter. UTM Grabber already captures and stores UTM source, medium, campaign, term, content, click IDs, referrer, and landing page data in the visitor's browser. Bookeo only exposes one custom tracking field — **Source** — so we flatten every `utm_` parameter into a single pipe-delimited value and append it dynamically to your Bookeo booking links and widget.

Bookeo documents this approach in their help center: [Can I track the source of bookings in Bookeo?](https://support.bookeo.com/hc/en-us/articles/360017919212-Can-I-track-the-source-of-bookings-in-Bookeo)

### How Bookeo source tracking works

Append `?source=` followed by your campaign identifier to any Bookeo booking link or gift voucher link. For example:

```
https://bookeo.com/yourbusiness?source=summer_promo
```

The same parameter works when embedding the Bookeo widget on your WordPress site. After a booking is completed, the source value appears in:

- The **Source** field in the HOW section of each booking
- The **Source** column in Marketing &gt; Reports &gt; Bookings

### Flatten UTM Grabber data into the source field

Because Bookeo only provides the single `source` custom field, concatenate **all** UTM Grabber parameters into one value using a pipe (`|`) delimiter:

```
?source=utm_campaign=summer_sale|utm_source=google|utm_medium=cpc|utm_content=ad1|gclid=abc123
```

HandL UTM Grabber stores these values in cookies and exposes them via the global `handl_utm` object (and `Cookies.get()`). Use the script below to read every tracked parameter and build the `source` value automatically.

#### Dynamic source builder script

Add this script on any page that links to Bookeo or embeds the Bookeo widget. It builds the flattened source string and rewrites booking links on page load.

```
<script>
(function () {
    function buildBookeoSource() {
        var params = (typeof handl_utm !== 'undefined') ? handl_utm : {};
        var parts = [];

        Object.keys(params).forEach(function (key) {
            var value = params[key];
            if (value && value !== '') {
                parts.push(key + '=' + value);
            }
        });

        return parts.join('|');
    }

    function appendSourceToUrl(url, source) {
        if (!source) return url;
        var separator = url.indexOf('?') === -1 ? '?' : '&';
        return url + separator + 'source=' + encodeURIComponent(source);
    }

    var source = buildBookeoSource();

    // Rewrite direct Bookeo links
    document.querySelectorAll('a[href*="bookeo.com"]').forEach(function (link) {
        link.href = appendSourceToUrl(link.href, source);
    });

    // If using the Bookeo widget, pass source when initializing
    // Example: add ?source=... to the widget URL or booking page iframe src
    window.bookeoUtmSource = source;
})();
</script>
```

#### Widget / iframe example

When embedding Bookeo, append the flattened source to the widget URL:

```
<script>
var bookeoSource = (typeof handl_utm !== 'undefined')
    ? Object.keys(handl_utm)
        .filter(function (k) { return handl_utm[k]; })
        .map(function (k) { return k + '=' + handl_utm[k]; })
        .join('|')
    : '';

// Append to your Bookeo widget embed URL
var widgetUrl = 'https://bookeo.com/yourbusiness';
if (bookeoSource) {
    widgetUrl += '?source=' + encodeURIComponent(bookeoSource);
}
</script>
```

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

### Important limitations

<div id="bkmrk-limitations-callout" style="padding: 1rem 1.25rem; border-left: 4px solid #f0ad4e; background: #fff8e6; margin: 1rem 0;">**One custom field only.** Bookeo provides a single `source` field for custom tracking. There is no separate field for `utm_medium`, `utm_campaign`, `gclid`, etc. You must concatenate every parameter into this one value.

**64-character limit.** Per [Bookeo documentation](https://support.bookeo.com/hc/en-us/articles/360017919212-Can-I-track-the-source-of-bookings-in-Bookeo), the source value may only contain numbers, letters, underscores (`_`), hyphens (`-`), and pipe characters, and is limited to **64 characters**. A full set of UTM parameters will almost always exceed this limit.

**Practical workarounds within 64 chars:**

- Track only the most important parameters (e.g. `utm_source` and `utm_campaign`)
- Use short abbreviated keys (e.g. `src=google|cmp=summer`)
- Prioritize the click ID if running paid ads (e.g. `gclid=abc123`)

If you need **all** UTM parameters without truncation, use [Method 2: Webhook on custom thank-you page](https://docs.utmgrabber.com/books/bookeo-integration/page/track-utms-in-bookeo-via-webhook-on-thank-you-page) instead.

</div>### Verify tracking in Bookeo

After a test booking, open the booking details and confirm the flattened source string appears in the **Source** field. You can also export bookings from Marketing &gt; Reports &gt; Bookings and review the Source column.