> ## Documentation Index
> Fetch the complete documentation index at: https://restoo.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Migrating Marketing & Analytics

> Move your conversions, your triggers, and your UTM transfer script to the new Restoo Connect and Restoo Attribution Transfer.

**This guide is for you if the booking form appears inside your own website.** If your guests book on a Restoo page, go to the [guide for hosted on Restoo](/widget/migration-hosted).

## Do I need to change anything?

Find your case in this list. If more than one applies, work through them top to bottom.

| Your situation                                                             | What to do                                                                                              |
| -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| You measure bookings with GTM, with each platform's own code, or with both | [Choose where your events arrive](#1-choose-where-your-booking-events-should-arrive)                    |
| You measure bookings in Google Analytics 4                                 | [Declare your GA4 property](#2-declare-what-you-use-your-ga4-property-for)                              |
| You use conversions, events, or triggers defined by URL or by click        | [Rebuild them on Restoo Connect events](#3-move-your-conversions-events-and-triggers-to-restoo-connect) |
| Your site loads the old `iframeUtmTransfer` script                         | [Replace it with Restoo Attribution Transfer](#4-replace-the-utm-transfer-script)                       |
| None of the above                                                          | Nothing else: changing the installation brought you up to date                                          |

## Prerequisites

* **The widget already migrated to v2**, following the [installation migration guide](/widget/migration-embedded-install).
* **Access to your website's code.**
* **Access to your Restoo account settings.**

## What is on you

With the widget inside your site, **measurement runs on your page**, and half of this guide comes from that:

* **Each platform's tags have to be there, and load before the widget.** Restoo Connect forwards to the ones it finds, but installs none; if the widget loads first, the first events are lost.
* **You collect the consent** and pass it to Restoo.

## 1. Choose where your booking events should arrive

**This affects you if** you measure bookings with Google Tag Manager, with each platform's measurement code placed directly on your site — the Meta Pixel, `gtag.js`, TikTok's, OpenAI's — or with both.

**What changed.** [v2 no longer loads any GTM container](/widget/migration-changes#gtm-no-longer-loads-on-restoo-pages), neither inside the iframe nor on the page Restoo hosts for you: if you have one configured in Restoo, it will stop measuring as soon as you migrate.

**What to do.** With the widget inside your site, the events leave the iframe and **[Restoo Connect](/widget/connect) receives them on your page**. From there you have three options. Pick one:

* **Use your Google Tag Manager container** *(recommended if you already have one)*. If it isn't on your own site yet, install it there: it's yours, so your tags come inside it. Then [save its ID in your Restoo account](/widget/integrations#google-tag-manager) to enable the `gtm` destination: Connect pushes every event to your `dataLayer` and your tags hand them out as they already did. Your triggers go by event name, and the names are in [the GTM reference](/widget/connect-mappings#google-tag-manager).
* **Send the events to each platform directly.** [Configure the destinations in your Restoo account](/widget/integrations) — Google Analytics, Google Ads, Meta Pixel, TikTok Pixel, or OpenAI Pixel — and Connect will call `gtag`, `fbq`, `ttq`, and `oaiq` on your page. That requires each platform's base code to be there: Restoo installs none, and until now your GTM was loading them. [What each destination needs](/widget/connect#before-you-start).
* **Listen for the events yourself** *(for very advanced setups only)*. The widget emits them on your page as [Restoo Widget Events](/widget/events), so you can pick them up with your own listeners and take them wherever you want: there you have [how to listen for them](/widget/events#listen-for-events) and their payloads. It requires your own development, and **the consent is your responsibility**: with no destination enabled, Connect is not initialized and nobody applies those rules for you.

<Warning>
  **Do not leave two options active for the same platform.** If your GTM forwards
  bookings to Meta and the `metaPixel` destination is enabled as well, every
  event arrives twice. Keep only what you use in your account, or switch the rest
  off for this installation with `connect: { metaPixel: false }`.
</Warning>

## 2. Declare what you use your GA4 property for

**This affects you if** the `ga4` destination is enabled in your account and you have never declared what you use that property for. If you measure GA4 through your GTM, this doesn't apply: the declaration belongs to the Restoo integration, not to your tag.

**Why it needs a look.** [A property that feeds advertising requires advertising consent](/widget/migration-changes#ga4-needs-to-know-what-you-use-the-property-for), and v1 never asked. Until you declare it, Restoo takes the most restrictive case and only measures visitors who also accept those cookies.

**What to do.** Answer it once in your [Google Analytics integration settings](/widget/integrations#google-analytics-4). Only the account administrator can do it, even when an agency or a webmaster handles the rest of this guide.

## 3. Move your conversions, events, and triggers to Restoo Connect

**This affects you if** you have custom measurement of the booking funnel. For example:

* **Meta custom conversions** defined by a URL rule, the kind that says "URL contains `reservar/seleccionar-horario`", created in Events Manager.
* **Events set up by click**, pointing at the booking flow's buttons with Meta's event setup tool.
* **URL-based conversions or events in Google Ads or Google Analytics 4.**
* **Google Tag Manager triggers** tied to the URL of a booking step, to a button, or to an element on the page.

**Why it needs a look.** Those rules cannot match again, [because the steps are no longer separate URLs and the booking HTML has been rebuilt from scratch](/widget/migration-changes#booking-steps-are-no-longer-separate-urls): different tags, different classes, different buttons.

**What to do.** Rebuild each conversion [on the Restoo Connect event that replaces it](/widget/connect-mappings), not on a URL. The events are already reaching you: [Restoo Connect](/widget/connect) translates every funnel step into the event each platform expects.

In Meta, for instance, the guest-details form arrives as `ViewContent`, a confirmed booking as `Schedule`, and one left pending confirmation or on a waiting list as `Lead`. Each booking fires a single conversion.

To decide which ones to mark as the primary conversion in your campaigns, see the [bidding and optimization guide](/widget/bidding-optimization).

## 4. Replace the UTM transfer script

**This affects you if** either of these URLs appears anywhere in your website's code:

```
https://cdn.myrestoo.net/js/iframeUtmTransfer.js
https://cdn.myrestoo.net/js/iframeUtmTransfer.v2.0.js
```

**Why it needs a look.** That script is what gets your campaigns' **UTM tags** into your Restoo reports, even when a visitor goes through several pages of your site before booking. v2 has its own.

**What to do.** Remove it and add the new script in its place: [Restoo Attribution Transfer](/widget/attribution-transfer) has the code and where to paste it.

Bear in mind that it goes on **every page of your site**, not just the one carrying the widget.

## Checklist

Go through this when you are done, before calling the change good.

* The widget is already migrated to v2, following the [installation migration guide](/widget/migration-embedded-install).
* Only one option is active for your events: your GTM, the direct destinations, or your own listeners.
* Your destinations' libraries are on your page and the widget loads **after** them.
* Your [consent platform](/widget/consent#what-a-consent-management-platform-is) is declared or your site calls `setConsent()`: with the widget embedded in your site you collect the consent.
* If you measure in GA4, [the property is declared](/widget/integrations#google-analytics-4).
* Your conversions are built [on events](/widget/connect-mappings), not on URLs or buttons.
* The old UTM transfer script is gone, and [Restoo Attribution Transfer](/widget/attribution-transfer) is on **every page**.
* [Each platform's extension](/widget/diagnostics#checking-that-events-fire) shows the events arriving.
* The old conversions and triggers are deleted.
* If you work with a marketing agency, they know you have migrated.

## Need help?

Email us at [soporte@restoo.me](mailto:soporte@restoo.me). If an agency or an external webmaster runs your campaigns, you can forward them this page as it is.
