Why do I have to place the header code in addition to widget code?

The header code contains the technology that triggers the ads to be displayed inside the widgets.  This code generates valuable analytics to measure performance and determine methods for optimization.

This code does not necessarily need to be placed in the header of every page on the site and can be placed in the body with a widget’s code. The key part is that the head code loads before the ad code. This type of placement inside an ad server will work also.  The header code will look similar to this:

<!– nativeads pixel 102287-yourdomain.com start –>

<script type=”text/javascript” src=”//cpanel.nativeads.com/js/pixel/pixel-102287-d31c1251308cc74874fa12cedb5a2cfc651a5836.js”></script>

<!– nativeads pixel 102287-yourdomain.com end –>

Placement example of head code and widget code inside an ad server:

header code
Learn more about widget placement if experiencing difficulties where the widget is placed but ads don’t appear. Please contact the Native Ads support team for additional information or assistance.

Updated on August 11, 2016

Was this article helpful?