Disabling Products

Disabling products via config

To disable products on certain pages or areas of the site, a disabledProducts object can be added when declaring the freestar.config object. The default values are false (not disabled) for all products:

The following keys represent the products:

  • Sticky Footer: stickyFooter
  • Video: video
  • Revolving Rail: revolvingRail
  • Pushdown: pushdown
  • Dynamic Ads: dynamicAds
  • Superflex: superflex
  • Sliding Unit: slidingUnit
  • Side Wall: sideWall
  • Page Grabber: pageGrabber
  • Google Interstitial: googleInterstitial
  • videoAdhesion

To disable a product, set the value as true:

freestar.config.disabledProducts = {
   videoAdhesion: true
};
//or just call the function and pass false or true if you want enabled or disabled
freestar.setVideoAdhesionEnabled(false)

Header Code Example Placement

<!-- PLACE THIS SECTION INSIDE OF YOUR HEAD TAGS -->
<!-- Below is a link to a CSS file that accounts for Cumulative Layout Shift, a new Core Web Vitals subset that Google uses to help rank your site in search -->
<!-- The file is intended to eliminate the layout shifts that are seen when ads load into the page. If you don't want to use this, simply remove this file -->
<!-- To find out more about CLS, visit https://web.dev/vitals/ -->
<link rel="stylesheet" href="https://a.pub.network/core/pubfig/cls.css">
<script data-cfasync="false" type="text/javascript">
  var freestar = freestar || {};
  freestar.queue = freestar.queue || [];
  freestar.config = freestar.config || {};
  freestar.config.disabledProducts = {
    video: true,
    superflex: true
  };
  freestar.config.enabled_slots = [];
  freestar.initCallback = function () { (freestar.config.enabled_slots.length === 0) ? freestar.initCallbackCalled = false : freestar.newAdSlots(freestar.config.enabled_slots) }
</script>
<script src="https://a.pub.network/[pub-name]/pubfig.min.js" async></scrip