Developers

How to Set up Header Codes + Ad Header Codes

How to Set up Header Codes + Ad Header Codes

With our Layout & Design tool, you have the ability to set up multiple header codes in the Top Bar page, either per device or throughout all your devices.


On All Devices

To get started, click on the hamburger menu (☰) to open up the left-hand navigation menu and click on Layout & Design.

You'll need to input the header code in the Top Bar, so click on that page to open it:

To add your header code, click on the + ADD ELEMENT button in the top right:

Choose Header Code. It doesn't really matter where you position the element as long as it's inside of a column.

In this element, you can insert the header code of your preference in the Properties section to the right.

Repeat these same steps again to add another separate Header Code element with a different script.

Again, please bear in mind that this header code will affect all pages and all devices.

Per Device: Using the "Conditional Content" Element

You can create different ad placements with custom HTML for mobile, tablet, or desktop by using the Conditional Content element:

Once the Conditional Content element is placed, you can place new elements inside of it, such as custom HTML or header code.

In the drop-down menu, you'll be able to choose if you want the conditional content to be placed for mobile, tablet, or desktop:

Desktop:

Tablet:

Mobile:

If you choose "Tablet" and you're in desktop view, or "Mobile" and you're in tablet view, and so on, don't worry — the element hasn't disappeared. It's only visible in the viewport when it's called to be displayed.

If you specifically need to add an ad header code, the process is exactly the same as explained above. The only difference is that we have a special element for it, called Ad Header Code, that should be chosen instead:

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:

animate
Layout and Design toolLayout and Design tool on mobile
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
{'id': 17247366, 'name': 'anneszilagyi', 'title': 'Anne Burns', 'owner_id': 16951461, 'created': datetime.datetime(2016, 10, 24, 16, 50, 19), 'about_html': '<p>\nBranding specialist with over ten years of experience in integrated marketing strategies, digital and social content, search engine optimization, and online advertising. I have led efforts to bring newsrooms, small businesses, and legacy brands into a digital presence that’s true to brand, profitable, and personalized.\n</p>', 'rating': 0, 'cover_photo_url': '', 'href': 'https://www.rebelmouse.com/u/anneszilagyi', 'get_uri': 'https://www.rebelmouse.com/', 'display_logo': 'https://www.rebelmouse.com/media-library/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpbWFnZSI6Imh0dHBzOi8vYXNzZXRzLnJibC5tcy8yMzI2MDAzOC9vcmlnaW4uanBnIiwiZXhwaXJlc19hdCI6MTc0NjY2OTAxNH0.YBKu6mEz9txEmA9OAfqmPh1GtJfYdy9BqcQNEeyTVsE/image.jpg?width=210', 'is_community': False, 'roar_specific_data': {'quick_signup': True, 'created_by_saml': True, 'saml_nameid': 'anne@rebelmouse.com', 'saml_attributes': {'email': ['anne@rebelmouse.com'], 'first_name': ['Anne'], 'last_name': ['Burns'], 'organisation_unit_path': ['/Client Services/Account Managers']}, 'LinkedIn': 'https://www.linkedin.com/in/anneburnsatx/', 'jobTitle': 'Director of Marketing', 'knowsAbout': ['SEO', 'Editorial Strategy', 'Brand Voice and Tone', 'Content Marketing', 'Copy Editing', 'Email Marketing', 'Writing', 'Technical SEO', 'Social Media', 'Artificial Intelligence']}, 'get_url_or_domain_url': 'https://www.rebelmouse.com/', 'user_twitter_name': '', 'is_inactive': False}