3

Implementing Prebid AMP RTC method. Prebid bids functions operate as expected and ads are serving.

The user-sync, though, is not firing due to the tracking/analytics constraints in-amp. Regardless if the analytics uses amp-analytics and the user-sync amp-iframe, AMP is detecting it as a tracker and displays the following error:

Only 1 analytics/tracking iframe allowed per page. Please use amp-analytics instead

The analytics works as expected; however the user-sync does not initiate.

is there any method to use to bypass this analytics policy? I've tried amp-pixel but it does not work for user-sync.

This is the user-sync attempting to be added to the page:

<amp-iframe width="1" title="User Sync"
height="1"
sandbox="allow-scripts"
frameborder="0"
src="https://cdn.jsdelivr.net/npm/prebid-universal-creative@latest/dist/load-cookie.html">
<amp-img layout="fill" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" alt="placeholder"></amp-img>
</amp-iframe>
Siddharth Kaul
  • 871
  • 10
  • 20
scott
  • 31
  • 1

1 Answers1

0

I recommend that you try getting in touch with your provider, they may have an alternative, also you can try using the amp-analytics for some providers, nevertheless not all are supported.

If you're in a real hurry or there really are no other alternatives, there is a way to bypass this although I would say that it's really not recommended and it's a really hacky and fragile solution, it may also stop working as soon as a new release is out. To bypass this restriction simply set the width and height of the amp-iframe to something bigger than 10 pixels. In your case it will be something like this:

<amp-iframe width="11" height="11"
title="User Sync"
sandbox="allow-scripts"
frameborder="0"
src="https://cdn.jsdelivr.net/npm/prebid-universal-creative@latest/dist/load-cookie.html">
<amp-img layout="fill" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" alt="placeholder"></amp-img>
</amp-iframe>

Again, only use this solution as a last resource. (Tested on version v0/amp-iframe-0.1.js)

Pablo Flores
  • 1,350
  • 13
  • 15