Home Marketing Set up Google Tag Manager and Google Analytics 4

Set up Google Tag Manager and Google Analytics 4

Last updated on Sep 17, 2026

Connect Google Tag Manager to your store, then use it to set up Google Analytics 4.

Google Tag Manager manages the tracking codes on your website or app. Those codes are called tags. You add one small piece of Google Tag Manager code to your site. After that you control Google Analytics, ads and other tracking tools from a web interface, without changing the code each time.

Before you start

  • Google Tag Manager is a powerful tool. It is strongly advised that advanced users set it up. You can add TikTok, Google Ads and Snapchat tracking with it.
  • See the list of supported integrations.

Steps

Create a Google Tag Manager account

  1. Go to tagmanager.google.com.

  2. Log in, or create a new Google account.

  3. Click Create Account.

    The Create Account button in Google Tag Manager

  4. Enter your company name and location, and choose whether to share anonymous data.

  5. Enter a container name and choose Web.

    Naming the container and choosing Web

  6. The terms and conditions page opens. Click Yes.

  7. Copy the Tracking ID shown on the next page.

    Copying the Tracking ID from Google Tag Manager

Connect it to your store

  1. Go to Marketing and select Tracking & Social Media.

    The Tracking and Social Media page in the dashboard

  2. Paste the Tracking ID in the box under Google Tag Manager.

  3. Click Connect. The dashboard checks the ID and shows a confirmation message.

    The Google Tag Manager box with a connected Tracking ID

Watch a short video of this

Add Google Analytics 4

Import the template

  1. Download the template: GA4 - Templates v4.json.

  2. Go back to your workspace on tagmanager.google.com and click Admin.

    The Admin link in Google Tag Manager

  3. Click Import Container.

    The Import Container option under Admin

    The import container screen

  4. Select the file you downloaded, then click Existing.

    Choosing Existing when importing the container

  5. If you are asked to select a workspace, click Default Workspace.

    Selecting the Default Workspace

  6. Click Confirm at the bottom of the page.

    The Confirm button at the bottom of the import page

  7. Go back to your workspace. The imported Tags, Triggers and Variables are now there.

    The imported tags, triggers and variables in the workspace

Add your measurement ID

  1. In Google Analytics, go to Admin and select Data Streams.

  2. Copy the Measurement ID.

  3. In Google Tag Manager, go to Variables and open GA4 Measurement ID.

  4. Replace ADD_YOUR_GOOGLE_ANALYTICS_4_CODE_HERE with your measurement ID. Use a G-XXXXXXX property, not a Universal Analytics UA-XXXXX property.

    Pasting the measurement ID into the GA4 Measurement ID variable

Publish

  1. Click Submit.

    The Submit button in Google Tag Manager

  2. Click Publish.

    The Publish button in Google Tag Manager

  3. Click Skip.

    The Skip option on the version screen

Data starts to reach your Google Analytics 4 account within 48 hours. The Realtime tab in Google Analytics shows real-time data.

Best practice

Turn off enhanced measurement so events are not counted twice. In Google Analytics 4, go to Property Settings, then Data Streams, click the stream, and turn off enhanced measurement.

Turning off enhanced measurement on a GA4 data stream

You can now explore the other tag integrations and the community gallery.

Zyda's storefront is a single-page application. Tell the person setting up Tag Manager that page views may not always work. We suggest using our custom data layer event called page_view.

To learn more about the data layer, read [Advanced] What data does Zyda push to the Google Tag Manager Data Layer.

Watch a short video of this