Создать шаблон Google TagManager, интегрированный с GPT - PullRequest
0 голосов
/ 17 февраля 2020

Я хотел бы создать шаблон javascript в Google Tagamanger для рекламы Pu sh с помощью gpt. Но до сих пор я не смог создать функциональный скрипт.

// Enter your template code here.
const log = require('logToConsole');
log('data =', data);

// Call data.gtmOnSuccess when the tag is finished.
//data.gtmOnSuccess();

const injectScript = require('injectScript');
const url = 'https://securepubads.g.doubleclick.net/tag/js/gpt.js';
injectScript(url, data.gtmOnSuccess, data.gtmOnFailure, url);

const setInWindow = require('setInWindow');
const copyFromWindow = require('copyFromWindow');
const createArgumentsQueue = require('createArgumentsQueue');
const callInWindow = require('callInWindow');

const ga = createArgumentsQueue('googletag', 'googletag.cmd');
callInWindow('googletag.cmd.push', function(){
    callInWindow('googletag.defineSlot', '/00005/ad', [1190, 250],'banner-1190x70-2-Area');
     //callInWindow('googletag.addService', function(){
       //callInWindow('googletag.pubads');
     //});
     //callInWindow('googletag.enableServices');
});

Ошибка:

Исключение в команде GPT в очереди

Может ли кто-нибудь помочь мне создать googletag.cmd. пу sh с помощью гтм?

...