Subscribe to Our Newsletter

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:


The goal of this tutorial is to show you how to fix this issue. This should make the Connatix video embed normally in the post preview, the same way it should appear in the post after publishing. The result will be a preview that looks like the following:

In order to do this, Connatix suggested to us that users add a parameter in the ad that is then added dynamically just for the post preview. The parameter you need to add to the preview is the following string:

    preserve-iframe=1

The first global solution is to go into the Layout & Design tool and, from the Post page, insert the following code:

    <choose>
        <when test="getparams.draft=='1'">
         <write_to_header data-rm-friendly-name="Connatix Preview" data-rm-selected="true">
          <![CDATA[<script async type='text/javascript'
    src='https://cdn.connatix.com/min/connatix.renderer.infeed.min.js'
    data-connatix-token='902fce37-9cb7-4fb0-8307-fa65ef7168ef' preserve-iframe='1'>
          </script>]]>
         </write_to_header>
        </when>
         <otherwise>
          <write_to_header data-rm-friendly-name="Connatix">
           <![CDATA[<script async type='text/javascript' 
    src='https://cdn.connatix.com/min/connatix.renderer.infeed.min.js?production'
    data-connatix-token='902fce37-9cb7-4fb0-8307-fa65ef7168ef'>
           </script>]]>
          </write_to_header>
         </otherwise>
        </choose>

The code should be placed as the first block in the Post page as shown below:

However, this solution doesn't work when your advertisement/script is included by the Ad Manager (after x number of words).

To fix this, you can include a script in the Ad Manager itself to include the preserver-iframe=1 parameter dynamically there. You should include an ID in your advertisement script (located toward the end of the following code snippet):

    <script async type='text/javascript'
        data-src='https://cdn.connatix.com/min/connatix.renderer.infeed.min.js'
        data-connatix-token='a928293d-a011-457c-b7d7-1346b0ce87c3' id="post-{{post.id}}">
    </script>

After that, you can include the following piece of code in your Top Bar (so that the fix is always applied). This will only include the parameter fix when you're in a post draft.

    <script>
        var post = document.getElementById('post-{{post.id}}');
        var url = new URL(window.location.href);
        if (url.searchParams.get('draft')) { 
            post.setAttribute('preserve-iframe', 1); 
        } else { 
            post.src = post.getAttribute('data-src'); 
        }
    </script>

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

x

A Look Inside the Only Creative Agency Powered by Deep Technology

Strategic development of product that supports content distribution, conversion, and loyalty.

RebelMouse is a creative agency fueled by a publishing platform with deep technology. Our expertise is rooted in media and content marketing because there is no other team that understands distributive publishing better than we do. There is also no other CMS on the market today that provides content creators with the tools they need to unlock sustainable growth backed by sticky monetization methods. RebelMouse blends product and strategy together to move the needle where it matters most — organic traffic and user growth, conversion to loyalty, and revenue growth.

Keep reading... Show less

Manage Your Site's Global Settings

Create Your Powerful + Modern Publishing System

At RebelMouse, we use the term "lean tech" quite a bit. Lean tech is the opposite of what many publishers think may save their site in today's landscape: A big-box CMS publishing solution that is often costly to customize and maintain. In actuality, the key to sustainable growth and revenue is a leaner, full-stack tech solution that creates opportunities for growth not just on site, but on search and social, too.

Keep reading... Show less

Let Your Audience Tell Your Brand’s Story

United Airlines' "Her Art Here" Campaign Blends Engagement With Purpose

The digital landscape has reached a turning point. Publishers are trying to pick up the pieces and figure out how to create quality content and monetize it now that readers have loosened up their dependency on the major platforms. In the meantime, massive audience hubs like Facebook are trying to recover legitimacy and relevancy with better prioritization of privacy and user experience.

Keep reading... Show less

How to Leverage Annotations in Google Analytics

When looking at your website data in Google Analytics (GA), it can be difficult to remember exactly what happened on a particular day to determine why certain data spikes or dips may have occurred.

For this reason, it's important to keep track of when changes are made to your site. Thankfully, GA allows you to easily do this using annotations. Annotations are short notes you can add to dates within Google Analytics reports.

Keep reading... Show less

Changing the Face of Tech: The Women of RebelMouse

Keep reading... Show less

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

x

A Guide to User Permissions on RebelMouse

On our platform, user roles range from base-level contributors all the way up to administrators. These roles are especially important when operating within the confines of our community dashboard, which brings multiple creators together to create and share within one large content hub.

The way each role interacts with others is completely customizable. The workflow is designed to streamline the edit, revision, and publishing process to make sure live content is not only perfect, but always optimized for site, search, and social. The way each team sets up their role structure is typically dependent on the number of writers employed, the amount of content published, and the cadence of posts.

Keep reading... Show less

RebelMouse Ad Integrations: Overview

Since the dawn of digital publishing, exactly how to make money on content has been a rocky road for publishers to navigate. The good news is that thanks to factors like user maturity, advancements in tech, and algorithms that deliver a new level of personalization, monetizing your site is easier than before. In previous years, it seemed like publishers were drowning in the revenue duopoly that is Facebook and Google, with little time to come up for air.

Keep reading... Show less

RebelMouse Pageview Methodology

Throughout the evolution of media on the internet, there's been a constant struggle between design that provides the best monetization of articles and design that offers the best user experience. It's what has spurned the adoption of ad-blockers from the user perspective, and crazy 40-page slideshows on the publisher end.

Keep reading... Show less

NEW: Styled Quotes Available in Entry Editor

At RebelMouse, we're always finding new ways to make dynamic content creation more intuitive, and this includes ensuring every article can easily be broken up into small, snackable pieces of content.

Keep reading... Show less