Subscribe to Our Newsletter

x

Ads in Listicles: Setting up DFP to Asynchronously Reload

In your RebelMouse site, you have the option to enable asynchronous listicle pages.

This makes for a much better user experience because:


  • You avoid a page reload (which means less waiting time for users, and it produces a faster view of the article).
  • Users aren't taken to the top of the page again, so they don't have to scroll back down to the newly loaded item to continue reading.
  • It's AJAX driven, so each time the user clicks on "Next Page," the items reload much faster than regular, non-asynchronous listicles.
  • Asynchronous listicles enables ads reloading — meaning your ads get refreshed every time the user clicks "Next Page."

See a live example here.

Awesome! How Do I Enable This?

If you want to set up your site to have AJAX-driven listicles and do asynchronous loading by default, please contact your RebelMouse Account Manager — we'll enable it for you in our backend.

OK, and How Can I Enable My Ads to Reload?

Setting up ads to refresh with each page a user clicks through in the listicle is simple with the Layout & Design tool. Please note that we only support DoubleClick for Publishers at the moment.

Here are the step-by-step instructions:

1. Set up Google DFP asynchronous loading in your Ad Header Code/Header Code element. (It's usually located in the Top Bar.) Replace this:

<script type='text/javascript'>(function() {var useSSL = 'https:' == document.location.protocol;var src = (useSSL ? 'https:' : 'http:') +'//<a href="http://www.googletagservices.com/tag/js/gpt.js" target="_blank">www.googletagservices.com/tag/js/gpt.js</a>'; document.write('<scr' + 'ipt src="' + src + '"></scr' + 'ipt>');})(); </script>

With this:

<script type='text/javascript'>// Load GPT asynchronouslyvar googletag = googletag || {}; googletag.cmd = googletag.cmd || [];(function() {var gads = document.createElement("script"); gads.async = true; gads.type = "text/javascript";var useSSL = "https:" == document.location.protocol; gads.src = (useSSL ? "https:" : "http:") +"//<a href="http://www.googletagservices.com/tag/js/gpt.js" target="_blank">www.googletagservices.com/tag/js/gpt.js</a>";var node = document.getElementsByTagName("script")[0]; node.parentNode.insertBefore(gads, node);})(); </script>

2. Find the Custom HTML or Ad Tag elements that have the ad tags that you wish to reload with each listicle item. You should replace this code:

googletag.defineSlot('/1771250/7x7_728x90_RestOfSite', [[300, 50], [320, 50], [728, 90], [320,80]], 'div-gpt-ad-1459967663958-3').defineSizeMapping(mapping_leader).addService(googletag.pubads()); googletag.defineSlot('/1771250/7x7_728x90_RestOfSite_2', [[728, 90], [320, 50], [300, 50], [320, 80]], 'div-gpt-ad-1462241457054-6').defineSizeMapping(mapping_leader).addService(googletag.pubads());

With this:

var googletag_refresh_slots = googletag_refresh_slots || [];var refresh_slot1 = googletag.defineSlot('/1771250/7x7_728x90_RestOfSite', [[300, 50], [320, 50], [728, 90], [320,80]], 'div-gpt-ad-1459967663958-3').defineSizeMapping(mapping_leader).addService(googletag.pubads()); googletag_refresh_slots.push(refresh_slot1); var refresh_slot2 = googletag.defineSlot('/1771250/7x7_728x90_RestOfSite_2', [[728, 90], [320, 50], [300, 50], [320, 80]], 'div-gpt-ad-1462241457054-6').defineSizeMapping(mapping_leader).addService(googletag.pubads()); googletag_refresh_slots.push(refresh_slot2);

3. And if the following line of code is included in your tags, please remove it. (It's called sync rendering.) It might not apply to your site, but please do check for it.

googletag.pubads().enableAsyncRendering();

You're almost there! Fill out the form below and a Rebel will contact you within one business day.

x

How to Fix the Post Preview Bug Due to Connatix Video Ads

Some users have reported that when previewing a post in the Entry Editor with a Connatix video ad embedded, the video takes over the entire screen like in the following example:

Keep reading... Show less

You're almost there! Fill out the form below and a Rebel will contact you within one business day.

x

Changing the World on Behalf of Millennial Mothers

Motherly is a new media property redefining motherhood. Created by women for women, their mission is one of empowerment to support women on their unmatched journey to mommyhood. Founded in 2015 by serial entrepreneur Jill Koziol and award-winning Washington Post digital strategist Liz Tenety, Motherly leads the effort in curating female-driven content that builds strong communities through the power of dynamic, multiplatform storytelling.

Keep reading... Show less

NEW! End of Summer 2018 Product Updates

It's almost the end of summer 2018 and we have some awesome product updates to announce! Here's what's new: scheduling posts to be unpublished, a copyright option for Facebook Instant Articles, Keywee and Parse.ly integrations for Facebook Instant Articles, parent/child relationships for sections in the dashboard, a scheduled filter for community-enabled dashboards, and a Google Search Console integration for the Entry Editor. There's a lot to unpack here, we know! So continue on below for more details on each announcement.

Keep reading... Show less