How to Auto-Refresh Ads in GAM (Google Ad Manager)

Spread the love

Last updated on November 3rd, 2022 at 05:31 am

If you reading this post, chances are high that you’ve your own ADX account or you’re using a sub-ADX account from any Google Certified Partner. Before we begin, I would like to tell you that we have tested auto-refresh ads, and yes, they bring in additional revenue if implemented properly. With the rise of programmatic buying and greater control of machine learning/algorithms in deciding which ad impressions will be delivered, CPM-based ad buying has become more prevalent. Refreshing ads at fixed time intervals is common, and many SSPs, networks, and publishers do this ensuring the ads which are refreshed have good viewability rates. Sovrn auto-refresh viewable impressions every 25 seconds to ensure better revenue for their publishers. In addition, to refresh ADX ads or third-party ads via DFP, you can also refresh in-house ads or affiliate marketing campaign ads to see which are generating the maximum click-through rate and optimize the ad serving based on the ones which get more clicks. In this post, we are going to discuss how you can auto-refresh ads via DFP (Doubleclick for Publishers), the best practices, and ADX auto-refresh policies.

Publishergrowth: The Revenue Acceleration Platform for Publishers

Blognife is elated to announce the launch of Publisher Growth- a community of publishers that helps you actively accelerate your revenue. This platform assists publishers in growing their traffic and revenue. As publishers, you can share and read reviews of ad networks and hosting companies. You can connect with other publishers to build links for growth and monetization hacks and more. This platform will help you stay up to date with the advertising and publisher ecosystem.


  • List of 200+ ad networks to monetize your site across all verticals.
  • Personalized site audit upon signing up on the platform that can increase your revenue.
  • Find all upcoming adtech conferences, webinars, and events in one place.
  • Stay informed with the latest adtech news across the globe.

  • Why Auto-Refreshing of Ads Make Sense?

    Visitors consume content and ads as a part of the content. This is where contextual advertising makes the most sense. Additionally, the visitors interact with the ad, which might be a purely viewable engagement or simply a click-through. Marketers and advertisers who consider viewability and brand recall as their primary metrics can serve CPM-based ads. Advertisers who are looking for click-to-action, like purchases, signups, etc., would go for CPC bids. Thus, on blogs and websites with a high engagement rate and time-on-site, it makes sense to refresh in-view ad units to increase the overall revenue from CPM ads.

    Also Read:  First Price vs Second Price Auction

    Even if you’re doing direct advertisement deals, and your site is popular, you don’t want to give the entire session of a user for one ad unit; rather, make the advertiser agree to a 60 seconds viewable impression. n this way, you can serve more ad impressions on your blog.

    Interestingly, you can also tell DFP to display those ads which are getting high clicks and give some opportunity to other ad units for potential clicks. his will show weightage to the top-performing ad unit (in terms of clicks) and ensure that your ad space is properly monetized. hese are some of the benefits of auto-refresh ad tags on DFP.  n this tutorial, I will share with you the necessary ad codes that will help you enable create such custom banners, which will be your money-making magnet.

    Reloading Ads without Refreshing Page in DFP- How to Auto Refresh Ads in DFP

    First, you need to have access to Google Doubleclick (DFP), which is an ad server that helps publishers to maximize their ad revenue. t is going to be a 3-4 step process where you first need to create an ad unit, then create an order, traffick the order with line items, and finally add creatives to your line items. nce the steps are done, you need to approve your order so that the ad serving is enabled.

    Next, you need to generate the ad tag which you created in the first place and use the code here to make it auto-refresh. nce done, you can place the code in your ad widget and make it live on the website.  ypically, it takes 3-4 hours for a newly created ad unit to start showing up on your website, and if you can’t see it, then you must be doing something wrong.  nce the ads start showing up, you can analyze the performance metrics in real time by going to Reports>Query>New Query. 

    Also Read:  How to Link your AdSense Account with Google Ad Manager?

    DoubleClick for Publishers provides a functionality using which you can refresh ads directly without a user triggering it. hared here is a basic understanding of how this thing is implemented.

    Let’s start with our standard GPT tag.


    The above sample code in the <head> section will serve an ad without an ad refresh. et’s say I want this ad tag (“defineSlot() function”) to be called every 30 seconds automatically. o achieve this, I’ll first assign it to a variable (a specialty of JavaScript). ee below:


    We are not done yet. nother code has to be placed in the display call, i.e., the respective code which we place in the web page’s <body> section. he new code should be:

    You’ll notice that the variable “_Mrec,” which we’ve defined before, is being used here. s we’re interested in refreshing the ad slot every 30 seconds, we must include 30,000 milliseconds at the end of this function.

    The refresh code has to be placed after the googletag.display() function. See here:

    DFP Refresh Rate

    You can use the refresh function of DFP to auto-refresh ads from SSPs, Ad networks, or Ad Exchange ad tags. f you’re using Ad Exchange ads, then the refresh interval should be anywhere between 30, 60, 90, 120, 180, 240, and 360 seconds and needs to be declared by an ADX rule. therwise, this would constitute a policy violation. enerally, once you have the auto-refresh ads set up, you can then declare them as auto-refresh. ith other ad networks, you can also refresh the ads at specific intervals. e suggest keeping the auto-refresh interval between 60-120 seconds.

    Can I Refresh AdSense Ads?

    Please make sure that you DO NOT serve AdSense ads on such positions. s per Google AdSense policy, refreshing an AdSense ad can terminate your Google AdSense account. ou can, however, refresh AdX ads, but you need to have an approved sub-ADX account for that and declare the existence of such ads in the line item.

    Things to Keeping in Mind while Auto-Refreshing Ads via DFP

    There are a few things that you should keep in mind while auto-refreshing ads on DFP.

    • Adding refreshing to ad units can impact your audience negatively. o, we recommend refreshing not more than 2 ad units.
    • It is always advisable to use auto-refresh on ad units with desktop traffic. ince on mobile, there isn’t much opportunity for your audience to view the refreshed ads. ou can use a sticky footer auto-refresh ad on mobile (320×100) ad size.
    • Use a sticky ad code for a sidebar ad that you’re auto-refreshing. eep the refresh rate of this ad at 30 seconds. hile you can keep the refresh rate of other ads at 60 seconds.
    • Use appealing creatives which can increase ad CTRs.
    • Let DFP allow stronger impressions to those creatives that are clicked more often.
    Also Read:  What are the Different Line Item Types in Google Ad Manager?

    How to Increase your Ad Revenue with Auto Refresh Ads?

    Ezoic banner

    Simply auto-refresh ads may not increase your ad revenue substantially. f you’re using ADX ads and auto-refreshing them, you will see higher revenue for the first few days, which will show signs of consistent dip, thereby coming to the plateau (the plateau is still higher than one without auto-refresh). n order to increase your ad revenue with Auto-refresh units, you need to set up your DFP line items to maximize the competition and enable dynamic allocation and DFP First Look. t should be followed by using ad exchange tags as a fallback or passback so that it ensures the maximization of the revenue. reating such a setup requires first-hand knowledge of DFP and is beyond the scope of this article. f you’ve more than 10,000 page views a day and a good volume of tier-one traffic, this setup can substantially increase your overall revenue. o get in touch with me for a custom setup or consultation! y skype id is ronniedey.

    Our Recommended Tools for Publishers:

    Looking to Increase your Ad Revenue: Get in touch with me for a personalised consultation and increase your ad revenue across native, display, video (instream and outstream), in-app and other verticals. I also assist in customized DFP setup, header bidding, and content creation strategy. My skype id is: ronniedey. Feel free to connect!

    Spread the love

    17 thoughts on “How to Auto-Refresh Ads in GAM (Google Ad Manager)”

    1. Hi I am currently working on clients web site and they want to auto refresh dfp tags. I am not sure what is entirely legal and what is not. I noticed there are a few differen types of dfp tags and would like to know which auto refresh can apply to and which not.

      I want to use slot rendered event listener and refresh on paticular slots from there. Is there a way to determine if an paticular ad slot runs adsense and which adx.

      Any help will be much appreciated.

      • Hi Stefan,

        Auto refresh of AdSense ads is not allowed. However, you can auto-refresh AdX ad tags. So, if you want to compete AdSense line items with ADX line items for a particular ad unit, then also, you cannot auto refresh those ads since, it would mean you’re auto-refreshing adsense as well. You may auto refresh ads from other networks provided they allow the same, along with in-house ads. Do let me know if this helps. Do get in touch with me on skype if you’d like to discuss more about it. My id is: ronniedey

    2. Hello,

      you have actually an error in your code.

      You define _Mrec as a local variable inside the first googletag.cmd.push function, so it’s not available later in the second inside the div.
      Instead the declaration should be
      _Mrec = googletag.defineSlot(‘/46400095/123_300x250’, [300, 250], ‘div-gpt-ad-1476516294335-0′).addService(googletag.pubads());
      At least this is what worked for me, as the former raised an error of an undeclared variable _Mrec


    3. hello, Abhishek
      We Have Made A Deal With The Direct Advertiser, That We Will Be Using 10 seconds Ads Refresh, We Have Only 2 Slots In The Website, Does DFP Allow Us To Do 10 seconds Refresh. If Not Are There Any Adserver Which Can Help Us

    4. is it possible to refresh after an ad has been “in view” for etc 30 secs or someone has scrolled down the page and then back up the page, so as the ad is back in view and then fires a refresh?

      • Hello Daolm,

        Auto refresh is allowed for both desktop and mobile for AdX demand. It requires custom coding. What you’re seeing is the DFP (Google Ad Manager) feature for in-app mobile inventory.

    5. To be honest I don’t really like the idea of auto-refreshing ads in 60 seconds and so on
      I think they can decrease CPM

      I don’t think there is any advertiser who does not want their Ad to be viewed for a long time
      I really do get confused a lot about DFP and Adsense


    Leave a Comment