FlexAd Publishing Directions

Flex Publishing Directions

FlexAds are a way to place Mediabids performance based dynamic digital ads onto a website. This document is intended to outline the instructions for installing the Mediabids FlexAd tag into a website. Installation varies based on the particular needs of a publication and can be done manually or through a variety of Content Management Systems (CMS). Installation of a FlexAd follows industry standard practices much like installing a Google Analytics tag, or a Facebook Ad tag. The basic steps are as follows:

Step 1: Register your domain Step 2: Install FlexAd code Step 3: Publish Ad Tags.

Step 1: Register your domain in your Mediabids account

The first step in publishing FlexAds is to register the domain you be will publishing too with the Mediabids platform. This only needs to be done one time per domain. Once your domain is registered, you can publish ads on whichever pages under that domain that you wish.

Open a separate browser tab and navigate to your Publication Media kit page and enter the domain you wish to use:
**Note:Be sure to enter ONLY the domain. Leave off the 'https:/www.', please. Also, if you want to publish to more than one domain, use commas to separate them. For example: 'domain1.com,domain2.com'.

Once you have verified your domain, the next step is to install the FlexAd code and publish your ad tags.

Manual Installation
Step 2: Install FlexAd Javascript snippet
** Note:This code contacts the Mediabids platform and manages the FlexAds on the page.
  1. On the tab with the Mediabids site, return to the FlexAd placement management block . This is where you will find the FlexAd Javascript scriptlet you will need to place on your web page(s). Click on the code to highlight and then copy it:
  2. In the page where you want to publish FlexAds, place the script tag in the HEAD section of the page:
    <html>
    <head>
    <title>Your Website Title</title>
    <script> let mbol = window.onload; window.onload = function() { if (typeof mbol === 'function') { mbol(); } let s = document.createElement('script'); s.type = 'text/javascript'; s.src ="http://mblink.it.localhost//flexad/v1/js/?p=" +(location.pathname +'&q='+encodeURIComponent(location.search)).substr(1) +"&h="+window.location.hostname +"&s="+Array.from( document.querySelectorAll("[data-size]")).reduce( (ac,ce)=>ac+ce.getAttribute('data-size')+',',''); document.head.appendChild(s); }; </script>
    </head>
    <body>

    </body>
    </html>
Step 3: FlexAd Tags:
  1. On the tab with the Mediabids site, return to the FlexAd placement management block . This is where you will find the available ad sizes and allow you to get the appropriate FlexAd tag:
  2. In the page where you want to publish FlexAds, place the FlexAd tag(s) where you want the ads to appear:
    <html>
    <head>
    <title>Your Website Title</title>
    <script> let mbol = window.onload; window.onload = function() { if (typeof mbol === 'function') { mbol(); } let s = document.createElement('script'); s.type = 'text/javascript'; s.src ="http://mblink.it.localhost//flexad/v1/js/?p=" +(location.pathname +'&q='+encodeURIComponent(location.search)).substr(1) +"&h="+window.location.hostname +"&s="+Array.from( document.querySelectorAll("[data-size]")).reduce( (ac,ce)=>ac+ce.getAttribute('data-size')+',',''); document.head.appendChild(s); }; </script>
    </head>
    <body>

    <header>
    <h1>About The Print Observer/h1>
    <span data-mbflex data-size="728x90"></span>
    </header>
    <div>The Print Observer is the blog of MediaBids. MediaBids provides lead gen to advertisers through print advertising, and print advertising revenue to publishers through lead gen. We look to cover news about newspapers/magazines and the print advertising industry as a whole. Comments? Questions? Stuff you'd like us to write about? Email marketing@mediabids.com/div>

    </body>
    </html>
** Note: By placing FlexAd tags on your site you determine where ads should appear. Tags are basic HTML tags with a few custom attributes used to indicate the properties of the ads, particularly size. These tags can be modified to suit the needs of the website in order to be intergrasted with it's style sheet. Keep in mind that the tags are wrappers and will be populated with basic <img> tags which are bound to the strictures of the website's style sheets.
Wordpress via WPCode Plug-in Installation
Step 2: Install FlexAd Javascript snippet
This code contacts the Mediabids platform and manages the FlexAds on the page
  1. Install WPCode Plug-in: Install and activate the free WPCode plugin1.
    • Search for the WPCode Plug-in:
    • Activate it:
  2. Add New Snippet:
    • On the tab with the Mediabids site, return to the FlexAd placement management block . This is where you will find the FlexAd Javascript scriptlet you will need to place on your web page(s). Click on the code to highlight and then copy it:
    • Navigate to Code Snippets and Add Snippet:
    • Add the snippet: (Give it a name and paste the code)
    • Verify options: ('Site Wide Header' is the best option, particularly if ads are to appear on multiple pages.)
    • Save and activate:
Step 3: Place FlexAd Ad tags
** Note: By placing FlexAd tags on your site you determine where ads should appear. Tags are basic HTML tags with a few custom attributes used to indicate the properties of the ads, particularly size. These tags can be modified to suit the needs of the website in order to be intergrasted with it's style sheet. Keep in mind that the tags are wrappers and will be populated with basic <img> tags which are bound to the strictures of the website's style sheets.
  1. Edit your Wordpress page
    • Navigate to the page you want to edit and click edit:
    • Search for HTML and select 'Custom HTML':
    • On the tab with the Mediabids site, return to the FlexAd placement management block . This is where you will find the available ad sizes and allow you to get the appropriate FlexAd tag:
    • Paste the tag into the new Custom HTML element on your page:
    • Position the tag where you want it:
    • Update to save your changes:

That's it! You should now see your banners like this:
If you need additional help in publishing banner ads, please contact your Mediabids rep for further assistance:
Phone: 800.545.1135
Email: info@mediabids.com
-Mediabids Team