Skip to content

Commit

Permalink
mods from SW edits
Browse files Browse the repository at this point in the history
  • Loading branch information
genwhittTTD committed Jan 25, 2024
1 parent f7a4983 commit 67dc9a7
Show file tree
Hide file tree
Showing 16 changed files with 87 additions and 149 deletions.
2 changes: 1 addition & 1 deletion docs/guides/integration-javascript-server-side.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ For technical details about the SDK, see [UID2 SDK for JavaScript Reference Guid
## Sample Implementation Website

For an example application, see the UID2 Google ESP with SDK v3 example:
- Code and docs: [UID2 SDK ESP Integration Example](https://github.com/IABTechLab/uid2-web-integrations/tree/main/examples/google-esp-integration/with_sdk_v3)
- Code and docs: [UID2 SDK Secure Signals Integration Example](https://github.com/IABTechLab/uid2-web-integrations/tree/main/examples/google-secure-signals-integration/with_sdk_v3)
- Running site: [Client-Side UID2 SDK Integration Example](https://esp-jssdk-integ.uidapi.com/)

## Introduction
Expand Down
4 changes: 0 additions & 4 deletions docs/guides/integration-javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ From the table in [Client-Side or Server-Side Integration](#client-side-or-serve

The UID2 SDK for JavaScript includes automated token refresh.

(**GWH_01. The wording below is from the Prebid overview. I see no info re manual refresh in the JS guides so prob this just comes out?... but, checking.**)

**If you prefer to implement manual refresh, see [Refreshing a UID2 Token](integration-prebid-server-side.md#refreshing-a-uid2-token) in the Server-Side Integration Guide.**

## Storing the UID2 Token in the Browser
<!-- GWH check corresponding (not identical) section in integration-prebid.md, integration-prebid-client-side.md, integration-prebid-client-side.md, for consistency -->

Expand Down
4 changes: 2 additions & 2 deletions docs/guides/integration-options-publisher-web.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ If you want to integrate using Prebid, here are some additional questions you'll
- If you're using Prebid 8.21.0 or later, you can use the client-side Prebid integration option, which is the simplest and easiest implementation approach.
- If you're using a version prior to 8.21.0 (7.53.0 or later), and can't easily upgrade, you'll choose a server-side option.
- Domain names:
- As part of account setup, if you're using the Prebid client-side option, you'll need to provide a list of your top-level domains.
- Are you already using the UID2 JavaScript SDK to generate and refresh the token? If so, you can continue to use the Prebid server-side implementation. For details, see [UID2 Server-Side Integration Guide for Prebid.js](integration-prebid-server-side.md). -->
- As part of account setup, if you're using the Prebid.js client-side option, you'll need to provide a list of your top-level domains.
- Are you already using the UID2 JavaScript SDK to generate and refresh the token? If so, you can continue to use the Prebid.js server-side implementation. For details, see [UID2 Server-Side Integration Guide for Prebid.js](integration-prebid-server-side.md). -->

<!--
## Advantages: Summary
Expand Down
8 changes: 5 additions & 3 deletions docs/guides/publisher-client-side.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@ If you want to use a debug build of the SDK, use the following URL instead:

## Sample Implementation Website

For an example application, see this example:
- Code: [Example JavaScript Express Integration](https://github.com/IABTechLab/uid2-web-integrations/tree/main/examples/cstg)
- Running site: [UID2 SDK Integration Example](https://cstg-integ.uidapi.com/)
For an example website, see this example:
- Code: [Example Client-Side Integration for JavaScript](https://github.com/IABTechLab/uid2-web-integrations/tree/main/examples/cstg)
- Running site: [Client-Side Integration Example, UID2 JavaScript SDK](https://cstg-integ.uidapi.com/)

<!-- (Source code for running site: https://github.com/IABTechLab/uid2-web-integrations) -->


## Complete UID2 Account Setup
Expand Down
14 changes: 7 additions & 7 deletions docs/overviews/overview-publishers.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ For a detailed summary of web integration options, see [Web Integration Overview

| Integration Type| Documentation | Content Description |
| :--- | :--- | :--- |
| Prebid (Overview) | [UID2 Integration Overview for Prebid.js](../guides/integration-prebid.md) | An overview of options for publishers who want to integrate with UID2 and generate UID2 tokens to be passed by Prebid.js in the RTB bid stream. |
| Prebid Client-Side Integration | [UID2 Client-Side Integration Guide for Prebid.js](../guides/integration-prebid-client-side.md) | A guide for publishers who want to request UID2 tokens client-side, which is the easiest implementation approach, and choose to have Prebid.js manage the following: <ul><li>Token generation and token refresh.</li><li>Passing the tokens into the RTB bid stream.</li></ul> |
| Prebid Server-Side Integration | [UID2 Server-Side Integration Guide for Prebid.js](../guides/integration-prebid-server-side.md) | A guide for publishers who want to integrate with UID2 and generate UID2 tokens to be passed by Prebid.js in the RTB bid stream, but want to generate tokens server-side: for example, publishers who are using a Private Operator. |
| Prebid.js (Overview) | [UID2 Integration Overview for Prebid.js](../guides/integration-prebid.md) | An overview of options for publishers who want to integrate with UID2 and generate UID2 tokens to be passed by Prebid.js in the RTB bid stream. |
| Prebid.js Client-Side Integration | [UID2 Client-Side Integration Guide for Prebid.js](../guides/integration-prebid-client-side.md) | A guide for publishers who want to request UID2 tokens client-side, which is the easiest implementation approach, and choose to have Prebid.js manage the following: <ul><li>Token generation and token refresh.</li><li>Passing the tokens into the RTB bid stream.</li></ul> |
| Prebid.js Server-Side Integration | [UID2 Server-Side Integration Guide for Prebid.js](../guides/integration-prebid-server-side.md) | A guide for publishers who want to integrate with UID2 and generate UID2 tokens to be passed by Prebid.js in the RTB bid stream, but want to generate tokens server-side: for example, publishers who are using a Private Operator. |
| JavaScript (Overview) | [UID2 Integration Overview for JavaScript](../guides/integration-javascript.md) | An overview of options for publishers who want to integrate with UID2 using the JavaScript SDK. |
| JavaScript Client-Side Integration | [Client-Side Integration Guide for JavaScript](../guides/publisher-client-side.md) | A guide for publishers who want to integrate with UID2 using only client-side JavaScript changes, which is the easiest implementation approach.<br/>The UID2 SDK for JavaScript manages token generation and token refresh automatically. |
| JavaScript Client-Side Integration | [Server-Side Integration Guide for JavaScript](../guides/integration-javascript-server-side.md) | A publisher guide covering standard web integration scenarios that use the UID2 SDK for JavaScript and require tokens to be generated on the server side and passed to the publisher web pages. |
| JavaScript Server-Side Integration | [Server-Side Integration Guide for JavaScript](../guides/integration-javascript-server-side.md) | A publisher guide covering standard web integration scenarios that use the UID2 SDK for JavaScript and require tokens to be generated on the server side and passed to the publisher web pages. |
| Server-Side Integration | [Publisher Integration Guide, Server-Only](../guides/custom-publisher-integration.md) | A guide for publishers who do not use the [UID2 SDK for JavaScript](../sdks/client-side-identity.md). |
| Publisher/SSP Integration with GAM | [Google Ad Manager Secure Signals Integration Guide](../guides/google-ss-integration.md) | A guide covering the additional steps needed for publishers using UID2 with the Google Ad Manager Secure Signals feature (previously known as Encrypted Signals for Publishers, ESP). |

Expand All @@ -111,9 +111,9 @@ The following resources are available for publishers integrating with Google Ad

| Integration Type| Documentation | Content Description |
| :--- | :--- | :--- |
| Prebid (Overview) | [UID2 Integration Overview for Prebid.js](../guides/integration-prebid.md) | An overview of options for publishers who want to integrate with UID2 and generate UID2 tokens to be passed by Prebid.js in the RTB bid stream. |
| Prebid Client-Side Integration | [UID2 Client-Side Integration Guide for Prebid.js](../guides/integration-prebid-client-side.md) | A guide for publishers who want to request UID2 tokens client-side, which is the easiest implementation approach, and choose to have Prebid.js manage the following: <ul><li>Token generation and token refresh.</li><li>Passing the tokens into the RTB bid stream.</li></ul> |
| Prebid Server-Side Integration | [UID2 Server-Side Integration Guide for Prebid.js](../guides/integration-prebid-server-side.md) | A guide for publishers who want to integrate with UID2 and generate UID2 tokens to be passed by Prebid.js in the RTB bid stream, but want to generate tokens server-side: for example, publishers who are using a Private Operator. |
| Prebid.js (Overview) | [UID2 Integration Overview for Prebid.js](../guides/integration-prebid.md) | An overview of options for publishers who want to integrate with UID2 and generate UID2 tokens to be passed by Prebid.js in the RTB bid stream. |
| Prebid.js Client-Side Integration | [UID2 Client-Side Integration Guide for Prebid.js](../guides/integration-prebid-client-side.md) | A guide for publishers who want to request UID2 tokens client-side, which is the easiest implementation approach, and choose to have Prebid.js manage the following: <ul><li>Token generation and token refresh.</li><li>Passing the tokens into the RTB bid stream.</li></ul> |
| Prebid.js Server-Side Integration | [UID2 Server-Side Integration Guide for Prebid.js](../guides/integration-prebid-server-side.md) | A guide for publishers who want to integrate with UID2 and generate UID2 tokens to be passed by Prebid.js in the RTB bid stream, but want to generate tokens server-side: for example, publishers who are using a Private Operator. |

### Google Ad Manager Integrations

Expand Down
12 changes: 6 additions & 6 deletions docs/ref-info/updates-doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,30 +97,30 @@ We've replaced the previous **API Keys** page with a new page that includes info

For details, see [UID2 Credentials](../getting-started/gs-credentials.md).

### New: JavaScript Express Integration Guide
### New: Client-Side Integration Guide for JavaScript

21 November 2023

The *JavaScript Express Integration Guide* is a completely new document at the existing URL, covering a new, simpler way of using the UID2 SDK for JavaScript for a client-side publisher implementation.
The Client-Side Integration Guide for JavaScript is a completely new document at the existing URL, covering a new, simpler way of using the UID2 SDK for JavaScript for a client-side publisher implementation.

For details, see [Client-Side Integration Guide for JavaScript](../guides/publisher-client-side.md).

The content that was in the previous *UID2 SDK for JavaScript Integration Guide* is now in a supplementary document for publishers who want to implement the JavaScript SDK on the server side.

:::note
This document was updated in January 2024 to [Client-Side Integration Guide for JavaScript](../guides/publisher-client-side.md), and the JavaScript Standard Integration Guide. is now the [Server-Side Integration Guide for JavaScript](../guides/integration-javascript-server-side.md).
This document was updated in January 2024 to [Client-Side Integration Guide for JavaScript](../guides/publisher-client-side.md), and the JavaScript Standard Integration Guide is now the [Server-Side Integration Guide for JavaScript](../guides/integration-javascript-server-side.md).
:::

### New: Prebid.js Integration Guide
### New: UID2 Client-Side Integration Guide for Prebid.js

2 November 2023

The Prebid.js Express Integration Guide is a completely new document at the existing URL, covering a new, simpler way of integrating UID2 with Prebid that does not require any server-side work.
The UID2 Client-Side Integration Guide for Prebid.js is a completely new document at the existing URL, covering a new, simpler way of integrating UID2 with Prebid that does not require any server-side work.

The content that was in the previous version of the Prebid document is now in a supplementary document, *Prebid.js Advanced Integration Guide*, for publishers who are using a private operator or who prefer to implement token generate on the server side.

:::note
These documents were further updated in later revisions. The Prebid.js Express Integration Guide is now the UID2 Client-Side Integration Guide for Prebid.js. Updated links are as follows:
These documents were further updated in later revisions. Updated links are as follows:
- [UID2 Integration Overview for Prebid.js](../guides/integration-prebid.md)
- [UID2 Client-Side Integration Guide for Prebid.js](../guides/integration-prebid-client-side.md)
- [UID2 Server-Side Integration Guide for Prebid.js](../guides/integration-prebid-server-side.md)
Expand Down
4 changes: 2 additions & 2 deletions docs/sdks/client-side-identity.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ Related information:
- [Server-Side Integration Guide for JavaScript](../guides/integration-javascript-server-side.md).
- For example applications with associated documentation, see:
- The UID2 Google ESP with SDK v3 example:
- [Code and docs](https://github.com/IABTechLab/uid2-web-integrations/tree/main/examples/google-esp-integration/with_sdk_v3) and [running site](https://esp-jssdk-integ.uidapi.com/).
- The example of JavaScript Express Integration: [Code](https://github.com/IABTechLab/uid2-web-integrations/tree/main/examples/cstg) and [running site](https://cstg-integ.uidapi.com/).
- [Code and docs](https://github.com/IABTechLab/uid2-web-integrations/tree/main/examples/google-esp-integration/with_sdk_v3) and running site: [Client-Side UID2 SDK Integration Example](https://esp-jssdk-integ.uidapi.com/).
- The example of JavaScript client-side integration: [Code](https://github.com/IABTechLab/uid2-web-integrations/tree/main/examples/cstg) and running site ([Client-Side Integration Example, UID2 JavaScript SDK](https://cstg-integ.uidapi.com/)).

## Functionality

Expand Down
56 changes: 0 additions & 56 deletions docs/sdks/uid2-sdk-ref-python.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,62 +235,6 @@ The following instructions provide an example of how you can implement sharing u
print(err)
```

## Usage for Publishers

1. Create an instance of Uid2PublisherClient:

`client = Uid2PublisherClient(UID2_BASE_URL, UID2_API_KEY, UID2_SECRET_KEY)`

2. Call a function that takes the user's email address or phone number as input and generates a `TokenGenerateResponse` object. The following example uses an email address:

`token_generate_response = client.generate_token(TokenGenerateInput.from_email(emailAddress).do_not_generate_tokens_for_opted_out())`

>IMPORTANT: Be sure to call this function only when you have obtained legal basis to convert the user’s [directly identifying information (DII)](../ref-info/glossary-uid.md#gl-dii) to UID2 tokens for targeted advertising.

>`do_not_generate_tokens_for_opted_out()` applies `optout_check=1` in the [POST&nbsp;/token/generate](../endpoints/post-token-generate.md) call. Without this, `optout_check` is omitted to maintain backwards compatibility.

### Standard Integration

If you're using standard integration (client and server) (see [Server-Side Integration Guide for JavaScript](../guides/integration-javascript-server-side.md)), follow this step:

* Send this identity as a JSON string back to the client (to use in the [identity field](../sdks/client-side-identity.md#initopts-object-void)) using the following:

`token_generate_response.get_identity_json_string()`

Note: If the user has opted out, this method returns None, so be sure to handle that case.

### Server-Only Integration

If you're using server-only integration (see [Publisher Integration Guide, Server-Only](../guides/custom-publisher-integration.md)):

1. Store this identity as a JSON string in the user's session, using the `token_generate_response.get_identity_json_string()` function.

If the user has opted out, this method returns `None`, so be sure to handle that case.
2. To retrieve the user's UID2 token, use the following:

```
identity = token_generate_response.get_identity()
if identity:
advertising_token = identity.get_advertising_token()
```
3. Periodically check if the user's UID2 token should be refreshed. This can be done at fixed intervals using a timer, or can be done whenever the user accesses another page:
1. Retrieve the identity JSON string from the user's session, and then call the following function that takes the identity information as input and generates an `IdentityTokens` object:

`identity = IdentityTokens.from_json_string(identityJsonString)`
2. Determine if the identity can be refreshed (that is, the refresh token hasn't expired):

`if not identity or not identity.is_refreshable(): # we must no longer use this identity (for example, remove this identity from the user's session) `
3. Determine if a refresh is needed:

`if identity.is_due_for_refresh()):`
4. If needed, refresh the token and associated values:

`token_refresh_response = client.refresh_token(identity)`

5. Store `token_refresh_response.get_identity_json_string()` in the user's session.

If the user has opted out, this method returns `None`, indicating that the user's identity should be removed from the session. To confirm optout, you can use the `token_refresh_response.is_optout()` function.

## FAQs

For a list of frequently asked questions for DSPs, see [FAQs for DSPs](../getting-started/gs-faqs.md#faqs-for-dsps).
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ SDK の技術的な詳細については、[UID2 SDK for JavaScript Reference Gu
## Sample Implementation Website

アプリケーションの例については、SDK v3 を使用した UID2 Google ESP の例を参照してください:
- コードとドキュメント: [UID2 SDK ESP Integration Example](https://github.com/IABTechLab/uid2-web-integrations/tree/main/examples/google-esp-integration/with_sdk_v3)
- コードとドキュメント: [UID2 SDK Secure Signals Integration Example](https://github.com/IABTechLab/uid2-web-integrations/tree/main/examples/google-secure-signals-integration/with_sdk_v3)
- ランニングサイト: [Client-Side UID2 SDK Integration Example](https://esp-jssdk-integ.uidapi.com/)

## Introduction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ From the table in [Client-Side or Server-Side Integration](#client-side-or-serve

The UID2 SDK for JavaScript includes automated token refresh.

(**GWH_01. The wording below is from the Prebid overview. I see no info re manual refresh in the JS guides so prob this just comes out?... but, checking.**)

**If you prefer to implement manual refresh, see [Refreshing a UID2 Token](integration-prebid-server-side.md#refreshing-a-uid2-token) in the Server-Side Integration Guide.**

## Storing the UID2 Token in the Browser
<!-- GWH check corresponding (not identical) section in integration-prebid.md, integration-prebid-client-side.md, integration-prebid-client-side.md, for consistency -->

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ If you want to integrate using Prebid, here are some additional questions you'll
- If you're using Prebid 8.21.0 or later, you can use the client-side Prebid integration option, which is the simplest and easiest implementation approach.
- If you're using a version prior to 8.21.0 (7.53.0 or later), and can't easily upgrade, you'll choose a server-side option.
- Domain names:
- As part of account setup, if you're using the Prebid client-side option, you'll need to provide a list of your top-level domains.
- Are you already using the UID2 JavaScript SDK to generate and refresh the token? If so, you can continue to use the Prebid server-side implementation. For details, see [UID2 Server-Side Integration Guide for Prebid.js](integration-prebid-server-side.md). -->
- As part of account setup, if you're using the Prebid.js client-side option, you'll need to provide a list of your top-level domains.
- Are you already using the UID2 JavaScript SDK to generate and refresh the token? If so, you can continue to use the Prebid.js server-side implementation. For details, see [UID2 Server-Side Integration Guide for Prebid.js](integration-prebid-server-side.md). -->

<!--
## Advantages: Summary
Expand Down
Loading

0 comments on commit 67dc9a7

Please sign in to comment.