Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

159
Views
How I can preload Google Tag manager ads? To tackle waiting time

I came to know that gtm ads sometimes takes few seconds to fetch and play ads to avoid this I am trying to preload ads initially. So it can be played without getting delayed.

I am trying to preload ads... But I did not find any listener which get called upon calling fetchAD()...

When I called playAD() function all those listener are getting triggered.

function fetchAD() {
    
    googletag.cmd.push(function () {
        // create and assign ad to slot
        rewardedSlot3 = googletag.defineOutOfPageSlot('/1056029/dwi_test_video', googletag.enums.OutOfPageFormat.REWARDED).addService(googletag.pubads());

        googletag.pubads().enableSingleRequest();   // Configure SRA
        googletag.enableServices();     // Start ad fetching    
    });
    
    console.log("fetchAD() func done");
}

function playAD() {

    googletag.display(rewardedSlot3);
        
    console.log("playAD() func done");
}

How am I supposed to preload ad and play it directly without waiting few seconds? Thanks in advance...

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!