Developers

Ad-Targeting Variables

Ad-Targeting Variables

RebelMouse supports ad variables for Runner sites, allowing you to target ads to effectively increase ad revenue and support custom campaigns. Your ad tech can automatically serve different creative based on the ad variables you set.


Supported Ad Variables

  • Tags:
    • Example output for tag "dog" is "dog"
    • Example output for tag "dogs rock" is "dogs-rock"
    • Call this variable as {{tags}}
  • Sections:
    • Example output for section 'Marin' is 'marin'
    • Example output for section "Silicon Valley" is "silicon-valley"
    • Call this variable as {{sections}}
  • Page Type: page_type (homepage, sectionpage, postpage)
    • If on post page output will be "postpage"
    • If on home page output will be "homepage"
    • If on section page output will be "sectionpage," then the section variable will give you the section you are on
    • Call this variable as {{page_type}}

Example of How to Include Ad Variables in the Runner Editor

Ads are set up in Runners based on inserting the ad code, which usually requires:

  • A piece of header code (targeting is usually found here). Header code must be added within the ad header code element:

  • Ad tags placed where the ads themselves were shown.

Variables are actually passed in that ad code, so the client code needs to call those variables. Here's an example:

googletag.pubads().setTargeting('Sections', {{sections}}).setTargeting('Tags', {{tags}}).setTargeting('page-type', {{page_type}});

Examples of Output from a Client's Site

  • Home Page
    • http://7x7.com/
    • No tags or sections, but identified as "homepage."
    • Example:
    •  googletag.pubads().setTargeting('Sections', []).setTargeting('Tags', []).setTargeting('page-type', ["homepage"]);
  • Post Page
  • Section Page
    • http://7x7.com/san-francisco/
    • Section is "San Francisco" which we translated to "san-francisco." No tags are set up. Section is identified as "sectionpage."
    • Example:
    • googletag.pubads().setTargeting('Sections', ["san-francisco"]).setTargeting('Tags', []).setTargeting('page-type', ["sectionpage"]);

Note: Dynamic ads in articles are not supported for Runner sites.

What Is RebelMouse?
Request a Proposal

Where 
Websites Are Built

The Fastest Sites in the World Run on RebelMouse

Let’s Chat

new!

RebelMouse Performance Monitoring

Real-Time Core Web Vitals

Get Started
DISCOVER MORE

Our Core Features

Our platform is a complete digital publishing toolbox that's built for modern-day content creators, and includes game-changing features such as our:

Layout and Design toolLayout and Design tool on mobile
animate
animate

Why RebelMouse?

Unprecedented Scale

RebelMouse sites reach more than 120M people a month, with an always-modern solution that combines cutting-edge technology with decades of media savvy. And due to our massive scale, 1 in 3 Americans have visited a website powered by RebelMouse.

120M+ Users
550M+ Pageviews
17+ Avg. Minutes per User
6+ Avg. Pages per User

Today's Top Websites Use RebelMouse

Thanks to the tremendous scale of our network, we are able to analyze a wealth of traffic data that informs our strategies and allows us to be a true strategic partner instead of just a vendor.

upworthyindy100Vault12No Film SchoolRawStoryResponsible StatecraftPrideMNI Market NewsPremierGuitarPenskeINN Educate Brand ConnectThe FulcrumGZEROOkayafricaBrit+CoPaper MagazinePowerToFlyNarcityCommonDreamsAllBusiness

What Clients Say

We’re here to help you weigh and understand every tech and strategic decision that affects your digital presence. Spend less time managing everything yourself, and more time focused on creating the quality content your users deserve.

Case Studies

A Team Built Like No Other

RebelMouse employs a unique, diverse, and decentralized team that consists of 70+ digital traffic experts across more than 25 different countries. We have no central office, and we cover every time zone to ensure that we’re able to deliver amazing results and enterprise-grade support around the clock.

Our team is well-versed in all things product, content, traffic, and revenue, and we strategically deploy ourselves to help with each element across all of our clients. We thrive on solving the complex.

Let's Chat