From 3a7cf3912a992830a24bdf87e156e677eb56caca Mon Sep 17 00:00:00 2001 From: Oleksii Petrychenko Date: Tue, 24 Feb 2026 20:02:01 +0200 Subject: [PATCH 1/2] AGT-803-Deprecated-GAM-methods-module --- modules/intentIqIdSystem.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/modules/intentIqIdSystem.js b/modules/intentIqIdSystem.js index 054afe82371..6d5dbf04bf2 100644 --- a/modules/intentIqIdSystem.js +++ b/modules/intentIqIdSystem.js @@ -208,9 +208,21 @@ 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') { + const currentConfig = typeof gamObjectReference.getConfig === 'function' + ? gamObjectReference.getConfig('targeting') + : {}; + const updatedConfig = { + targeting: { + ...(isPlainObject(currentConfig) ? currentConfig.targeting : {}), + [gamParameterName]: userGroup + } + } + gamObjectReference.setConfig(updatedConfig); + return; + } + const pubads = gamObjectReference?.pubads?.(); + if (pubads?.setTargeting) pubads.setTargeting(gamParameterName, userGroup); }); } } From 5a65757a86aafbac614acd5d829d12bc4984d87c Mon Sep 17 00:00:00 2001 From: Oleksii Petrychenko Date: Thu, 26 Feb 2026 11:36:49 +0200 Subject: [PATCH 2/2] AGT-803-Deprecated-GAM-methods-module --- modules/intentIqIdSystem.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/modules/intentIqIdSystem.js b/modules/intentIqIdSystem.js index 6d5dbf04bf2..c064719ae88 100644 --- a/modules/intentIqIdSystem.js +++ b/modules/intentIqIdSystem.js @@ -209,20 +209,15 @@ export function setGamReporting(gamObjectReference, gamParameterName, userGroup, if (isPlainObject(gamObjectReference) && gamObjectReference.cmd) { gamObjectReference.cmd.push(() => { if (typeof gamObjectReference.setConfig === 'function') { - const currentConfig = typeof gamObjectReference.getConfig === 'function' - ? gamObjectReference.getConfig('targeting') - : {}; - const updatedConfig = { + gamObjectReference.setConfig({ targeting: { - ...(isPlainObject(currentConfig) ? currentConfig.targeting : {}), [gamParameterName]: userGroup } - } - gamObjectReference.setConfig(updatedConfig); + }); return; } - const pubads = gamObjectReference?.pubads?.(); - if (pubads?.setTargeting) pubads.setTargeting(gamParameterName, userGroup); + // Fallback in case an older version of Google Publisher Tag is used. + gamObjectReference?.pubads?.()?.setTargeting?.(gamParameterName, userGroup); }); } }