Tracking Impressions using AccuPixel and the JSON Ad API

Tracking Impressions with AccuPixel Using the JSON Ad API

When using AdButler's JSON Ad API to serve ads, you can take advantage of the AccuPixel feature to accurately track impressions. This guide explains how to integrate AccuPixel tracking when serving ads through the JSON Ad API.


What is AccuPixel?

AccuPixel is an optional feature that enhances the accuracy of impression tracking. When enabled, AccuPixel ensures that an impression is only counted when the ad is fully loaded and rendered. This is especially useful for advanced use cases such as pre-caching or loading ads asynchronously.

For details on enabling AccuPixel, refer to the guide here:

Enabling AccuPixel


How to Track Impressions with the JSON Ad API

When AccuPixel is enabled and you request ads via the JSON Ad API, the response will include a new parameter:

accupixel_url

The accupixel_url is a tracking URL that must be pinged to record the impression event. If you do not call the accupixel_url, the ad will be served, but no impression will be recorded.

Example JSON Ad API Response

Here's an example of what the JSON response looks like when AccuPixel is enabled:

{
    accupixel_url: "https://servedbyadbutler.com/adserve/;ID=XXXXXX;size=1x1;type=p959fb862;setID=XXXXXX;plid=XXXXXX;BID=XXXXXXXXX;place=0;rnd=XXXXXXXXX;psrtype=json;v=0;mt=XXXXXXXXXX;hc=XXXXXXXXXX;rnd=XXXXXXX"
}

How to Ping the accupixel_url

When you decide to display the ad on your page, make a request to the accupixel_url to ensure the impression is tracked. This can be done using a simple JavaScript function.

Benefits of Using AccuPixel

1. Accurate Impression Tracking

AccuPixel ensures that impressions are only counted when the ad is rendered, improving tracking accuracy compared to traditional methods.

2. Pre-caching and Ad Caching

You can load ads in advance (pre-caching) without immediately counting impressions. This is useful for improving page load performance and delivering a seamless user experience.

3. Flexible Ad Rendering

Load ads ahead of time and decide when to render them based on user behavior or other conditions. Impressions will only be counted once the accupixel_url is pinged.


Common Pitfalls to Avoid

  1. Forgetting to Ping the accupixel_url: If you don’t call the accupixel_url, impressions won’t be recorded.

  2. Delaying the Ping Too Long: Ensure you ping the accupixel_url when the ad is displayed, not long after.

  3. Caching Without Rendering: If you cache ads but never render them, no impressions will be tracked. This is by design, so make sure to render cached ads when appropriate.


Conclusion

By integrating AccuPixel with AdButler's JSON Ad API, you gain precise control over when impressions are tracked, enabling more accurate analytics and enhanced flexibility in ad delivery.

If you have any questions or need further assistance, feel free to reach out to our support team!


Can't find what you're looking for?

Send us an email

hello@adbutler.com

Visit the blog

For more ad serving tips, industry news and AdButler insights.