This document outlines the various configuration and setup processes involved in getting Freestar tags running on your site.
Ad Tag Overview
The Freestar ad tag setup has a few key parts to take note of.
- Page Header Configuration
- Page Body Configuration
You will receive a document (adtags.txt) that contains all of the necessary items to add to your page to get Freestar ads working.
The header section of the ad tags file is crucial. Without adding our script and configurations to the header, the ads won’t render.
In order to be able to bid on a site's traffic in a performant way, a few key pieces of code need to be implemented on your site. Those pieces of code are outlined below.
Freestar object definition
- In the first four (4) lines of the code, we set up our Freestar object which allows us to define and set up an asynchronous ad format to deliver our ads.
Freestar Ad Slot Configuration – Freestar.config.enabled_slots
- This array contains the IDs of any ads on the page that are loaded when the URL is called. With this list of slots, we are able to send requests for bids while the page is loading, allowing for the timely display of ads.
- If you pass a Tag ID through the header, and you do not call it in the body, then it will send a false ad impression to our ad server. This can lead to large discrepancies between DFP and the Networks we work with.
- Any ads that are loaded after the page loads – due to a dynamic ad or an infinitely scrolling page – should not be in this list.
Asynchronous call to Freestar Pubfig.js file
- The pubfig.js file contains the ad server and header bidding configuration.
The body is the easy part. All you need to do is remove the existing ad tag you have on the site and replace it with ours. As long as the header section has the Tag ID for the body tag, it will render on the page.
An example of a properly configured website: