Google Publisher Console messages

This page describes the various messages you can encounter when viewing the Google Publisher Console Page Request tab. Each message is assigned a severity, which indicates the relative importance of the issue being reported.

Error
GPT encountered a problem that prevented it from performing an action. Messages at this level should be addressed immediately to ensure ads are able to load properly.
Warning
GPT encountered a problem while performing an action, but was able to continue. The action may or may not have been successful. Messages at this level should be reviewed regularly and addressed as necessary to ensure ads are being loaded correctly.
Information
GPT performed an action. Messages at this level are purely informative and do not require attention.

Message variables

Many Google Publisher Console messages use variables to provide additional context that's useful for debugging. In this document, message variables are shown as capitalized strings which describe the value they represent, preceded by a $ character. For example, $DIVID would represent the ID of a <div> element unique to your page.

Messages shown here may not exactly match what you see in the Google Publisher Console. If you're having trouble locating a specific message reported in the console, try searching for parts of the message that do not contain any values that are specific to your site.

Error messages

Message

Div ID passed to googletag.display() does not match any defined slots: $DIVID.

Issue

Attempted to display an ad slot that was not previously defined.


Details

The specified $DIVID value passed into googletag.display() has not been associated with a GPT ad slot. Ensure that:

  1. The $DIVID value is correct.
  2. Your code contains a corresponding call to googletag.defineSlot(..., $DIVID).
  3. The call to googletag.display() occurs after the call to googletag.defineSlot().
See Getting Started with Google Publisher Tags for more information.

Error in googletag.defineSlot: Cannot create slot $ADUNITPATH. Div element "$DIVID" is already associated with another slot: $OTHERADUNITPATH.

Issue

Unable to create an ad slot with the specified div ID. The ID is currently associated with another ad slot.


Details

Every GPT ad slot must be associated with a unique <div> element. The ID of this element ($DIVID) is provided as a parameter to defineSlot(). To address this issue, first locate the two offending calls in your code:

  • googletag.defineSlot($ADUNITPATH, ..., $DIVID)
  • googletag.defineSlot($OTHERADUNITPATH, ..., $DIVID)
Update or remove one call to ensure unique $DIVID values.

Exception in $TYPE event listener: "$ERROR".

Issue

An unhandled exception was encountered while executing a GPT event listener.


Details

A user-defined event listener for event type $TYPE caused an error. Review the provided $ERROR message for more information and take appropriate action to resolve the issue in the event listener.

Learn about supported GPT events and see examples of how to use them in the ad event listeners sample.

Exception in googletag.cmd function: $ERROR.

Issue

An unhandled exception was encountered while executing a function in the GPT command queue.


Details

A function added to the GPT command queue caused an error. Review the provided $ERROR message for more information and take appropriate action to resolve the issue in the queued function.

Warning messages

Message

$ADFORMAT ad slot ineligible as page is not mobile optimized: $ADUNITPATH.

Issue

The specified ad slot is only eligible on mobile optimized pages.


Details

For a page to be considered mobile optimized, the zoom level must be neutral. Typically, this is accomplished by adding the following to the <head> of the page:

<meta name="viewport" content="width=device-width, initial-scale=1">

Beta keys cannot be cleared. clearTargeting() was called on $BETAKEY.

Issue

Attempted to clear beta keys.


Details

Once set, beta keys cannot be modified or unset. Ensure that beta keys are only set when beta functionality is desired for the life of the page. Additionally, you should ensure that your code does not call clearTargeting() without parameters when beta keys are in use.

Cannot find targeting attribute "$KEY" for "$SERVICEORSLOT".

Issue

The targeting key for the specified service or slot could not be found.


Details

An unknown targeting key was specified as a parameter to either PubAdsService.setTargeting() or Slot.setTargeting(). Before a key can be used for targeting, it must be defined within the Google Ad Manager network from which targeted ads will be requested.

See Get started with key-values for more information.

Checking googletag.pubadsReady is discouraged. Please use googletag.cmd.push instead.

Issue

The googletag.pubadsReady flag has been deprecated.


Details

References to this flag should be removed from your code. This flag is no longer supported and may be removed in a future release.

The GPT command queue can be used as a replacement. Code added to the command queue will not be run until PubAdsService is enabled, loaded, and fully operational.

Error in googletag.display: could not find div with id "$DIVID" in DOM for slot: $ADUNITPATH.

Issue

Attempted to display the ad slot associated with the specified div ID, but no div element with that ID could be found on the page.


Details

The specified $DIVID value passed into display() does not correspond to an element on the page. Ensure that:

  1. The $DIVID value is correct.
  2. The page contains a <div id="$DIVID">...</div> element.
  3. The element is defined and present on the page before the call to display().
See Getting Started with Google Publisher Tags for more information.

Failed to register listener. Unknown event type: $TYPE.

Issue

Attempted to register an event listener, but the specified event type is not defined by GPT.


Details

An invalid event type was specified when calling PubAdsService.addEventListener().

Learn about supported GPT events and see examples of how to use them in the ad event listeners sample.

Ignoring a call to setCollapseEmptyDiv(false, true). Slots that start out collapsed should also collapse when empty. Slot: $SLOT.

Issue

An invalid collapseEmptyDiv() configuration was specified. The specified configuration was ignored.


Details

Slots configured to collapse before an ad is fetched must also be configured to collapse when empty. This is to ensure that the behavior of the slot is predictable in the event that it cannot be filled.

See the collapse empty ad slots sample to learn more about properly configuring the collapseEmptyDivs() feature.

Ignoring the $METHODNAME($ARGS) call since the service is already enabled.

Issue

The specified method was called after the PubAdsService was enabled.


Details

Certain PubAdsService settings become unmodifiable once the service is enabled. The specified method call ($METHODNAME) attempted to modify one of these settings after service enablement. If modifying this setting is necessary, ensure the method call comes before the call to enableServices().

Invalid argument: $METHODNAME($ARG). Valid values: $VALUES.

Issue

An invalid enum value was passed to the specified GPT method.


Details

The specified GPT method ($METHODNAME) only accepts enum values from the list provided ($VALUES).

Refer to the GPT reference documentation for more information.

Invalid arguments: $METHODNAME($ARGS).

Issue

An invalid argument was passed to the specified GPT method.


Details

The arguments ($ARGS) passed to the specified GPT method ($METHODNAME) were incorrect or improperly formatted.

Refer to the GPT reference documentation for more information.

Invalid object passed to $METHODNAME($ARGS), for $KEY: $VALUE.

Issue

An invalid object was passed to the specified GPT method.


Details

The arguments ($ARGS) passed to the specified GPT method ($METHODNAME) contained an object with an incorrect or improperly formatted key-value pair ({$KEY: $VALUE}).

Refer to the GPT reference documentation for more information.

Publisher betas $BETAKEYS were declared after enableServices() was called.

Issue

Attempted to declare beta keys after the PubAdsService was enabled.


Details

Beta keys must be set before enableServices() is called. Once set, these keys cannot be modified or unset. Because of this, you should ensure that beta keys are only set when beta functionality is desired for the life of the page.

Publisher betas may only be declared once. $BETAKEYS were added after betas had already been declared.

Issue

Attempted to declare beta keys more than once.


Details

Individual beta keys may only be set once, before enableServices() is called. Once set, these keys cannot be modified or unset. You should ensure that beta keys are only set when beta functionality is desired for the life of the page.

Refresh was throttled for slot: $ADUNITPATH.

Issue

Attempted to refresh an ad slot too quickly. The refresh request was ignored.


Details

There were multiple calls to PubAdsService.refresh() for the specified ad slot ($ADUNITPATH) in a short period of time. The most recent call was ignored. Ensure you are adhering to refresh() best practices before retrying.

SRA requests may include a maximum of 30 ad slots. $NUMATTEMPTED were requested, so the last $NUMIGNORED were ignored.

Issue

Too many ad slots were included in a Single Request Architecture (SRA) request, preventing some slots from being loaded.


Details

The maximum number of ad slots allowed in a single SRA request (30) was exceeded. Ad slots above this maximum were ignored ($NUMIGNORED), preventing them from being filled.

To address this, batch the slots into multiple SRA requests as shown below. Note that this example uses a maximum of 5 slots per request for illustrative purposes.

// Define first batch of slots.
googletag.defineSlot(..., 'ad-slot-1')
         .addService(googletag.pubads());
