0

I have the following code for my Google Ads

var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];

var gptAdSlots = [];
googletag.cmd.push(function() {

    var leaderboard1 = googletag.sizeMapping().addSize([0, 0], [376, 288]).addSize([768, 166], [900, 200]).build();
    var mpu1 = googletag.sizeMapping().addSize([0, 0], [241, 198]).addSize([300, 247], [376, 310]).build();

    googletag.defineSlot('/210178423/Desktop_Leaderboard', [900, 200], 'div-gpt-ad-1587554002744-0').addService(googletag.pubads());
    googletag.defineSlot('/210178423/super-leaderboard-2', [900, 200], 'div-gpt-ad-1587721314904-0').addService(googletag.pubads());
    googletag.defineSlot('/210178423/MPU-Recovery-Sessions-1', [376, 310], 'div-gpt-ad-1620638493282-0').addService(googletag.pubads());
    googletag.defineSlot('/210178423/MPU-Recovery-Sessions-2', [300, 247], 'div-gpt-ad-1620638447343-0').addService(googletag.pubads());
    googletag.defineSlot('/210178423/MobileLeaderboard', [376, 288], 'div-gpt-ad-1587636210339-0').addService(googletag.pubads());
    googletag.defineSlot('/210178423/super-leaderboard-3', [748, 166], 'div-gpt-ad-1587715663433-0').addService(googletag.pubads());
    googletag.defineSlot('/210178423/mpu-new', [376, 310], 'div-gpt-ad-1587636619483-0').addService(googletag.pubads());
    googletag.defineSlot('/210178423/mpu-2', [300, 247], 'div-gpt-ad-1587715982224-0').addService(googletag.pubads());
    googletag.defineSlot('/210178423/mpu-3', [236, 195], 'div-gpt-ad-1587716013492-0').addService(googletag.pubads());
    googletag.defineSlot('/210178423/Banner1', [376, 151], 'div-gpt-ad-1587485402703-0').addService(googletag.pubads());
    googletag.defineSlot('/210178423/banner-1-size2', [300, 120], 'div-gpt-ad-1587716189420-0').addService(googletag.pubads());
    googletag.defineSlot('/210178423/banner-1-size3', [236, 95], 'div-gpt-ad-1587722614062-0').addService(googletag.pubads());

    googletag.pubads().enableSingleRequest();
    googletag.enableServices();
});

My first question is whether this looks fine - I mean, based on the examples I've seen and the fact they are running ok, I think it's fine but would always welcome a second opinion

My second and main question is why am I seeing dozens of requests to googletagmanager.com, googletagservices.com, googlesyndication.com, doubleclick.net etc

Considering I only have a dozen or so ad spaces on the site, several dozen requests seems a bit excessive or does that sound about right?

0

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.