Rebel Insights

Pro Tip: Too Many B Tests? Use Shared Elements for Better Organization

Pro Tip: Too Many B Tests? Use Shared Elements for Better Organization

RebelMouse offers unique multivariate testing that makes creating B tests for page layouts easy. However, sometimes having too many B tests can be hard for developers to organize and manage. If this is a problem on your site, you'll want to consider testing components of your site using shared elements. This helps your site's design workflow in a handful of ways:

  • Developers can work on different post layouts at the same time.
  • If you only want to process one B test, our servers will load all of them at the same time. Using shared elements prevents this from happening.
  • Our servers do not run shared elements if the conditional is set to false.
  • Post and Section pages will become more organized in Layout & Design Tool.

Post Layouts

Each post layout should be placed in its own shared element. This will prevent any issues between new B tests and quality assurance updates. It will also save time when the page is rendered.

Section Layouts

Just like Post pages, every Section layout with conditionals should have its own shared element.

Naming Shared Elements

When naming your shared elements, make sure they are short and easy to understand.

  • Post Layout: Every Post layout should be saved to its own shared element following a "Post + Layout Name" naming convention as a title. For example, "Post Partners," "Post Truck," "Post Default," etc.
  • Section Layout: Use the same logic as a Post layout. Choose names like "Section News," "Section Babies," "Section Default," etc.
  • Element: This will be repetitive, so be sure to include details when naming your elements. For example, "Element Post Sidebar," "Element Post Bottom," "Element Newsletter Wide," "Element Section Sidebar," etc.

JavaScript

It's easy for JavaScript to become disorganized, which is why it is best to use a shared element for each piece of JavaScript. Here are some things to keep in mind:

  • JavaScript General Element: Place this at the end of the page, either in the footer or at the end of a Post layout.
  • JavaScript Head: Use the <head> element and place it in your Top Bar.
  • JavaScript Post/Section: This layout-based JavaScript should be placed at the end of your layout.
  • JavaScript Placement: JavaScript not in a <head> tag should be placed at the end of your page in a JavaScript element. This will result in faster HTML rendering. It will also not impact in-place ad calls.

  • Ads: All ads should be in a JavaScript Ads element with a provider-based title, like "JavaScript Ads Google."

Click here for a guide to all of Layout & Design Tool's elements. If you have any questions about using shared elements, email support@rebelmouse.com or talk to your account manager today.

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 StatecraftPrideRolling Stone QuebecPremierGuitarPenskeINN 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