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

# Analytics setup

> Register two custom dimensions in GA4 so microsite visits can be credited with the revenue they influence.

## Overview

Your microsite sends two signals to your Google Analytics 4 property that mark a person as someone who visited it. Once you register those signals as custom dimensions, your reports can answer a question a page-based report cannot: **how much revenue came from people who used the microsite**, including people who booked days or weeks later.

<Info>
  Who does this: whoever administers your GA4 property. It takes about five minutes, then 24–48 hours before the data appears in reports.
</Info>

You only do this once per GA4 property.

## Why a page filter is not enough

A page-based report can tell you that someone viewed a guide. It cannot connect that view to a booking made on a later visit, because the two sit in different sessions.

The signals below are attached to the **person** rather than the visit. They travel with that person across sessions and devices, so a purchase three weeks later still carries the mark. That is the whole reason this setup exists.

## What your microsite sends

<Info>
  Both signals are only ever set to `true`, and are never set back to `false`. GA4 keeps the most recent value of a user property, so writing `false` would erase a mark the visitor had already earned.
</Info>

| User property | Set when | Meaning |
| - | - | - |
| `obvlo_microsite_visitor` | The visitor views any microsite page | They used the microsite at some point |
| `obvlo_microsite_origin` | The visitor **arrives** on a microsite page | The microsite is how they found you |

`obvlo_microsite_origin` is a subset of `obvlo_microsite_visitor`. Anyone who arrived on a microsite page has by definition visited one, so the origin figure should never exceed the visitor figure.

Someone who lands on your homepage and then clicks through to a guide is a **visitor** but not an **origin**. They found you another way, and the microsite assisted rather than originated the visit.

## Before you start

* You have the **Editor** or **Administrator** role on the GA4 property.
* Your Obvlo site is configured with a GA4 measurement ID, in the form `G-XXXXXXXXXX`. If it is configured with a Google Tag Manager container ID instead, see [If you use Google Tag Manager](#if-you-use-google-tag-manager) below.
* The property has fewer than 25 user-scoped custom dimensions. That is a hard GA4 limit, and these two count toward it.

## Register the custom dimensions

Do this twice — once for each property in the table above.

<Steps>
  <Step title="Open custom definitions">
    In Google Analytics, click **Admin**. Under **Data display**, click **Custom definitions**.
  </Step>

  <Step title="Create the dimension">
    On the **Custom dimensions** tab, click **Create custom dimension**.
  </Step>

  <Step title="Set the scope to User">
    Choose **User** from the **Scope** menu. This is the step that matters most — an event-scoped dimension will collect data but will not follow the visitor into a later session, which defeats the purpose.
  </Step>

  <Step title="Name it and point it at the user property">
    Enter a **Dimension name** you will recognise in reports, such as `Obvlo microsite visitor`. In the **User property** field, enter the exact value from the table above, for example `obvlo_microsite_visitor`.
  </Step>

  <Step title="Save, then repeat">
    Click **Save**, then repeat for `obvlo_microsite_origin`.
  </Step>
</Steps>

<Warning>
  Register these before or at launch. Custom dimensions are not retroactive — GA4 will not apply a new dimension to data it collected before the dimension existed, so any period before you complete this step cannot be reported on.
</Warning>

## Check it is working

Registration and reporting happen on different clocks, so check them separately.

<Tabs>
  <Tab title="Straight away">
    Open **Reports**, then **Realtime**, and visit one of your microsite pages yourself. Confirm you appear as an active user. This tells you the tag is firing, though it does not yet show the user property.
  </Tab>

  <Tab title="After 24-48 hours">
    Build a report or exploration and add your new dimension. You should see `true` against visitors who reached a microsite page.

    Two things are normal here. The dimension takes 24–48 hours to become usable after you create it, and it will only ever show `true` — there is no `false` value, because visitors who have not been to a microsite page simply have no value set.
  </Tab>
</Tabs>

If the dimension is still empty after 48 hours, confirm the scope is set to **User** and that the **User property** field matches the name in the table exactly, including underscores.

## If you use Google Tag Manager

If your Obvlo site is configured with a Google Tag Manager container ID (`GTM-XXXXXXX`) rather than a measurement ID, these signals will not reach your GA4 property yet.

A GA4 tag hosted inside a GTM container only reads user properties from fields set on the tag itself. It does not pick up properties sent alongside it on the page, so the two signals stop at the container.

Contact your Obvlo representative with your **GA4 measurement ID** — the `G-XXXXXXXXXX` value from **Admin**, then **Data streams**, then your web stream. Support for container-based setups is in progress, and the measurement ID is what we need to enable it.

## Related

<CardGroup cols={2}>
  <Card title="Microsite overview" icon="globe" href="/microsite/overview">
    How the microsite is delivered and where it sits on your domain.
  </Card>

  <Card title="Analytics" icon="chart-line" href="/product/insights/analytics">
    Event data from Obvlo delivery channels in your analytics setup.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.