<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=345344538922740&amp;ev=PageView&amp;noscript=1">
Skip to content
  • There are no suggestions because the search field is empty.

Attribution tracking via Eat App

A guide on passing UTM / marketing-attribution parameters into the Eat App booking widget

Overview

The widget supports three implementation paths for attribution tracking:

Path Mechanism Stored as Use case
1. ?source= URL param Native widget param referrer_tag on reservation Ad network / referrer tracking
2. Custom-field pre-population Named URL params → custom fields Reservation custom field values Flexible UTM capture per restaurant
3. GTM / JavaScript snippet Reads document.location, rewrites widget URL referrer_tag and/or custom fields Tag-manager-driven attribution

1. ?source= URL param

How it works

Append ?source=<value> to the widget embed URL. 

https://www.eatapp.co/reserve/<restaurant-slug>?source=google-ads

Validation — ⚠️ important

If no matching Referrer record exists
the value is silently rewritten to "web".

This means:

  • Raw UTM source strings such as utm_source=yourcustomblog will not be preserved unless a Referrer record with that slug exists.
  • Work with your CSM or support team to confirm which referrer slugs are pre-configured for a restaurant before using this param.

 

2. Custom-field pre-population

Pre-requisites

  1. The restaurant must have reservation custom fields configured in their
       widget config (Side menu → Guests → Custom Fields).
  2. The custom field name must exactly match the URL param key you pass.

Example

If a restaurant has a custom field named utm_source:

https://www.eatapp.co/reserve/<restaurant-slug>?utm_source=instagram&utm_medium=bio

The widget will pre-populate the utm_source custom field with "instagram"
on the resulting reservation.

Notes

  • Custom-field pre-population only works for fields already configured
      for that specific restaurant — there is no global UTM capture field.
  • Fields not present in the restaurant's widget config are silently ignored.
  • Values are stored as strings against the reservation; no validation is
      applied beyond field-level max length.

3. GTM / JavaScript snippet

Use this approach when you want to read UTM params from the landing-page URL
and inject them into the widget without modifying the embed URL server-side.

Option A — Rewrite the widget iframe src

<script>
  (function () {
    var params = new URLSearchParams(window.location.search);
    var utmKeys = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_content', 'utm_term'];
    var iframes = document.querySelectorAll('iframe[src*="eatapp.co/reserve"]');
    iframes.forEach(function (iframe) {
      var url = new URL(iframe.src);
      utmKeys.forEach(function (key) {
        if (params.has(key)) {
          url.searchParams.set(key, params.get(key));
        }
      });
      // Map utm_source → source for native referrer_tag capture (see path 1)
      if (params.has('utm_source')) {
        url.searchParams.set('source', params.get('utm_source'));
      }
      iframe.src = url.toString();
    });
  })();
</script>

Place this snippet before the widget <iframe> tag, or fire it from a
GTM DOM Ready trigger so the iframe is present.

Option B — Append params before widget initialises (inline-widget)

If you use the Eat App JavaScript widget loader (not an <iframe>):

<script>
  window.eatappWidgetConfig = window.eatappWidgetConfig || {};
  (function () {
    var params = new URLSearchParams(window.location.search);
    // Pass utm_source as the native source param
    if (params.has('utm_source')) {
      window.eatappWidgetConfig.source = params.get('utm_source');
    }
    // Pass any custom-field keys your restaurant has configured
    ['utm_medium', 'utm_campaign', 'utm_content', 'utm_term'].forEach(function (key) {
      if (params.has(key)) {
        window.eatappWidgetConfig[key] = params.get(key);
      }
    });
  })();
</script>
<!-- Widget loader goes here -->
<script src="https://cdn.eatapp.co/widget/loader.js" async></script>

GTM setup

  1. Trigger: DOM Ready (or Window Loaded for SPAs).
  2. Tag type: Custom HTML.
  3. Variables: Create GTM URL variables for each UTM param
       (, , etc.) using the built-in
       URL → Query variable type.
  4. Paste either snippet above, substituting GTM variable references if
       desired.