Q&A
Mr. Pickles the AdPlugg Pug

Ads Not Showing in page because of higher loading time

+1
0
-1

Hello, When I do conditional rendering on-page to get data from API so due to this time delay Ads are not showing. If I add those Ads tags before the conditional looping it's showing Ads correctly. so it is possible that ads will not load perfectly to delayed time in rendering?

 



Answers

+1
0
-1

Looping back to answer this question here (the user asked it privately via our contact form as well). After your API has returned and your've added the Ad tags to the page, you can call AdPlugg.run() to have AdPlugg find and fill the new Ad Tags. You can call AdPlugg.run() like so:

AdPlugg.run();

You can also call AdPlugg.run() asynchronously (before the AdPlugg ad.js script has loaded) using:

(AdPlugg=window.AdPlugg||[]).push({"command": "run"});

If you are regularly adding new ad tags to the page, you can use AdPlugg.watch() instead of AdPlugg.run(). As you can probably guess, AdPlugg.watch() will watch for new Ad Tags that are added to the page and automatically fill them.

You can call AdPlugg.watch() synchronously using:

AdPlugg.watch();

Or asynchronously (before the AdPlugg ad.js script has loaded) using:

(AdPlugg=window.AdPlugg||[]).push({"command": "watch"});