Overview
Publishers with complex site taxonomy can reuse placements using Freestar's channel variable.
Publishers often use the {{channel}} variable when they have large websites with many categories and subcategories, such as news and sports. This feature allows publishers to increase the number of ad units on their sites without creating dozens of placements.
Freestar replaces the {{channel}} placeholder in the ad unit path with the passed string value to build ad placements.
Configuring Channel Variables
freestar.config.channel
Accepts a string value.
JavaScript
freestar.config.channel = "your-channel-name";
Head Code Example
Add the variable to the Freestar head code after the freestar.configdeclaration (line 5).
<script data-cfasync="false" type="text/javascript">
var freestar = freestar || {};
freestar.queue = freestar.queue || [];
freestar.config = freestar.config || {};
freestar.config.channel = "your-channel-name";
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/mysite-com/pubfig.min.js" data-cfasync="false" async></script>