Skip to content

Commit

Permalink
minor copy edits on sample applications
Browse files Browse the repository at this point in the history
  • Loading branch information
genwhittTTD committed Dec 12, 2024
1 parent 85ac2e3 commit 3d1c741
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion examples/cstg/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
<h1>UID2 Publisher Client-Side Integration Example using UID2 JavaScript SDK</h1>
<p>
This example demonstrates how a content publisher can follow the
<a href="https://unifiedid.com/docs/guides/publisher-client-side"
<a href="https://unifiedid.com/docs/guides/integration-javascript-client-side"
>Client-Side Integration Guide for JavaScript
</a>
to implement UID2 integration and generate UID2 tokens.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
</script>
</head>
<body>
<h1>Server-Only UID2 Integration Example</h1>
<h1>Server-Side UID2 Integration Example</h1>
<p class="intro">
This example demonstrates how a content publisher can use the UID2 services to implement the
<a href="https://unifiedid.com/docs/guides/google-ss-integration#server-only-integration"
>Server-Only Integration</a
<a href="https://unifiedid.com/docs/guides/integration-google-ss#server-side-integration"
>Server-Side Integration</a
>. [<a
href="https://github.com/IABTechLab/uid2-web-integrations/tree/main/examples/google-secure-signals-integration/server_only"
>Source Code</a
Expand Down
10 changes: 5 additions & 5 deletions examples/google-secure-signals-integration/with_sdk_v3/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# UID2 SDK Secure Signals Integration Example

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) and the [Client-Side Identity JavaScript SDK](https://unifiedid.com/docs/sdks/client-side-identity) (also known as the UID2 SDK for JavaScript) to share UID2 directly with bidders, in an implementation that uses this SDK.
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) and the [UID2 SDK for JavaScript](https://unifiedid.com/docs/sdks/sdk-ref-javascript) to share UID2 directly with bidders, in an implementation that uses this SDK.

For an example application without using the UID2 SDK, see [Server-Only UID2 Integration Example](../server_only/README.md).

Expand Down Expand Up @@ -69,8 +69,8 @@ The following table outlines and annotates the steps you can take to test and ex
| :--: | :------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1 | In your browser, navigate to the application main page at `http://localhost:3000`. | The displayed main ([index](views/index.html)) page of the example application provides a login form for the user to complete the UID2 login process.</br>IMPORTANT: 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.<br/> 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.<br/> NOTE: The page displays the **Log Out** button as long as the user identity is valid and refreshable. |
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<h1>Server-Side Integration Example, UID2 JavaScript SDK</h1>
<p class="intro">
This example demonstrates how a content publisher can use the UID2 services and the
<a href="https://unifiedid.com/docs/sdks/client-side-identity"
>Client-Side Identity JavaScript SDK</a
<a href="https://unifiedid.com/docs/sdks/sdk-ref-javascript"
>UID2 SDK for JavaScript</a
>
(UID2 SDK) to implement the
to implement the
<a
href="https://unifiedid.com/docs/guides/google-ss-integration#uid2-client-side-javascript-sdk-integration"
href="https://unifiedid.com/docs/guides/integration-google-ss#server-side-integration"
>server-side UID2 integration</a
>. [<a
href="https://github.com/IABTechLab/uid2-web-integrations/tree/main/examples/google-secure-signals-integration/with_sdk_v3"
Expand Down

0 comments on commit 3d1c741

Please sign in to comment.