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.


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 or talk to your account manager today.

What Is RebelMouse?
Request a Proposal
The Most Secure CMS of 2023

The Most Secure CMS of 2023

Why RebelMouse Is the Most Secure CMS on the Web

Delivering a secure, high-performing environment with extreme reliability is essential to all of our clients at RebelMouse. We only use industry-leading, reliable approaches to host our infrastructure. This ensures maximum stability and security for all of our clients’ data. Here are just some of the reasons we’re able to maintain a hard-bodied product that’s flexible, too.

Keep reading...Show less
Meet the RebelMouse Platform: The Highest Performing CMS on the Web
Rebel Insights

Meet the RebelMouse Platform: The Highest Performing CMS on the Web

Make sure your site is set up for success in 2022.

In the spring of 2020, Google let the world know that its Core Web Vitals would become the new benchmark for measuring a site's performance in its search results, known as the page experience update. Fast forward to more than a year later in August 2021 when, after much anticipation, Google's page experience update became official.

Since its rollout, developers have felt the impact of how their publishing platforms stack up against the new standard. Important decisions around the architecture of your site can now make or break your site's performance in the eyes of Google.

HTTP Archive, a tracking platform that crawls the web to identify trends and record historical patterns, frequently reports on how top content management systems (CMS) have weathered the page experience update through the creation of its Core Web Vitals Technology Report. RebelMouse has consistently outperformed major CMS platforms on Google's most critical metrics throughout the year:

Getting superior scores on Google's performance benchmarks isn't easy, either. The Ahrefs blog analyzed Core Web Vitals data from the Chrome User Experience Report (CrUX), which is data from actual Chrome users, to see how the web stacks up against Core Web Vitals. Their study found that only 33% of sites on the web are passing Core Web Vitals.

data from Ahrefs tracked on a line chart finds that shows only 33% of sites on the web pass Google's Core Web VitalsFrom Ahrefs.

Luckily, performing well on Core Web Vitals is possible with thoughtful, strategic changes to your site’s codebase. Here's what you need to know and how we can help.

Keep reading...Show less
Interested in a Free Website Health Check?Check Your
Website's Health
Get Your Free Analysis Now