cat > /var/www/adshield/frontend/dist/impressions-pixel.html << 'IXEOF' Impression Pixel — MediaSafe
Impression Pixel

Impression pixel

Measure banner viewability and catch invalid impressions (bots, datacenters). One small tag in your creative or on the publisher page.

What it measures

Viewability (MRC standard) — was the banner actually in view: at least 50% of its area for at least 1 second.
Invalid traffic — datacenter IPs, bots, headless browsers, known fraud addresses.
Context — geo, device, placement, and the publisher domain where the banner was shown.

Where to get your tag

In your dashboard: Settings → Site & counter → the "Impression pixel" panel. Your site key is filled in automatically. Choose the mode, optionally set campaign and placement, and copy the tag in the format you need.

Two modes

In the creative — the tag travels inside the banner. Use this when buying through Yandex.Direct, Google Ads or a DSP.
On the publisher page — the tag sits next to the ad slot on the site. Use this when you control the page.

Three formats

Script tag

<script src="https://ingest.mediasafe.cc/impression.js"
        data-site="as_YOUR_KEY" data-mode="creative" async></script>

Pixel URL

https://ingest.mediasafe.cc/px.html?site=as_YOUR_KEY&mode=creative

Iframe

<iframe src="https://ingest.mediasafe.cc/px.html?site=as_YOUR_KEY&mode=creative"
        width="0" height="0" style="display:none"></iframe>

Where to paste it

1
Yandex.Direct / Google Ads
Paste into the third-party impression pixel / tag field when uploading the creative.
2
DSP / programmatic
Add as a creative-level impression tracker.
3
Your own site
Place the script next to the ad slot or in the page head (publisher mode).

Where results appear

Every impression is sent to MediaSafe, where viewability is measured and invalid impressions are filtered. See it all in the "Impressions" section of your dashboard: viewability rate, invalid (IVT) rate, reasons, geography, devices, placements, and top publishers by fraud.

Getting started

Create an account, add your site, and grab the pixel — or reach us at support@mediasafe.cc.