Skip to content
Adrythm

ReferenceTracking error

Missing gtag config command

The Google tag's configuration command is missing or wrong on the page, so automatic events are not measured. Google's fix is to place the configuration code immediately after the opening head tag on every page. Check for a second copy from a website builder or plugin, since two copies can double count page views. Then confirm in Tag Assistant that the command fires.

At a glance

Where it shows
The Diagnostics tab in the Google tag settings, under Tag quality.
What stops
Automatic events, the page views and clicks Google measures without a custom event.
How serious
Medium. Reports lose the automatic events, and any event that depends on the configuration reads low or empty.

What it means

The Google tag's configuration command tells the tag which measurement product to send to and which page it is on. Google's message says that command is incorrect or missing, so automatic events may not be measured. The tag can load and still fail to send these events.

The fix is about where the code sits on the page, not about the Tag Manager container. Google's page places it immediately after the opening head tag, on every page.

What actually triggers it

  1. Configuration code lower in the page

    The configuration code sits after other scripts or inside a section that loads late. Google's fix moves it up to sit right after the opening head tag, so the code should move, not be copied again.

  2. A second copy from a website builder or plugin

    Not on Google's help page

    A builder or plugin ships its own gtag code alongside a copy from the container or the site's head. A builder's copy can double count page views, so decide which copy stays before adding another.

  3. Configuration dropped in a theme edit

    Not on Google's help page

    A theme or template change replaces the head section and drops the code. Nothing errors on the page, so the message is the first sign.

Fix it in this order

  1. Open the Diagnostics tab in the Google tag settings and read the Missing gtag config command message.
  2. View the page source of one affected page and find the Google tag. Check whether it sits directly after the opening head tag.
  3. Move the configuration code so it sits immediately after the opening head tag. Then remove any second copy from a builder or plugin that you do not need. If the builder's own copy has to stay and page views double in Google Analytics DebugView, set send_page_view to false on the Google tag.
  4. Publish the change to the live site, then reload the page.
  5. Confirm in Tag Assistant that the configuration command fires on the page, then check the Diagnostics tab again.

If the message stays with one copy on the page, the template for that page type is probably the cause. Check the other page types on the site before changing the code again.

Often confused with

  • Missing Google tags

    Event tags with no base Google tag in the container. Here the base tag is present and its configuration is what fails, so the container is not the place to fix it.

  • Missing conversion linker

    A Google Ads or Floodlight tag exists, but the container has no conversion linker. That needs a container change, not code moved in the head.

Still have a question this page did not answer?

Ask it on a call. Thirty minutes, a straight answer, and no follow-up sequence if you decide not to work with us.