AdsPitch

Documentation

Integrating the AdsPitch tag

One script per page, one `ins` element per ad zone. Zone keys come from your publisher console.

1. Load the script once

<script async src="https://www.adspitch.com/adspitch.js"></script>

2. Place a zone

<ins class="adspitch" data-zone="zn_xxxxxxxxxxxx" data-width="300" data-height="250"></ins>

The tag replaces the element with a sandboxed iframe, sizes it to the creative, and hides the slot when there is nothing to show (unless a fallback is configured for the zone).

3. Single-page apps

New ins.adspitch elements added to the DOM are picked up automatically. To force a refresh after a route change call window.adspitch.refresh().

4. Native rendering via JSON

For apps and server-side rendering, request a decision and render it yourself. Fire the viewUrl once the ad is on screen and link the creative to clickUrl.

GET https://www.adspitch.com/api/v1/serve?zone=zn_xxxxxxxxxxxx&u=https%3A%2F%2Fyoursite.com%2Fpage

{
  "fill": true,
  "creative": { "type": "NATIVE", "headline": "...", "body": "...", "imageUrl": "...", "ctaText": "..." },
  "clickUrl": "https://www.adspitch.com/api/v1/c/<token>",
  "viewUrl":  "https://www.adspitch.com/api/v1/v/<token>"
}

5. Privacy

AdsPitch sets no cookies on your visitors. Frequency capping uses a short-lived hash of IP and user agent kept in memory on the ad server. Mention AdsPitch in your privacy policy as an advertising partner.