Skip to main content
Restoo Attribution Transfer is a small script for your website that stops attribution getting lost before the guest books. The problem it solves is a common one: an ad drops a visitor on your homepage with campaign parameters and a click identifier in the URL, they browse around, and by the time they reach your reservations page those parameters are gone from the address bar — so the booking is recorded with no attribution at all, and the ad platform never learns that its click ended in a booking. Add the script to every page of your website and those parameters are captured wherever the visitor lands, then carried through to the page where they book. It works the same whether the widget is embedded in your site or your guests book on your Restoo page. Nothing is stored without the visitor’s permission.

What it carries

Two groups of parameters, kept apart because they feed two different attributions: Where each group travels depends on where the guest books. With the widget embedded in your site, the campaign reaches the widget on its own — Restoo.js hands it over — and the click IDs stay on your page, which is where your pixels run and read them. On your Restoo page, the script writes both groups into the link as the visitor follows it, so the widget reads the campaign and the pixels Restoo loads read their click ID from the address. Each group is replaced whole and never touches the other: a new campaign without a click ID keeps the click ID stored earlier, and a new click ID without a campaign keeps the campaign. A link to your Restoo page that already declares its own campaign keeps it and still receives the click IDs; one that already carries a click ID, from any platform, receives no other.

Installation

1

Add the script to every page of your website

Paste it just before your closing </body> tag.
Why every page? You can’t know which page a campaign will land on, and if the script isn’t running there, those parameters are never stored: they are lost the moment the visitor moves to the next page.
2

Declare the consent

Without consent the script stores nothing. There are two ways to declare it:
Recommended if your consent platform is a supported one. You declare it with data-restoo-cmp on the <script> itself.
Consent is declared in one of two ways, and the script behaves the same either way: Everything else, capturing the URL parameters and handing them over to the widget and to the link, happens automatically.

data-restoo-cmp

An attribute on the <script>. Declares the consent management platform installed on your website, which Restoo Attribution Transfer reads the visitor’s decision from, including when they change it later. A withdrawal read from that platform deletes anything already stored.
Values
"COOKIEBOT" | "GOOGLE_CONSENT_MODE"
The consent platform the decision is read from. Leave the attribute out and the consent only ever arrives through setConsent(). What each value covers, and where it reads from, is in Consent.

setConsent(signals)

You report the visitor’s decision yourself, instead of Restoo Attribution Transfer reading it from your platform. Call it from your cookie notice when the visitor accepts and when they withdraw consent.
Reporting "denied" deletes anything already stored, so a withdrawal needs no separate call.
Parameters
object
required
An object with the Google Consent Mode v2 ad_storage signal — storage for advertising purposes — whose value must be exactly "granted" or "denied". It is the only signal this script uses: pass your platform’s whole consent object and the rest are discarded.
Without permission you don’t lose all the attribution, only the hop between pages. A visitor who arrives from the ad and books without wandering is attributed all the same, because the campaign is still in the address. One who passes through several pages before booking is not — and carrying that across is exactly what this script adds. The same goes for the ad click: the pixel reads it for free from the address it lands on, and remembering it for the next page needs the permission. Campaign attribution covers what needs consent and what doesn’t. The asking is yours, not Restoo’s: the script runs on your own domain, so the one putting the question is your consent platform or your own cookie notice. Restoo only receives the answer. And what it stores is always the last campaign and the last click, each group on its own, expiring after 30 days: the full model is in Campaign attribution.

Next steps

Campaign attribution

The full rule: last touch, default values, and the acquisition object.

Consent

How you declare your consent platform, and what each signal unlocks.