diff --git a/modules/intentIqIdSystem.js b/modules/intentIqIdSystem.js index 054afe82371..c064719ae88 100644 --- a/modules/intentIqIdSystem.js +++ b/modules/intentIqIdSystem.js @@ -208,9 +208,16 @@ export function setGamReporting(gamObjectReference, gamParameterName, userGroup, if (isBlacklisted) return; if (isPlainObject(gamObjectReference) && gamObjectReference.cmd) { gamObjectReference.cmd.push(() => { - gamObjectReference - .pubads() - .setTargeting(gamParameterName, userGroup); + if (typeof gamObjectReference.setConfig === 'function') { + gamObjectReference.setConfig({ + targeting: { + [gamParameterName]: userGroup + } + }); + return; + } + // Fallback in case an older version of Google Publisher Tag is used. + gamObjectReference?.pubads?.()?.setTargeting?.(gamParameterName, userGroup); }); } }