WebmeticDocs
Get startedDetectEnrichPersonalizeIntegrateManagePartnersDevelopers

Google Tag Manager

Add the tracking code with the Webmetic template in Google Tag Manager, without changing your website's code.

Recommended: Google Tag Manager, if your website already uses it. Then nobody has to touch your website's code.

At the end, the tracking code runs on every page and your website shows as Active in Webmetic.

  1. 1Copy your account ID
  2. 2Add the template
  3. 3Tag and trigger
  4. 4Publish
  5. 5Active

Before you start

  • Time: Setup in Google Tag Manager takes a few minutes, and the first data arrives after a few minutes.
  • Account: You need a Webmetic account, but no admin rights in it. Your website must be listed under Menu > Websites.
  • Access: Your website already runs a Google Tag Manager web container. The template doesn't support server containers or other container types.
  • Rights: You can edit and publish the container in Google Tag Manager. Otherwise, pass this guide to the person who manages the container.
  • Plan: The installation works on every plan and costs no credits. You can watch session recordings during the trial and on the Growth plan or higher.

If your website doesn't use Google Tag Manager, choose another method under Installation.

1. Copy your account ID

The template needs your account ID so that Webmetic can assign the visits to your account.

  1. In Webmetic, open Menu > Tracking code. The Tracking Code window opens.
  2. Under Choose a method, click Google Tag Manager. Webmetic shows the step Install the GTM template with your Account ID.
  3. In the Account ID box, click Copy ID.
The Google Tag Manager method with the account ID and the Copy ID and Open GTM template buttons
The Google Tag Manager method with the account ID and the Copy ID and Open GTM template buttons

2. Add the template

The template for the tracking code is called Webmetic and lives in the Google Tag Manager gallery. The Open GTM template button shows the template there, but you add it directly in your container:

  1. Open Google Tag Manager and select your website's account and container.
  2. In your workspace, click Templates.
  3. In the Tag Templates section, click Search Gallery.
  4. Search for "Webmetic" and click the Webmetic template.
  5. Click Add to workspace. A dialog shows what the template is allowed to do.
  6. Confirm the dialog with Add. The template is now in your workspace.
The Webmetic template in the gallery with the Add to workspace button and its two permissions
The Webmetic template in the gallery with the Add to workspace button and its two permissions

3. Create the tag

  1. Click Tags, then New.
  2. Click the Tag Configuration box.
  3. In the list of tag types, select Webmetic. The template shows the fields Account-ID and Enable Session Replay, in English in every Google Tag Manager language.
  4. Paste your account ID into the Account-ID field. If the ID has the wrong format, the template reports "Invalid Account-ID".
  5. Optional: If your plan includes session recording, turn on Enable Session Replay.

With the box ticked, Webmetic records mouse movements, clicks, and scrolling, and hides anything typed into form fields. The box is unticked by default in the template, but ticked in the HTML tracking code.

4. Choose the All Pages trigger

  1. Below that, click the Triggering box.
  2. Select the All Pages trigger, which has this name in every Google Tag Manager language. The tag now fires on every page view.
The finished Webmetic tag with Account-ID, Enable Session Replay and the All Pages trigger
The finished Webmetic tag with Account-ID, Enable Session Replay and the All Pages trigger

If your website changes pages without reloading, the tracking code picks that up by itself, and you don't need an extra trigger.

The Consent Initialization trigger isn't the right choice, because Google meant it only for consent tools.

Loading after consent is possible

The script doesn't set its own cookies, but it reads the ID of a Google Analytics cookie if one exists. Whether the code may load before consent is something to settle with your data protection advisor.

If it should load only after consent, choose a trigger that fires after consent instead of All Pages. Webmetic then only records visits with consent.

You'll find the text for your privacy policy in the Tracking Code window under Privacy notice. It's also under Add the privacy notice in German and English.

5. Save and publish

Saved changes don't run on your website yet, because only publishing puts the tag live.

  1. Give the tag a name, for example "Webmetic".
  2. Click Save. The tag is now in your workspace.
  3. Click Submit in the top right. The Submit Changes screen opens.
  4. Select Publish and Create Version.
  5. Optional: Under Version Name, enter a name, for example "Webmetic added".
  6. Click Publish. From now on, every page of your website loads the tracking code through Google Tag Manager.

Check your installation

  1. In Webmetic, switch to the Tracking Code window.
  2. Under Verify installation, click Quick check. As soon as visits arrive, Webmetic shows the message Data received.
The quick check with the result Data received
The quick check with the result Data received

While Webmetic shows the message No data yet, wait a few minutes. If your website gets little traffic, open one of its pages yourself.

  1. Optional: Under Verify installation, click Deep check. Webmetic opens your website and actively looks for the tracking code.

The deep check takes about 30 seconds and also recognizes an installation through Google Tag Manager. Webmetic only checks the first website in your account, and only its start page.

When the deep check finds the code, it shows the message Tracking code installed correctly. Below that, it shows whether the code loads only after cookie consent and whether session recording is active.

  1. Open Menu > Websites. In Website management, your website shows as Active.
The website management with the status Active
The website management with the status Active

Active means that Webmetic received data with your account ID in the last 24 hours. If your account is new, this starts your trial.

When the first companies appear depends on how much traffic your website gets.

If nothing arrives, check these points:

  • You published the container, because saving alone isn't enough.
  • The tag uses the All Pages trigger. With a consent trigger, data only arrives once someone consents.
  • The account ID in the tag is correct. Otherwise, the deep check shows the message Wrong account ID found.
  • No cache is still serving the old version of your website.

For details, see Check your installation.

Next steps

On this page