Skip to content
Open
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
4 changes: 4 additions & 0 deletions dev-docs/bidder-adaptor.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ Here is a sample array entry for `validBidRequests[]`:
bidId: "22c4871113f461",
bidder: "rubicon",
bidderRequestId: "15246a574e859f",
pageViewId: 'de48e8d1-25e1-487c-96c6-41fcef84b41b',
bidRequestsCount: 1,
bidderRequestsCount: 1,
auctionsCount: 1,
Expand All @@ -322,6 +323,7 @@ Other notes:
* **Bid ID** is unique across ad units and bidders.
* **auctionId** (see [note](#tid-warning)) is unique per call to `requestBids()`, but is the same across ad units and bidders.
* **Transaction ID** (see [note](#tid-warning)) is unique for each ad unit within a call to `requestBids()`, but same across bidders. This is the ID that enables DSPs to recognize the same impression coming in from different supply sources.
* **Page view ID** is unique for a page view (one load of Prebid); can also be refreshed programmatically. Shared across all requests and responses within the page view, for the same bidder. Different bidders see a different page view ID.
* **Bid Request Count** is the number of times `requestBids()` has been called for this ad unit.
* **Bidder Request Count** is the number of times `requestBids()` has been called for this ad unit and bidder.
* **Auctions Count** is the number of times `requestBids()` has been called for this ad unit excluding the duplicates generated by twin adUnits.
Expand All @@ -340,6 +342,7 @@ Here is a sample bidderRequest object:
auctionStart: 1579746300522,
bidderCode: "myBidderCode",
bidderRequestId: "15246a574e859f",
pageViewId: 'de48e8d1-25e1-487c-96c6-41fcef84b41b',
bids: [{...}],
gdprConsent: {consentString: "BOtmiBKOtmiBKABABAENAFAAAAACeAAA", vendorData: {...}, gdprApplies: true},
ortb2: {...},
Expand Down Expand Up @@ -720,6 +723,7 @@ Sample data received by this function:
auctionStart: 1579746300522,
bidderCode: "myBidderCode",
bidderRequestId: "15246a574e859f",
pageViewId: 'de48e8d1-25e1-487c-96c6-41fcef84b41b',
bids: [{...}],
gdprConsent: {consentString: "BOtmiBKOtmiBKABABAENAFAAAAACeAAA", vendorData: {...}, gdprApplies: true},
refererInfo: {
Expand Down
1 change: 1 addition & 0 deletions dev-docs/modules/pubCommonId.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ Adapters should look for `bid.crumbs.pubcid` in buildRequests() method.
"sizes":[[300, 250], [300,600]],
"bidId":"222187f1ef97e6",
"bidderRequestId":"12088b9bd86f26",
"pageViewId": "861a2d06-e70a-4db9-8620-47d3d1f4f301",
"auctionId":"a1a98ab2-97c9-4f42-970e-6e03040559f2"
}
]
Expand Down
30 changes: 30 additions & 0 deletions dev-docs/publisher-api-reference/refreshPageViewId.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
layout: api_prebidjs
title: pbjs.refreshPageViewId
description:
sidebarType: 1
---

Refreshes the previously generated page view ID. Can be used to instruct bidders that use page view ID to consider future auctions as part of a new page load.

```javascript
// Function to call when the URL changes
function onUrlChange() {
pbjs.refreshPageViewId();
}

// Function to initialize the URL change listener
function initUrlChangeListener() {
// Listen for changes to the history state
window.addEventListener('popstate', onUrlChange);

// Optionally, you might want to handle the initial load as well
onUrlChange();
}

// Call the function to set up the listener
initUrlChangeListener();

```

<hr class="full-rule" />
1 change: 1 addition & 0 deletions prebid-server/developers/add-new-bidder-go.md
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,7 @@ The second argument, `requestInfo`, is for extra information and helper methods
- `requestInfo.PbsEntryPoint` to access the entry point of the bid request, commonly used to determine if the request is for AMP or for a [Long Form Video Ad Pod](/dev-docs/modules/adpod.html).
- `requestInfo.GlobalPrivacyControlHeader` to read the value of the `Sec-GPC` Global Privacy Control (GPC) header of the bid request.
- `requestInfo.ConvertCurrency` a method to perform currency conversions.
- `requestInfo.PageViewId` is the unique identifier for the page view (one load of Prebid.js); can also be refreshed programmatically. Shared across all requests and responses within the page view, for the same bidder. Different bidders see a different page view ID.

The `MakeRequests` method is expected to return a slice (similar to a C# `List` or a Java `ArrayList`) of `adapters.RequestData` objects representing the HTTP calls to be sent to your bidding server and a slice of type `error` for any issues encountered creating them. If there are no HTTP calls or if there are no errors, please return `nil` for both return values. Please do not add `nil` items in the slices.

Expand Down