ampproject / ampproject/amphtml

PPID parameter missing in ad requests with multiple <amp-ad> slots (works with only one)

Open
#40,413 8 comments 0 reactions 1 assignee Claimed by @powerivq View on GitHub
Type: Bug
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

### Description

In an AMP page using with Real-Time Config (RTC) and for dynamic targeting, the PPID (Publisher Provided Identifier) is correctly included in the ad request to securepubads.g.doubleclick.net when only one slot is present. However, when multiple slots are added, the PPID is omitted from the ad request and is not in the payload. This issue occurs despite the PPID being dynamically set via an function (permutiveCachedTargeting.ct) that returns a ppid value alongside targeting data.

### Expected Behavior:
The PPID, dynamically provided by the function in the RTC configuration, should be included in the ad request for all slots, regardless of the number of slots, as per the AMP DoubleClick documentation (amp-ad#attributes and doubleclick-rtc.md).

### Actual Behavior:
The PPID is included in the ad request only when a single slot is present. With multiple slots, the PPID is omitted from the request to securepubads.g.doubleclick.net, while other targeting parameters (e.g., permutive and puid) are correctly included.

### Reproduction Steps

1. Set up an AMP page with and to provide dynamic targeting, including PPID, using Permutive data stored in localStorage (see sample code below).
2. Add a single component with type="doubleclick", configured with RTC to call the function permutiveCachedTargeting.ct, which returns {targeting: {...}, ppid: "..."}.
3. Validate the page with the AMP validator and load it in a browser.
4. Inspect the ad request in the browser's DevTools (Network tab, filter for securepubads.g.doubleclick.net). Confirm that the PPID is included in the request (e.g., ppid=permutive-id-value).
5. Add a second slot with a similar RTC configuration.
6. Reload the page and inspect the ad request. The PPID parameter is missing from the request payload for all slots.

### Sample code:
```










{
"apiKey": "[MY_API_KEY]",
"projectId": "[MY_PROJECT_ID]",
"environment": "production"
}




exportFunction('ct', () => {
let c = JSON.parse(localStorage.getItem('_pdfps'));
let i = localStorage.getItem('permutive-id');
return {targeting: {permutive: c ? c : [], puid: i}, ppid: i};
})



...



...

```

### Relevant Logs

```shell

```

### Browser(s) Affected

_No response_

### OS(s) Affected

_No response_

### Device(s) Affected

_No response_

### AMP Version Affected

2509191850000

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.