diff --git a/examples/cstg/html/index.html b/examples/cstg/html/index.html index d248b473..3462f307 100644 --- a/examples/cstg/html/index.html +++ b/examples/cstg/html/index.html @@ -92,7 +92,7 @@

UID2 Publisher Client-Side Integration Example using UID2 JavaScript SDK

This example demonstrates how a content publisher can follow the - Client-Side Integration Guide for JavaScript to implement UID2 integration and generate UID2 tokens. diff --git a/examples/google-secure-signals-integration/server_only/README.md b/examples/google-secure-signals-integration/server_only/README.md index 00cbc48d..9fb1a137 100644 --- a/examples/google-secure-signals-integration/server_only/README.md +++ b/examples/google-secure-signals-integration/server_only/README.md @@ -2,7 +2,7 @@ This example demonstrates how a content publisher who is working with [Google Interactive Media Ads(IMA) SDKs](https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side) can use [Google Secure Signal](https://support.google.com/admanager/answer/10488752) to share UID2 directly with bidders, in a server-only implementation of UID2. -For an example application using the [UID2 SDK for JavaScript](https://unifiedid.com/docs/sdks/client-side-identity), see [Server-Side Integration Example, UID2 JavaScript SDK](../with_sdk_v3/README.md). +For an example application using the [UID2 SDK for JavaScript](https://unifiedid.com/docs/sdks/sdk-ref-javascript), see [Server-Side Integration Example, UID2 JavaScript SDK](../with_sdk_v3/README.md). > NOTE: Although the server side of the example application is implemented in JavaScript using node.js, it is not a requirement. You can use any technology of your choice and refer to the example application for an illustration of the functionality that needs to be implemented. diff --git a/examples/google-secure-signals-integration/server_only/views/header.html b/examples/google-secure-signals-integration/server_only/views/header.html index c7930fe8..793d12fe 100644 --- a/examples/google-secure-signals-integration/server_only/views/header.html +++ b/examples/google-secure-signals-integration/server_only/views/header.html @@ -26,12 +26,11 @@ -

Server-Only UID2 Integration Example

+

Server-Side UID2 Integration Example

- This example below demonstrates how a content publisher can use the UID2 services to implement - the - Server-Only IntegrationServer-Side Integration. [Source CodeIMPORTANT: A real-life application must also display a form for the user to consent to targeted advertising. | | 2 | In the text field at the bottom, enter the email address that you want to use for testing and click **Log In**. | The click calls the Secure Signal [`clearAllCache()`](https://developers.google.com/publisher-tag/reference#googletag.secureSignals.SecureSignalProvidersArray_clearAllCache) function, to clear all cached signals from local storage, and then calls the `/login` endpoint ([server.js](server.js)). The login initiated on the server side then calls the [POST /token/generate](https://unifiedid.com/docs/endpoints/post-token-generate#decrypted-json-response-format) endpoint and processes the received response. | -| | A confirmation message appears with the established UID2 identity information. | The displayed identity information is the `body` property of the [JSON response payload](https://unifiedid.com/docs/endpoints/post-token-generate#decrypted-json-response-format) from the `POST /token/generate` response. It has been passed to the `login` [view](views/login.html) for rendering client-side JavaScript. Next, the identity information is passed to the UID2 SDK [`init()`](https://unifiedid.com/docs/sdks/client-side-identity#initopts-object-void) function. If the identity is valid, the SDK stores it either in local storage or a first-party UID2 cookie (see [UID2 Storage Format](https://unifiedid.com/docs/sdks/client-side-identity#uid2-storage-format) for use on subsequent page loads. | -| 3 | Click the **Back to the main page** link. | On the updated application main page, note the newly populated **UID2 Advertising Token** value and a video player. While the [page view](views/index.html) is loading, [GPT](https://developers.google.com/publisher-tag/reference#googletag) auto-loads the Secure Signal UID2 script which pushes the advertising token to GPT local storage, and the [IMA](https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side) makes an ad request which transmits the encoded signal in the request. The [page view](views/index.html) calls the [init()](https://unifiedid.com/docs/sdks/client-side-identity#initopts-object-void) function again, but this time without passing an explicit identity. Instead, the identity is loaded from the first-party cookie. | +| | A confirmation message appears with the established UID2 identity information. | The displayed identity information is the `body` property of the [JSON response payload](https://unifiedid.com/docs/endpoints/post-token-generate#decrypted-json-response-format) from the `POST /token/generate` response. It has been passed to the `login` [view](views/login.html) for rendering client-side JavaScript. Next, the identity information is passed to the UID2 SDK [`init()`](https://unifiedid.com/docs/sdks/sdk-ref-javascript#initopts-object-void) function. If the identity is valid, the SDK stores it either in local storage or a first-party UID2 cookie (see [UID2 Storage Format](https://unifiedid.com/docs/sdks/sdk-ref-javascript#uid2-storage-format) for use on subsequent page loads. | +| 3 | Click the **Back to the main page** link. | On the updated application main page, note the newly populated **UID2 Advertising Token** value and a video player. While the [page view](views/index.html) is loading, [GPT](https://developers.google.com/publisher-tag/reference#googletag) auto-loads the Secure Signal UID2 script which pushes the advertising token to GPT local storage, and the [IMA](https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side) makes an ad request which transmits the encoded signal in the request. The [page view](views/index.html) calls the [init()](https://unifiedid.com/docs/sdks/sdk-ref-javascript#initopts-object-void) function again, but this time without passing an explicit identity. Instead, the identity is loaded from the first-party cookie. | | 4 | Click **Play**. | This triggers AdsManager to insert the ad returned from the ad request, for display. The ad tag used in this example contains a 10-second pre-roll ad. | -| 5 | Keep the application main page open, or refresh it after a while, and note the UID2 identity state, updated counter, and login information values. | In the background, the UID2 SDK continuously validates whether the advertising token is up to date, and refreshes it automatically when needed. If the refresh succeeds, the user opts out, or the refresh token expires, the callback function is invoked, and the UI elements are updated with the current state of the UID2 identity. For details, see [Workflow Overview](https://unifiedid.com/docs/sdks/client-side-identity#workflow-overview) and [Background Token Auto-Refresh](https://unifiedid.com/docs/sdks/client-side-identity#background-token-auto-refresh). | -| 6 | To exit the application, click **Log Out**. | This calls the UID2 SDK [`disconnect()`](https://unifiedid.com/docs/sdks/client-side-identity#disconnect-void) function, which clears the UID2 session and the first-party cookie and calls the Secure Signal [`clearAllCache()`](https://developers.google.com/publisher-tag/reference#googletag.secureSignals.SecureSignalProvidersArray_clearAllCache) function to clear all cached signals. This call also makes the UID2 SDK [`isLoginRequired()`](https://unifiedid.com/docs/sdks/client-side-identity#isloginrequired-boolean) function return `true`, which presents the user with the login form again.
NOTE: The page displays the **Log Out** button as long as the user identity is valid and refreshable. | +| 5 | Keep the application main page open, or refresh it after a while, and note the UID2 identity state, updated counter, and login information values. | In the background, the UID2 SDK continuously validates whether the advertising token is up to date, and refreshes it automatically when needed. If the refresh succeeds, the user opts out, or the refresh token expires, the callback function is invoked, and the UI elements are updated with the current state of the UID2 identity. For details, see [Workflow Overview](https://unifiedid.com/docs/sdks/sdk-ref-javascript#workflow-overview) and [Background Token Auto-Refresh](https://unifiedid.com/docs/sdks/sdk-ref-javascript#background-token-auto-refresh). | +| 6 | To exit the application, click **Log Out**. | This calls the UID2 SDK [`disconnect()`](https://unifiedid.com/docs/sdks/sdk-ref-javascript#disconnect-void) function, which clears the UID2 session and the first-party cookie and calls the Secure Signal [`clearAllCache()`](https://developers.google.com/publisher-tag/reference#googletag.secureSignals.SecureSignalProvidersArray_clearAllCache) function to clear all cached signals. This call also makes the UID2 SDK [`isLoginRequired()`](https://unifiedid.com/docs/sdks/sdk-ref-javascript#isloginrequired-boolean) function return `true`, which presents the user with the login form again.
NOTE: The page displays the **Log Out** button as long as the user identity is valid and refreshable. | diff --git a/examples/google-secure-signals-integration/with_sdk_v3/views/intro.html b/examples/google-secure-signals-integration/with_sdk_v3/views/intro.html index 595806ea..fa3e4be0 100644 --- a/examples/google-secure-signals-integration/with_sdk_v3/views/intro.html +++ b/examples/google-secure-signals-integration/with_sdk_v3/views/intro.html @@ -1,12 +1,12 @@

Server-Side Integration Example, UID2 JavaScript SDK

This example demonstrates how a content publisher can use the UID2 services and the - Client-Side Identity JavaScript SDKUID2 SDK for JavaScript - (UID2 SDK) to implement the + to implement the server-side UID2 integration. [