-
Notifications
You must be signed in to change notification settings - Fork 50
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
Gwh apidocs 1885 prebid rework #390
Conversation
There are some broken links it seem when i ran npm run start
|
docs/ref-info/glossary-uid.md
Outdated
@@ -119,6 +123,11 @@ sidebar_position: 10 | |||
<dd>Each UID2 <a href="/docs/intro#participants">participant</a> using a server-side implementation has an API key (client key) and also a secret value associated with the key, called the client secret (API secret). The client secret is known only to the participant and the UID2 service.</dd> | |||
<dd>For details, see <a href="/docs/getting-started/gs-credentials">UID2 Credentials</a>.</dd> | |||
|
|||
<dt class="jump-anchor" id="gl-cstg">Client-side token generate (CSTG)</dt> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generate or Generation? in Prebid.js Integration Overview page, it mentioned as Generation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want KK to weigh in on this one. Prebid overview "Passing the UID2 Token to the Bid Stream" uses both. "generation" flows better in some examples but we need to be consistent. TBD and I've noted your query in the Overview page as a query for KK. Based on the decision I'll make sure they are consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed. CSTG and SSTG terms are coming out so this is a non-issue.
docs/guides/integration-prebid.md
Outdated
|
||
The following sections demonstrate the different ways that you can configure the UID2 module and list the requirements for the DII passed to the module: | ||
The Prebid.js UID2 module can automatically refresh the UID2 tokens. If you prefer to implement manual refresh outside Prebid.js, see [Refreshing a UID2 Token](integration-prebid-server-side.md#refreshing-a-uid2-token) in the Server-Side Integration Guide. | ||
(**GWH_ query: is there no manual refresh option for client-side?**) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeh there is no manual refresh on client side
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sunnywu thx. Slightly updated the wording here to include: " The client-side integration solution includes automated token refresh."
@@ -104,7 +104,8 @@ const sidebars = { | |||
items: [ | |||
'guides/integration-prebid', | |||
'guides/publisher-client-side', | |||
'guides/integration-prebid-advanced', | |||
'guides/integration-prebid-client-side', | |||
'guides/integration-prebid-server-side', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think the server/client-side guides should be child pages under guides/integration-prebid ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sunnywu definitely do not want to add another level on the sidebar. Plus we don't have styling for it. Not sure what the best approach is for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For under Web
section, maybe we don't show the Client/Server side Integration sub pages? If we lead people to start reading from prebid.js Integration Overview, i don't think we neeed to list Client-Side/Server-Side pages Under Web
?
It's still listed under Prebid
subsection anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sunnywu I hear you. Currently, if I take it off the sidebar it messes with the way the page is rendered.
I have a plan to make audience-specific sidebars when I can get to it. That will give us some leeway because we won't need to have the Publisher Integrations level. I believe that's the best solution for organization. Will discuss with KK also but currently I feel the best plan is to include all. LP might have a better suggestion. Also FYI KK wanted Prebid listed in both places (in both the summary file and the sidebar).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could set up styling for a 3rd level.
We're really set up for having everything linked from the sidebar - the whole nav system is designed around the idea of a "current page" that you're on which is highlighted in the sidebar. Changing that would probably require some major design re-thinking and I don't think it's worth it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lionell-pack-ttd understood. Having audience-specific menu options was actually an original requirement but at the time I didn't think we could even do it. Now, we could and it's on my list to get to quite soon. Need KK input here also.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI discussed with KK today 12/20 and he was in agreement on doing audience-specific sidebars.
}); | ||
``` | ||
|
||
For the list of possible base URLs, see [Environments](../getting-started/gs-environments.md). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add the word Integration into the Testing row in this environment page? everywhere else we mentioned Integration env but in this page we just say Testing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sunnywu good point! Done, thx.
| Param under userSync.userIds[] | Scope | Type | Description | Example | | ||
| --- | --- | --- | --- | --- | | ||
| name | Required | String | ID value for the UID2 module. Always `"uid2"`. | `"uid2"` | | ||
| value | Optional, server-only mode | Object | An object containing the value for the advertising token. | See [Configuration Parameter Examples: Value](#configuration-parameter-examples-value). | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means "Required ONLY for Server-only mode". CLient Refresh mode won't use this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sunnywu assuming your comment refers to name. I have for Client Refresh mode it's N/A, for server-only mode it's required. Please verify.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i have reviewed the new table column and left couple more comments
|
||
The following parameters apply only to the UID2 Prebid User ID Module integration. | ||
|
||
(**GWH_SW question I missed asking you. When we say "Optional, client refresh" -- what does that mean? Is it required for client refresh? Or N/A for server-only and optional for client refresh? And will readers know? If something is required for a specific mode we should say that.**) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Optional, client refresh mode" means It's optional in Client Refresh Mode only and not required (or even optional) for server only mode at all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx much. I've reworked that column of the table. Will post visual in the channel for your input and LP input.
|
||
| Option | Details | Use Case | | ||
| --- | --- | --- | | ||
| Set `params.uid2Cookie` to the name of the cookie that contains the response body as a JSON string. | See [Client Refresh Cookie Example](#client-refresh-cookie-example). | Use this option only when there is enough space left in your cookie to store the response body. (**GWH_LP do we need to address how user will know if there is space in the cookie?**)| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lionell-pack-ttd is this optional even for when using local storage (i.e. not using cookie)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sunnywu : also noted in source doc as an additional query.
@@ -26,14 +26,15 @@ If you're using the integration environment as well as the production environmen | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it still mention Prebid.js Express Integration Guide in the table above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx. Fixed plus did multiple checks and additional fixes.
|
||
| Param under userSync.userIds[] | Mode/Scope | Type | Description | Example | | ||
| --- | --- | --- | --- | --- | | ||
| name | CR: N/A<br/>SO: Required | String | ID value for the UID2 module. Always `"uid2"`. | `"uid2"` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sute why this   is needed ?
but anyways name
is required for both CR/SO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sunnywu re the   it prevents word wrap which looks better in the output, in this instance.
Fixed the value for name -- thx.
| value | CR: N/A<br/>SO: Optional | Object | An object containing the value for the advertising token. | See [Configuration Parameter Examples: Value](#configuration-parameter-examples-value). | | ||
| params.uid2Token | CR: Optional<br/>SO: N/A | Object | The initial UID2 token. This should be the `body` element of the decrypted response from a call to the `/token/generate` or `/token/refresh` endpoint. | See [Sample Token](#sample-token). | | ||
| params.uid2Cookie | CR: Optional<br/>SO: N/A | String | The name of a cookie that holds the initial UID2 token, set by the server. The cookie should contain JSON in the same format as the uid2Token param. **If uid2Token is supplied, this param is ignored.** | See [Sample Token](#sample-token). | | ||
| params.uid2ApiBase | CR: Optional<br/>SO: N/A | String | Overrides the default UID2 API endpoint. | `"https://prod.uidapi.com"` (the default)| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is optional for both CR/SO, maybe link to Environment page http://localhost:3006/docs/getting-started/gs-environments so people know what value can be set here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed value and added link, thx much.
| Param under userSync.userIds[] | Scope | Type | Description | Example | | ||
| --- | --- | --- | --- | --- | | ||
| name | Required | String | ID value for the UID2 module. Always `"uid2"`. | `"uid2"` | | ||
| value | Optional, server-only mode | Object | An object containing the value for the advertising token. | See [Configuration Parameter Examples: Value](#configuration-parameter-examples-value). | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i have reviewed the new table column and left couple more comments
@sunnywu thx. The only current link issues are in the Japanese and I will resolve as best I can when the English is resolved. Suspecting the above was actually from jp files but anyway, nothing that isn't as good as I can make it for the moment. |
| Implementation Method | Link to Example | | ||
| --- | --- | | ||
| Set a cookie named `__uid2_advertising_token` and store the advertising token value in it. | [Server-Only Cookie Example](#server-only-cookie-example) | | ||
| Set `value` to an ID block containing the advertising token. | [Server-Only Value Example](#server-only-value-example) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the 2 links on 2 lines above are broken. they should be
#server-only-mode-cookie-example
#server-only-mode-value-example)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sunnywu TYSM. Fixed. Checked for other instances, for both -- there are none.
| Option | Details | Use Case | | ||
| --- | --- | --- | | ||
| Set `params.uid2Cookie` to the name of the cookie that contains the response body as a JSON string. | See [Client Refresh Cookie Example](#client-refresh-cookie-example). | Use this option only if you're sure that there is enough space left in your cookie to store the response body. If you're not sure, or the cookie storage needs might vary, choose the other option. | | ||
| Set `params.uid2Token` to the response body as a JavaScript object. | See [Client Refresh uid2Token Example](#client-refresh-uid2token-example). | You might choose to provide the response body via `params.uid2Token` in either of these cases:<ul><li>If you are already storing a lot of data in the cookie and adding the response body might exceed the cookie size limit.</li><li>If you prefer to have the the Prebid module store the token value for you.</li></ul> | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the 2 links in the table are broken should be:
#client-refresh-mode-cookie-example
#client-refresh-mode-uid2token-example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sunnywu TYSM. Fixed. Checked for, and fixed, other instances, for both.
|
||
If the UID2 token has expired and cannot be refreshed, you must configure the UID2 module with DII to generate a new token. To do this, check the value returned by `pbjs.getUserIds().uid2`, as shown in the following example: | ||
|
||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mark it up as js/JavaScript here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thx.
|
||
To specify a different UID2 server when you're configuring the UID2 module, set the optional params.uid2ApiBase parameter, as shown in the following example: | ||
|
||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mark it up as js/JavaScript here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thx.
|
||
The following example sets the `value` field to an ID block containing the advertising token without storing it in a cookie. | ||
|
||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mark it up as js/JavaScript here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thx.
|
||
To specify a different UID2 server when you're configuring the UID2 module, set the optional params.uid2ApiBase parameter, as shown in the following example: | ||
|
||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mark it up as js/JavaScript here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done thx.
}] | ||
} | ||
}); | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can further simplify the code example
if (!pbjs.getUserIds().uid2) {
// There is no token that can be used or refreshed.
// Configure the UID2 module with a new token
pbjs.setConfig({
userSync: {
userIds: [{
name: 'uid2',
params: {
uid2Token: {
'advertising_token': '...advertising token...',
'refresh_token': '...refresh token...',
// etc. - see the sample token for contents of this object
}
}
}]
}
});
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that seems reasonable to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thx both.
|
||
Cookie: | ||
|
||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mark up as js?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sunnywu is the cookie JS? Done but it looks the same.
|
||
Configuration: | ||
|
||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mark up as js?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thx.
@genwhittTTD whatever naming we decide to go with at the end, you will need to rename "prebid.js express"/"Prebid.js Client-Side Integration" in the prebid.js CSTG example codes/webtsite on: https://github.com/IABTechLab/uid2docs/blob/3b99f7cccdd8facf99b3b21e80af2f22a95c94fc/static/examples/cstg-prebid-example/README.md |
@sunnywu updated the referenced files per your note, as part of global name changes: |
updates for Prebid doc refactoring