Skip to content

Hive Setup

Fix what Hive Check found by writing the right tags, triggers, variables and consent wiring into your Google Tag Manager container, as a draft or published, with rollback.

Hive Setup fixes what Hive Check found by writing the right tags into your Google Tag Manager container. You check every change before anything is written, and you can roll the changes back afterwards.

Hive Setup is included in the Growth and Enterprise plans. Without it, the Hive Setup button on a site reads "Hive Setup is not included in your plan", and findings offer How to fix with the steps to do it yourself.

Before you start

  • Connect Google Tag Manager under Settings → Project → Integrations → Google Tag Manager.
  • Run Hive Check on the site, so Hive Setup knows what the site needs.
  • Applying the changes needs project admin access.

Open Hive Setup

There are three ways in:

  • On a site's page under Tools → Hive, select Hive Setup.
  • On a finding in a report, select Fix with Hive Setup. The wizard then says "Fixing one finding:" with the finding's title, and the plan holds only the changes that finding needs.
  • Under Server-side tagging, on the Use your existing container tab, select Set up server container. See Server-side tagging.

The steps

The wizard has five steps: Connect, Containers, Publish mode, Review and Apply.

1. Connect

Choose the Google Tag Manager connection Hive Setup should use, then select Continue.

  • If you have no connection yet, select Connect in Settings. The connection lives in Settings, under Integrations, so every part of My Journey Analytics uses the same one.
  • A connection made with our service account is marked (our service account). Only the containers you verified for it appear in the next step.
  • If a connection needs attention, select Open the connection and reconnect it in Settings, then come back.

2. Containers

Pick the containers on this site, then select Continue. Hive Setup only writes to the ones you pick.

  1. Choose the Account, if you have more than one.
  2. Choose the Web container.
  3. Optionally, choose the Server container, and enter the Server container address, for example https://sgtm.example.com. Hive Setup points the web tags and Google Analytics 4 forwarding at it.

When you came from the server-side page, the server container is the one you must pick, and the web container is optional.

3. Publish mode

Decide whether Hive Setup publishes for you or leaves a version for you to publish:

OptionWhat happens
Draft (recommended)Hive Setup writes to its own workspace and creates a new version. You review and publish it in Google Tag Manager. This is the default.
Publish for meHive Setup publishes the new version straight away. You can roll back to the previous live version from Hive Setup.

The choice is saved for the container and used every time Hive Setup changes it. Select Make the plan.

4. Review

Check every change before anything is written. Nothing is written until you apply.

Each row shows:

  • what the change does: Add, Update, Remove or No change;
  • the item's name and why it is needed;
  • Show what is written, with the exact settings;
  • where it goes: Web container, Server container or Destinations.

Items marked Required are always written. The others have a switch, so you can leave them out.

If the plan leaves something out because your plan doesn't include it, a note above the list says so. When your container already has everything, the step says "Nothing to change: your container already has everything".

Select Apply.

5. Apply

Hive Setup writes the changes. Google limits how fast we can go, so this takes a minute.

When it finishes:

  • In draft mode: "Version … is ready. Review and publish it in Google Tag Manager." Select Open Google Tag Manager to review and publish it.
  • In publish mode: "Published version …".

The list shows each item's result: Done, Failed, Rolled back or Waiting. If some items could not be written, the message says so, and the failed items show why. In publish mode, a version with failed items isn't published; publish it in Google Tag Manager once you have checked it.

If applying fails, you see "Apply did not finish. Nothing was published." with Back to review.

Then select Run Hive Check again to confirm the fixes. If you also picked a server container, select Set up the server container to run Hive Setup for it.

What Hive Setup writes

Every item is named "My Journey Analytics - …" in your container, so you can find it. Hive Setup also marks each one in its notes, so the next plan finds it again and updates it rather than adding a second copy. Keep the notes when you edit these items.

Workspace and versions

Hive Setup makes its changes in its own workspace, My Journey Analytics (Hive), so your other work in the container is untouched. Each apply creates a version named "My Journey Analytics setup" with the date and time in UTC.

If the container has no free workspace, the changes go into an existing workspace instead, and Hive Check can report No free workspace in the container.

Web container

NameKindWhenWhat it does
My Journey Analytics - LoaderTag (Custom HTML)AlwaysLoads My Journey Analytics on every page with your project key, through your custom tracking domain when you have one. It fires on Initialization - All Pages, before your other tags.
EventBuilt-in variableWhen events are forwardedTurns on the built-in Event variable, which the forwarder reads.
My Journey Analytics - Forwarded eventsTrigger (Custom Event)When events are forwardedFires for the dataLayer events you chose in event mapping.
My Journey Analytics - Event forwarderTag (Custom HTML)When events are forwardedSends those dataLayer events to My Journey Analytics with the other keys of each push as properties, renamed as you chose. The Loader fires first.
My Journey Analytics - User IDVariable (Data Layer Variable)Optional, off by defaultReads user_id from the dataLayer, for the identify tag.
My Journey Analytics - LoginTrigger (Custom Event)Optional, off by defaultFires when your site pushes a login event to the dataLayer.
My Journey Analytics - IdentifyTag (Custom HTML)Optional, off by defaultLinks events to the signed-in user when your site pushes dataLayer.push({ event: 'login', user_id: '...' }). Never use an email address as the ID.