...
googletag.defineSlot(..., 'ad-slot-5')
         .addService(googletag.pubads());

// Enable SRA and services.
googletag.pubads().enableSingleRequest();
googletag.enableServices();

// Issue first SRA request (ad-slot-1 to ad-slot-5).
googletag.display('ad-slot-5');

// Define second batch of slots.
googletag.defineSlot(..., 'ad-slot-6')
         .addService(googletag.pubads());
...
googletag.defineSlot(..., 'ad-slot-10')
         .addService(googletag.pubads());

// Issue second SRA request (ad-slot-6 to ad-slot-10).
googletag.display('ad-slot-10');

Size mapping is null because invalid mappings were added: $MAPPINGS.

Issue

A SizeMappingBuilder could not be built, since invalid mappings were specified.


Details

A call to SizeMappingBuilder.build() returned null, because the builder contained invalid size mappings ($MAPPINGS). Fix or remove the invalid mappings before retrying.

See the ad sizes guide for more information.

Slot $DIVID cannot be refreshed until PubAdsService is enabled.

Issue

Attempted to refresh an ad slot before enabling PubAdsService.


Details

GPT ad slots start out empty and cannot be filled until services are enabled via enableServices(). Prior to this, calls to PubAdsService.refresh() have no effect.

See the control ad loading and refresh guide for more information.

Slot object at position $POSITION is of incorrect type.

Issue

An invalid slot object was included in an array passed to clear() or refresh() at the specified position.


Details

A slot object at position $POSITION in an array passed to either PubAdsService.clear() or PubAdsService.refresh() was invalid. This usually indicates that the slot object was previously destroyed via a call to destroySlots().

Slots cannot be cleared until service is enabled.

Issue

The PubAdsService.clear() method was called before the service was enabled.


Details

GPT ad slots start out empty and cannot be filled until:

  1. Services are enabled via enableServices().
  2. Ads are requested via a call to PubAdsService.display() or PubAdsService.refresh().
Prior to this, calls to PubAdsService.clear() have no effect.

See the control ad loading and refresh guide for more information.

The unique SafeFrame domain setting in Google Ad Manager conflicts with the "useUniqueDomain" setting passed to the setSafeFrameConfig API method. GPT will use useUniqueDomain=$APISETTING based on the API call.

Issue

The useUniqueDomain setting passed to setSafeFrameConfig() conflicts with the network-level setting configured in Google Ad Manager.


Details

The useUniqueDomain SafeFrame security setting may be specified in multiple ways. When conflicting values are provided, they are evaluated in the following order:

  1. Google Ad Manager SafeFrame security network-level setting.
  2. PubAdsService.setSafeFrameConfig() setting.
  3. Slot.setSafeFrameConfig() setting.
The last provided setting to be evaluated takes precedence over all others.

This warning indicates that a network-level setting is present, but is being overridden with a different value ($APISETTING) at the GPT service- or slot-level. If this is not intended, either adjust the network-level setting or remove the GPT override.

To reserve space and reduce layout shifts, consider setting min-width=$MINWIDTHpx, min-height=$MINHEIGHTpx styles on the div element with id=$DIVID. Learn more: https://developers.google.com/publisher-tag/guides/minimize-layout-shift

Issue

An ad slot with no reserved size was detected.


Details

The specified ad slot div ($DIVID) did not reserve any space on the page, which may cause a layout shift when ad content loads. This negatively impacts your site's Cumulative Layout Shift (CLS) score. Consider reserving at least $MINWIDTH by $MINHEIGHT pixels for this element via CSS, as shown in the minimize layout shift guide.

setCorrelator has been deprecated. See the Google Ad Manager help page on "Creative selection for multiple ad slots" for more information: https://support.google.com/admanager/answer/183281.

Issue

The setCorrelator() method is deprecated.


Details

References to this method should be removed from your code. This method is no longer supported and may be removed in a future release.

updateCorrelator has been deprecated. See the Google Ad Manager help page on "Creative selection for multiple ad slots" for more information: https://support.google.com/admanager/answer/183281.

Issue

The updateCorrelator() method is deprecated.


Details

References to this method should be removed from your code. This method is no longer supported and may be removed in a future release.