In a hurry?
Decide how you embed the portal: iframe on your own site (default) or redirect to our hosted portal at
bookings.rehabguru.com.In Account → Appointments → Portal Settings → URLs & Embeds, paste your GTM Container ID (e.g.
GTM-5DX1111) into the Track analytics using GTM Code field. This injects your tags inside the booking portal.Use the
/thankspage (shown after a successful booking) as your conversion trigger in GTM.Pass
utm_*andgclid/fbclidparameters into the booking URL so attribution survives the hop.Be aware: iframe embeds run on a different domain to your website, so cookies, GA sessions and click IDs do not carry over automatically. The redirect approach avoids most of these issues, but takes the visitor off your site.
Why this article exists
If you spend money on Google Ads, Meta Ads, SEO, or any other marketing channel, you want to know which channel actually produces bookings — not just clicks. Doing that with a booking portal involves a couple of moving parts, and there are some subtle "gotchas" specific to embedded booking tools.
This guide explains:
The two ways you can present the booking portal to visitors.
How to inject your own tracking (Google Tag Manager, Google Ads, GA4, Meta Pixel) into the portal.
How to use the
/thankspage as a conversion trigger.How to keep attribution intact from the original ad click all the way to the booked appointment.
The limitations you need to plan around — especially around cross-domain tracking and third-party cookies.
This article is written for clinic owners, with enough technical detail that you can hand it to a web developer or marketing agency.
The two embed options at a glance
| Iframe embed (default) | Hosted redirect |
Where the visitor sees the portal | On your own website, inside a frame | On |
Domain the portal runs on |
|
|
Cookies used inside the portal | Third-party (relative to your site) | First-party |
Click IDs ( | Must be passed in manually via URL | Pass through naturally via URL |
GA / GTM session continuity | Parent site and portal are separate sessions unless you configure cross-domain | Single session if both sites are linked in GA4 |
User experience | Visitor stays on your site | Visitor leaves your site briefly |
Best for | Clinics that want the portal to feel native | Clinics that prioritise accurate paid-ad attribution |
We will treat the iframe embed as the default path, since most clinics already use it, and the redirect as an advanced alternative when accuracy matters more than UX.
Option A — Iframe embed
What's actually happening
When you paste the iframe snippet into your website, the browser loads two completely separate web pages on the screen:
Your website (the parent page, e.g.
guru-rehab.com/book-now). This page is controlled by your website's GTM container, GA tags, ad pixels, and so on.The booking portal (loaded inside the iframe from
bookings.rehabguru.com). This page is a separate document that your website's tags cannot see into for security and privacy reasons.
This is why we provide a dedicated Track analytics using GTM Code field in Portal Settings → URLs & Embeds. Anything you put in that field is injected inside the booking portal so your tags can fire when bookings happen.
Step 1 — Inject your GTM container
Create (or open) a Google Tag Manager container at tagmanager.google.com.
Copy the container ID — it looks like
GTM-XXXXXXX.In Rehab Guru go to Account → Appointments → Portal Settings → URLs & Embeds.
Paste the ID into Track analytics using GTM Code.
Click Update URLs Settings.
Re-copy the embed code and update it on your website — the embed needs to be refreshed for the change to take effect.
Important: This GTM container only fires inside the booking portal (i.e. for booking-related pageviews and the /thanks confirmation page). It is separate from any GTM container you already have on your main website. You can either:
Use the same container ID in both places (simplest), or
Use two separate containers if you want strict separation of marketing tags between the brochure site and the booking flow.
Step 2 — Set the Allowed Domain
In the same panel, set Allowed domain to embed an Appointment form to the domain that hosts the iframe (for example guru-rehab.com). Without this, the portal will refuse to load inside your iframe.
Step 3 — Use /thanks as your conversion trigger
When a client successfully books, the portal navigates to a URL ending in /thanks. This is the moment to fire your conversion tag.
In GTM, create a Trigger:
Trigger Type: Page View
Fires on: Some Page Views
Condition: Page Path
contains/thanks
Attach this trigger to whichever conversion tags you want (Google Ads conversion, GA4 event, Meta Pixel Purchase event, etc.). Examples for the most common platforms are below.
Per-platform setup
All of the platforms below are configured inside the GTM container you injected into the booking portal, not your main site's container (unless you're using a single shared container for both).
Google Ads conversion tracking
In Google Ads go to Tools → Conversions → New conversion action → Website.
Choose Manual setup — you'll be tagging via GTM, not the snippet.
Note the Conversion ID and Conversion Label Google gives you.
In GTM, create a new Tag of type Google Ads Conversion Tracking.
Paste in the Conversion ID and Conversion Label.
Optionally set a conversion value (a flat figure per booking is fine).
Attach the /thanks page trigger described above.
Publish the GTM container.
For best results, also add a Google Ads Conversion Linker tag and fire it on All Pages — this is what stores the gclid in a first-party cookie so the conversion can be attributed back to the click that brought the visitor in. Without it, attribution will break in Safari and in any browser that blocks third-party cookies. See the cross-domain limitations below for a critical caveat.
Google Analytics 4 (GA4)
In GA4, go to Admin → Data Streams and confirm your Measurement ID (
G-XXXXXXX).In your portal's GTM container:
Add a GA4 Configuration tag with your Measurement ID, firing on All Pages.
Add a GA4 Event tag with event name
booking_complete(orgenerate_lead), firing on the /thanks trigger.
To stitch sessions across your website and the booking portal so a single visitor isn't counted twice:
In GA4 Admin → Data Streams → Configure tag settings → Configure your domains.
Add both your main site domain (e.g.
guru-rehab.com) andbookings.rehabguru.com.
Limitation: Cross-domain linking in GA4 works by appending a _gl linker parameter to outbound links. It does not work inside an iframe, because the visitor is technically on both domains at once. In practice this means the portal pageviews and the /thanks event will appear as a separate session on bookings.rehabguru.com. If you need a single unified session, use the redirect approach (Option B) instead.
Meta (Facebook) Pixel
In Meta Events Manager, copy your Pixel ID.
In your portal's GTM container, create a Custom HTML tag with the standard Meta Pixel base code, firing on All Pages.
Create a second Custom HTML tag with the conversion event:
<script>
fbq('track', 'Schedule'); // or 'Lead' / 'Purchase' depending on your setup
</script>
Fire it on the /thanks trigger.
Limitation: Meta's iOS 14.5+ attribution model (Aggregated Event Measurement) requires you to prioritise events in Events Manager. Iframe-loaded pixel events still work, but attribution is on a delay (24–72 hours), and only the highest-priority event per visitor is reported.
Generic pattern — any other platform
The recipe is always the same:
Get the platform's tag (TikTok Pixel, LinkedIn Insight, Bing UET, etc.).
Drop the base/pageview tag into GTM, firing on All Pages.
Drop the conversion event tag into GTM, firing on /thanks.
Publish.
Attribution — making sure clicks are credited to the right channel
Tracking that the booking happened is only half the job. You also need the ad platform to know which click led to the booking. That depends on click identifiers surviving the journey from ad → landing page → booking portal → /thanks.
What survives by default
Nothing. The iframe loads bookings.rehabguru.com with whatever src URL you embedded; it doesn't inherit query parameters from the page it's embedded on.
Pass UTM and click IDs into the iframe
If your landing page receives a URL like:
https://guru-rehab.com/book-now?utm_source=google&utm_medium=cpc&gclid=ABC123
…then you need a small piece of JavaScript on the landing page that reads those parameters and appends them to the iframe's src before it loads. A minimal example:
<iframe id="bkv2__app"
src="https://bookings.rehabguru.com/YOUR-EMBED-ID"
frameborder="0"
style="width:100%; height:1878px; border:none;"
title="Booking Application">
</iframe>
<script>
(function () {
var iframe = document.getElementById('bkv2__app');
var params = window.location.search; // e.g. "?utm_source=google&gclid=ABC"
if (params && iframe) {
var join = iframe.src.indexOf('?') === -1 ? '?' : '&';
iframe.src = iframe.src + join + params.substring(1);
}
})();
</script>
With this in place, the GTM tags inside the portal can read gclid, utm_source, etc. from the URL and feed them to Google Ads, GA4 and the rest.
Tip: If you're working with a marketing agency, ask them to wire this up at the same time as the GTM container — it's a five-minute job for a developer and makes a meaningful difference to attribution accuracy.
What this does not fix
Third-party cookies inside iframes. Safari (ITP) and Firefox (ETP) block them aggressively, and Chrome continues to phase them out. Even with click IDs passed through, some ad platforms will still under-report iframe-based conversions. If paid attribution is critical, see Option B below.
Session stitching in GA4. As noted above, an iframe and its parent page count as separate sessions in GA4 unless you use the redirect.
Option B — Hosted redirect (the high-accuracy alternative)
Instead of embedding the portal in your page, you can link to the hosted version directly:
https://bookings.rehabguru.com/b5e7aef185125db977657e8b19285813%3A7d3ff2f23b7cbb536601c1cb0499dc60ce69232dea52773e5873c78d
This URL is the Appointments URL shown in Portal Settings → URLs & Embeds.
You'd typically use it as the destination of a button like Book Now on your website, or as the final URL in your Google / Meta ads themselves.
Why this often gives better tracking
The visitor's session is entirely on
bookings.rehabguru.comonce they click through — no iframe, no third-party cookie problem.gclid,fbclidandutm_*parameters pass through the URL naturally without any JavaScript.The GTM container injected via Track analytics using GTM Code operates normally as a top-level page.
The
/thanksconversion trigger fires in a regular first-party context, which every ad platform handles well.
Trade-offs
The visitor briefly leaves your website. Some clinics dislike this for branding/trust reasons.
Page views during the booking flow appear under
bookings.rehabguru.comin your analytics, not your own domain — unless you set up cross-domain measurement in GA4 (recommended, and this is the case where it actually works, because it's a real top-level navigation rather than an iframe).You'll need to add the GTM container ID in Portal Settings → URLs & Embeds exactly as you would for the iframe option — same field, same effect.
Setting it up
Copy the Appointments URL from Portal Settings.
Use it as the
hrefon your Book Now button.Make sure any UTM and click ID parameters present on the source page are appended — Google Ads' auto-tagging does this for
gclidautomatically; for UTMs you may need a small script on the button, e.g.:
<a id="book-now" href="https://bookings.rehabguru.com/YOUR-PORTAL-ID">Book Now</a>
<script>
var btn = document.getElementById('book-now');
if (btn && window.location.search) {
var sep = btn.href.indexOf('?') === -1 ? '?' : '&';
btn.href = btn.href + sep + window.location.search.substring(1);
}
</script>
In GA4, add
bookings.rehabguru.comto your list of cross-domain domains so sessions are unified.Configure conversion tags in GTM as described above — the same
/thankstrigger applies.
Recommended hybrid setup
For most clinics, the most reliable arrangement is:
Keep the iframe on your booking page for users who arrive organically (typing your URL, social posts, direct traffic). The native UX is preserved.
For paid traffic (Google Ads, Meta Ads), point ad destinations directly at the hosted Appointments URL. This sidesteps third-party-cookie problems exactly where attribution matters most.
Use one GTM container for both the iframe and the hosted portal (the same ID pasted into the GTM field). All your conversion logic then lives in one place.
Mirror your conversion tags on your main website's GTM container too, fired on the click that opens the iframe / hosted portal — this gives you a useful "click to book" event as a leading indicator, even before the actual booking completes.
Limitations and gotchas — read before you go live
Third-party cookies are restricted in modern browsers. Anything firing inside the iframe is, from the browser's point of view, a third-party context. Safari blocks third-party cookies entirely; Chrome is phasing them out; Firefox blocks tracking cookies by default. Expect 10–30% under-reporting on iframe-based ad conversions compared to redirect-based ones.
The GA4 cross-domain linker does not work through iframes. Sessions on the parent page and inside the iframe will appear as separate sessions. If unified sessions matter, use the redirect.
Click IDs do not pass into the iframe automatically. You need the small JavaScript snippet shown above, or your
gclid/fbclidwill be lost and the conversion will show up as "direct/none" in your ad platform reports.Changes in Portal Settings require re-copying the embed. After updating the GTM container ID or Allowed Domain, you must re-copy the embed code and replace it on your website — old embeds keep using the old settings.
You cannot fire parent-site tags from inside the iframe. Because of browser security (the Same-Origin Policy), tags inside the booking portal cannot trigger tags on your main site. All conversion tags must live in the GTM container that's injected into the portal.
Test in an incognito window after every change. Cached embed code is a very common reason "the tracking isn't working" — until you hard-refresh.
GDPR / consent. If you use a consent management platform on your main site, remember that the booking portal is technically a different page and may need its own consent banner or shared consent state. Talk to your data-protection lead.
Troubleshooting
Symptom | Likely cause | Fix |
GTM debug shows no tags firing in the portal | GTM ID not saved, or embed not re-copied | Re-save Portal Settings and replace the embed on your website |
| Trigger condition doesn't match the actual URL | Inspect the Network tab on the |
Conversions show "direct/none" in Google Ads | Click ID isn't being passed into the iframe | Add the URL-passthrough JavaScript snippet shown earlier |
Sessions appear duplicated in GA4 | Iframe creates a second session on | Either accept the split, or move to the hosted-redirect approach |
Meta conversions are delayed or under-reported | iOS 14.5+ AEM throttling on iframe-based pixel events | Prioritise the booking event in Events Manager, or use the redirect |
If you've worked through all of this and the tags still aren't behaving, contact Rehab Guru support with:
The page URL where the iframe is embedded
A screenshot of the URLs & Embeds section (with the GTM field visible)
A screenshot of GTM → Preview mode on the booking page
The platform you're trying to track conversions in (Google Ads, GA4, Meta, etc.)
We'll be happy to help.