The consent items are described below.

Server container

NameKindWhat it does
My Journey Analytics - Server tagTag templateThe My Journey Analytics tag template for server containers.
My Journey Analytics - All eventsTriggerFires for every event your server container receives.
My Journey Analytics - Server tagTagSends every event from your server container to My Journey Analytics, through your custom tracking domain when you have one, with the renames from event mapping.

The server tag is set up with your tracking domain and project key, the event's client_id as the visitor ID, Identified users only for person profiles, and Record page_view as a pageview, Rename standard web fields and Send the visitor's IP address turned on. The fields are described in Server-side Google Tag Manager.

Destinations

When the check found a Google Analytics 4 tag on your site, the plan includes a Google Analytics 4 destination, named with your Measurement ID, for example Google Analytics 4 (G-XXXXXXXXXX). It is optional and switched on in the review.

The destination sends pageviews, plus the forwarded events whose names Google Analytics accepts. With a server container address, it sends them through your server container (the address followed by /mp/collect). An existing destination keeps its own event filters.

Finish in Destinations

The Google Analytics 4 destination stays off until you add your stream's Measurement Protocol API secret. After applying, the Apply step says "GA4 forwarding is set up as a destination. Add your GA4 API secret there to start sending events."

  1. Select Finish in Destinations.
  2. In Google Analytics, open your web data stream, then Measurement Protocol API secrets, and create a secret.
  3. Paste it into API secret and save.

The destination's other fields are described in Send My Journey Analytics events to your server container.

When GA4 forwarding isn't in your plan

GA4 forwarding is included in the Growth and Enterprise plans. Without it, the plan leaves the destination out, and the review says "GA4 forwarding isn't included in your plan, so this plan leaves out the Google Analytics 4 destination. Contact us to add it." The rest of the plan is written as usual.

In the same way, Hive Setup can only set up a server container when your plan includes server-side tagging.

Hive Setup adds consent items when the check shows they are needed.

When the check saw no Google Consent Mode default, or saw one set too late or without the v2 signals, the plan adds the tag template and tag My Journey Analytics - Consent defaults. It fires on Consent Initialization - All Pages, before any other tag, and sets:

Consent typeDefault
analytics_storagedenied
ad_storagedenied
ad_user_datadenied
ad_personalizationdenied
functionality_storagedenied
personalization_storagedenied
security_storagegranted

It applies everywhere (no regions), waits 500 milliseconds for your consent banner to send an update, leaves URL passthrough off and turns ads data redaction on. You can change these on the tag in Google Tag Manager.

If your site already sets consent mode defaults, Hive Setup doesn't add a second default that would fight it. Before the site's first check, the consent defaults are offered as an optional item, switched off.

Following the visitor's choice

When your site has a cookie banner or consent mode, or the plan adds consent defaults, the plan adds the tag template and tag My Journey Analytics - Consent sync. My Journey Analytics then captures while analytics_storage is granted and stops when it is denied. The Loader starts with capturing off, and the Consent sync tag turns it on when the visitor grants analytics consent.

OneTrust and Cookiebot

When your OneTrust or Cookiebot banner doesn't update consent mode, the plan adds a bridge that turns the banner's choices into consent mode updates:

  • the tag template My Journey Analytics - Consent banner bridge;
  • a trigger, My Journey Analytics - OneTrust consent changed or My Journey Analytics - Cookiebot consent changed, that fires when the banner reports a choice;
  • a tag, My Journey Analytics - OneTrust consent or My Journey Analytics - Cookiebot consent, that fires on Consent Initialization - All Pages and when the banner changes.

The bridge maps the banner's categories like this:

Consent typeOneTrust groupCookiebot category
analytics_storageC0002 (performance)statistics
functionality_storage, personalization_storageC0003 (functional)preferences
ad_storage, ad_user_data, ad_personalizationC0004 (targeting)marketing

Use the bridge only when the banner's own consent mode integration isn't set up.

For other ways to respect consent, see Respect consent and Privacy controls.

Roll back

After applying, select Roll back on the Apply step.

  • In publish mode, we publish the version that was live before Hive Setup ran.
  • In draft mode, we remove what Hive Setup added and restore what it changed in its workspace, in a new version named "My Journey Analytics setup rolled back" with the date and time. Publish that version in Google Tag Manager.

The Google Analytics 4 destination is turned off, never deleted. When it finishes, the step says "The changes were rolled back. Your container is as it was before."

Can't find what you need? Contact support