Settings
Configure ad server settings and embed instructions
Ad configuration
Embed instructions
Follow these steps to add the ad server and view tracking to your website.
Step 1: Add header script
Add this script once in your website's <head> tag to enable ad serving and view tracking:
<!-- Ad Server & View Tracking -->
<script>
window.AdServerConfig = { url: 'https://your-domain.com' };
</script>
<script src="https://your-domain.com/ad-server.js" async></script>
<script>
(function() {
function trackPageView() {
var url = window.location.href;
fetch('https://your-domain.com/api/views', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ url: url })
}).catch(function(e) {});
}
if (document.readyState === 'complete') {
trackPageView();
} else {
window.addEventListener('load', trackPageView);
}
})();
</script>Step 2: Add ad insertion tag
Add this tag wherever you want ads to appear on your pages:
<div class="ad-server-slot"></div>Step 3: Add partner CTA tag (Optional)
Add this tag to page templates where you want partner call-to-action buttons to appear. The button only shows if the page belongs to a partner and has a CTA configured:
<div class="partner-cta-slot"></div>What's included
- • Ad rendering based on your configured settings
- • Automatic view tracking for registered article and page URLs
- • Click tracking for sponsored content
- • Partner call-to-action buttons on relevant pages