Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

load-cookie-with-consent docs #2456

Merged
merged 1 commit into from
Jan 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dev-docs/bidders/appnexus.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ keywords: {

#### User Sync in AMP

If you are syncing user id's with Prebid Server and are using AppNexus' managed service, use the following URL for the source:<br> <code>https://acdn.adnxs.com/prebid/amp/user-sync/load-cookie.html</code>
If you are syncing user id's with Prebid Server and are using AppNexus' managed service, use the following URL for the source:<br> <code>https://acdn.adnxs.com/prebid/amp/user-sync/load-cookie.html</code> or if the AMP page has a CMP, <code>https://acdn.adnxs.com/prebid/amp/user-sync/load-cookie-with-consent.html</code>

<a name="appnexus-debug-auction" />

Expand Down
26 changes: 16 additions & 10 deletions dev-docs/show-prebid-ads-on-amp-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,49 +226,55 @@ Replace `MACRO` in the preceding example with the appropriate macro for the ad s

### User Sync

To sync user IDs with Prebid Server, the `amp-iframe` below may be added to your AMP pages referring to the `load-cookie.html` file made available as part of the [Prebid Universal Creative repository](https://github.com/prebid/prebid-universal-creative). Hosting for the `load-cookie.html` file is not provided by Prebid.org.
To sync user IDs with Prebid Server, the `amp-iframe` below may be added to your AMP pages referring to `load-cookie.html` or if you're running an IAB-compliant AMP CMP you can use `load-cookie-with-consent.html`.

{% capture tipNote %}
The following examples include a transparent image as a placeholder which will allow you to place the example at the top within the HTML body. If this is not included the iFrame must be either 600px away from the top or not within the first 75% of the viewport when scrolled to the top – whichever is smaller. For more information on this, see [amp-iframe](https://ampbyexample.com/components/amp-iframe/)
{% endcapture %}

{% include alerts/alert_tip.html content=tipNote %}

{% capture consentNote %}
The load-cookie-with-consent.html file has the same argument syntax as load-cookie.html. It's a different file because it's larger and depends on the existence of an AMP Consent Management Platform.
{% endcapture %}
{% include alerts/alert_tip.html content=consentNote %}

If you're using AppNexus' managed service, you would enter something like this:
```html
<amp-iframe width="1" title="User Sync"
height="1"
sandbox="allow-scripts"
frameborder="0"
src="https://PROVIDED_BY_APPNEXUS/load-cookie.html?endpoint=appnexus&max_sync_count=5">
src="https://acdn.adnxs.com/prebid/amp/user-sync/load-cookie.html?endpoint=appnexus&max_sync_count=5">
<amp-img layout="fill" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" placeholder></amp-img>
</amp-iframe>
```

See the AppNexus bidder parameters page [for more details](/).

If you are utilizing Rubicon Project's managed service, there's an extra parameter:
If you are utilizing Magnite's managed service, there's an extra parameter:
```html
<amp-iframe width="1" title="User Sync"
height="1"
sandbox="allow-scripts"
frameborder="0"
src="https://PROVIDED_BY_RUBICON/prebid/load-cookie.html?endpoint=rubicon&max_sync_count=5&args=account:RUBICON_ACCOUNT_ID">
src="https://PROVIDED_BY_MAGNITE/prebid/load-cookie.html?endpoint=rubicon&max_sync_count=5&args=account:MAGNITE_ACCOUNT_ID">
<amp-img layout="fill" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" placeholder></amp-img>
</amp-iframe>
```

Available arguments for the `load-cookie.html` query string:
The usage of `load-cookie.html` and `load-cookie-with-consent.html` is the same. The arguments available on the query string are:

{: .table .table-bordered .table-striped }
| Param | Scope | Values | Description |
| --- | --- | --- | --- |
| endpoint | recommended | appnexus or rubicon | Determines which cluster of prebid servers to load from. Default, for legacy reasons, is appnexus. |
| max_sync_count | optional | integer | How many sync pixels should be returned from Prebid Server |
| args | optional | attr1:val1,attr2:val2 | These attribute value pairs will be passed to Prebid Server in the /cookie-sync call. The attribute and value will be quoted by the system when appropriate. |
| args | optional | attr1:val1,attr2:val2 | These attribute value pairs will be passed to Prebid Server in the /cookie_sync call. The attribute and value will be quoted by the system when appropriate. |
| gdpr | optional | 0 or 1 | Defines whether GDPR processing is in scope for this request. 0=no, 1=yes. Leave unknown if not sure. |
| gdpr_consent | optional | String | IAB CMP-formatted consent string |

{% capture endpointNote %}
Currently, if you need to sync with a Prebid Server other than appnexus or rubicon, you'll need to fork the repo, change the endpoint, and host it somewhere. There is an [issue open to resolve](https://github.com/prebid/prebid-universal-creative/issues/122) this.
{% endcapture %}
{% include alerts/alert_note.html content=endpointNote %}

### AMP RTC and GDPR

The two Prebid Server RTC vendor strings 'prebidappnexus' and 'prebidrubicon'
Expand Down
2 changes: 1 addition & 1 deletion faq/prebid-server-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ For Prebid.js-initated server requests, we've found that cookie match rates are

[AMP](/prebid-server/use-cases/pbs-amp.html) is a different story. There are several things you should check:

- First, the page has to include the [usersync amp-iframe](/dev-docs/show-prebid-ads-on-amp-pages.html#user-sync). This amp-iframe loads `load-cookie.html`.
- First, the page has to include the [usersync amp-iframe](/dev-docs/show-prebid-ads-on-amp-pages.html#user-sync). This amp-iframe loads `load-cookie.html` or `load-cookie-with-consent.html`.
- Then AMP has to run this iframe. There are limitations as to where this amp-iframe can be on the page and possible how many amp-iframes there are on the page.
- The [/cookie_sync](/prebid-server/developers/pbs-cookie-sync.html) call is initiated from `load-cookie.html`, but there are many adapters on the server side, and a limited number of them will be synced at once. Consider setting `max_sync_count` higher to get all bidders synced faster,
- In a GDPR context, AMP doesn't supply the `gdprApplies` field. Prebid Server will determine for itself whether it can sync cookies, but it will not tell bidders whether the request is in GDPR-scope, so each bidder will have to determine scope for itself.
Expand Down
3 changes: 3 additions & 0 deletions prebid-server/developers/pbs-cookie-sync.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Cookie sync for AMP works in a way quite similar to Prebid.js.

Note that the only two values currently valid for 'endpoint' are 'appnexus' and 'rubicon' -- other host companies should update their copy to include their endpoint.

See [the AMP implementation guide](/dev-docs/show-prebid-ads-on-amp-pages.html#user-sync) for more information.

2) The publisher places the 'load-cookie' script into the page:

Expand All @@ -75,6 +76,8 @@ Note that the only two values currently valid for 'endpoint' are 'appnexus' and
</amp-iframe>
```

Note: if the publisher has an AMP Consent Management Platform, they should use `load-cookie-with-consent.html`.

3) At runtime, the `load-cookie` script just calls the Prebid Server /cookie_sync endpoint. The rest works the same as described for Prebid.js above.


Expand Down