Content category targeting
Contimo allows targeting Traffic Drivers to appear in specific context using IAB Content Taxonomy v3.0.
There are two parts:
- Page need to communicate to the traffic driver script Content category codes for this page
- Traffic drivers can target multiple top-level categories
info
Page can communicate multiple content categories of any level. Contimo will translate to root category code automatically.
Specify content categories using on-page SDK
There is on-page JavaScript API that you need to use to pass Content Categories. You need to do it before the main script.
<script>
var contentCategories = ['1', '150']; // REPLACE WITH REAL CATEGORIES FROM YOU CMS
window._contimo = window._contimo || [];
window._contimo.push(['setContentCategories', contentCategories]);
</script>
In case you use third-party service to get content categories, then you need to:
- use
disableInitialRender
API to disable initial render of traffic drivers - use
setContentCategories
API when you received content categories - use
refreshPlacements
API to request creatives
<script>
window._contimo = window._contimo || [];
window._contimo.push(['disableInitialRender']);
setTimeout(function(contentCategories) { // Simulation of async content categories recieval
window._contimo.push(['setContentCategories', contentCategories]);
window._contimo.push(['refreshPlacements']);
}, 500);
</script>
Specify content categories using node attributes
You can specify content categories using data-contimo-content-categories
attribute on the node, where traffic driver will appear.
<div data-contimo-placement-key="mysite/in-feed" data-contimo-content-categories="1,2,3"></div>
Categories can be separated using comma (,
) or space (
)