From c535d6ee8eeac56025bdc9a6f239a4e16b64444f Mon Sep 17 00:00:00 2001 From: Ashley Smith Date: Thu, 12 Dec 2024 15:34:21 -0700 Subject: [PATCH 1/8] added isidentityavailable description --- docs/sdks/sdk-ref-javascript-v2.md | 31 ++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/docs/sdks/sdk-ref-javascript-v2.md b/docs/sdks/sdk-ref-javascript-v2.md index 6debd34ec..2bfaae319 100644 --- a/docs/sdks/sdk-ref-javascript-v2.md +++ b/docs/sdks/sdk-ref-javascript-v2.md @@ -9,6 +9,14 @@ import Link from '@docusaurus/Link'; import ExampleUid2Cookie from '/docs/snippets/_example-uid2-cookie.mdx'; import ExampleJavaScriptV2Init from '/docs/snippets/_example-javascript-v2-init.mdx'; +export const New3100 = () => ( + New in version 3.10.0 +); + +export const Deprecated3100 = () => ( + Deprecated in version 3.10.0 +); + # SDK for JavaScript Reference Guide (2.x and earlier versions) :::tip @@ -120,6 +128,7 @@ All interactions with the Client-Side JavaScript SDK are done through the global - [getAdvertisingToken()](#getadvertisingtoken-string) - [getAdvertisingTokenAsync()](#getadvertisingtokenasync-promise) - [isLoginRequired()](#isloginrequired-boolean) +- [isIdentityAvailable()](#isidentityavailable-boolean) - [disconnect()](#disconnect-void) - [abort()](#abort-void) @@ -288,8 +297,24 @@ This function can also provide additional context for handling missing identitie | :--- | :--- | | `true` | The identity is not available. This value indicates any of the following:
- The user has opted out.
- The refresh token has expired.
- A first-party cookie is not available and no server-generated identity has been supplied. | | `false` | This value indicates one of the following:
- The identity is present and valid.
- The identity has expired, and the token was not refreshed due to an intermittent error. The identity might be restored after a successful auto-refresh attempt. | -| `undefined` | The SDK initialization is not yet complete. | +### isIdentityAvailable(): boolean + +Specifies whether an identity is available. An identity can be available if there is an identity in local storage or a cookie that is not expired, or if there is an active request. + +If false, a UID2 [POST /token/generate](../endpoints/post-token-generate.md) call is required. + +```html + +``` +#### Return Values + +| Value | Description | +| :--- | :--- | +| `true` | This value indicates one of the following:
- The identity is present and valid in a first-party cookie or local storage.
- The identity has expired, and the token was not refreshed due to an intermittent error. The identity might be restored after a successful auto-refresh attempt. | +| `false` | This value indicates any of the following:
- The user has opted out.
- The identity is present, but the refresh token has expired.
- A first-party cookie is not available and no server-generated identity has been supplied. | ### disconnect(): void @@ -305,7 +330,9 @@ When a user logs out of the publisher's site, make the following call: After this function is executed, the [getAdvertisingToken()](#getadvertisingtoken-string) function returns `undefined` and the [isLoginRequired()](#isloginrequired-boolean) function returns `true`. -### abort(): void +### abort(): void + +This function is deprecated and will be removed altogether in June of 2025. Use [disconnect()](#disconnect-void) instead as it performs the same logic as `abort()` plus a more thorough disconnection. Terminates any background timers or requests. The UID2 object remains in an unspecified state and cannot be used anymore. From 3568dd0a641e8d6b05392e60012d81c6160cc4f6 Mon Sep 17 00:00:00 2001 From: Ashley Smith Date: Thu, 12 Dec 2024 15:38:28 -0700 Subject: [PATCH 2/8] grammar fix --- docs/sdks/sdk-ref-javascript-v2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sdks/sdk-ref-javascript-v2.md b/docs/sdks/sdk-ref-javascript-v2.md index 2bfaae319..1706cdbcd 100644 --- a/docs/sdks/sdk-ref-javascript-v2.md +++ b/docs/sdks/sdk-ref-javascript-v2.md @@ -300,7 +300,7 @@ This function can also provide additional context for handling missing identitie ### isIdentityAvailable(): boolean -Specifies whether an identity is available. An identity can be available if there is an identity in local storage or a cookie that is not expired, or if there is an active request. +Specifies whether an identity is available. An identity can be available if there is an identity, in local storage or a cookie, that is not expired, or if there is an active request. If false, a UID2 [POST /token/generate](../endpoints/post-token-generate.md) call is required. From d625fcea05caff9a6dbb62842e595201c8c02daa Mon Sep 17 00:00:00 2001 From: Ashley Smith Date: Thu, 12 Dec 2024 16:55:44 -0700 Subject: [PATCH 3/8] moved docs over --- docs/sdks/sdk-ref-javascript-v2.md | 31 +--------------------------- docs/sdks/sdk-ref-javascript.md | 33 ++++++++++++++++++++++++++++-- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/docs/sdks/sdk-ref-javascript-v2.md b/docs/sdks/sdk-ref-javascript-v2.md index 1706cdbcd..2f4b8c811 100644 --- a/docs/sdks/sdk-ref-javascript-v2.md +++ b/docs/sdks/sdk-ref-javascript-v2.md @@ -9,14 +9,6 @@ import Link from '@docusaurus/Link'; import ExampleUid2Cookie from '/docs/snippets/_example-uid2-cookie.mdx'; import ExampleJavaScriptV2Init from '/docs/snippets/_example-javascript-v2-init.mdx'; -export const New3100 = () => ( - New in version 3.10.0 -); - -export const Deprecated3100 = () => ( - Deprecated in version 3.10.0 -); - # SDK for JavaScript Reference Guide (2.x and earlier versions) :::tip @@ -128,7 +120,6 @@ All interactions with the Client-Side JavaScript SDK are done through the global - [getAdvertisingToken()](#getadvertisingtoken-string) - [getAdvertisingTokenAsync()](#getadvertisingtokenasync-promise) - [isLoginRequired()](#isloginrequired-boolean) -- [isIdentityAvailable()](#isidentityavailable-boolean) - [disconnect()](#disconnect-void) - [abort()](#abort-void) @@ -298,24 +289,6 @@ This function can also provide additional context for handling missing identitie | `true` | The identity is not available. This value indicates any of the following:
- The user has opted out.
- The refresh token has expired.
- A first-party cookie is not available and no server-generated identity has been supplied. | | `false` | This value indicates one of the following:
- The identity is present and valid.
- The identity has expired, and the token was not refreshed due to an intermittent error. The identity might be restored after a successful auto-refresh attempt. | -### isIdentityAvailable(): boolean - -Specifies whether an identity is available. An identity can be available if there is an identity, in local storage or a cookie, that is not expired, or if there is an active request. - -If false, a UID2 [POST /token/generate](../endpoints/post-token-generate.md) call is required. - -```html - -``` -#### Return Values - -| Value | Description | -| :--- | :--- | -| `true` | This value indicates one of the following:
- The identity is present and valid in a first-party cookie or local storage.
- The identity has expired, and the token was not refreshed due to an intermittent error. The identity might be restored after a successful auto-refresh attempt. | -| `false` | This value indicates any of the following:
- The user has opted out.
- The identity is present, but the refresh token has expired.
- A first-party cookie is not available and no server-generated identity has been supplied. | - ### disconnect(): void Clears the UID2 identity from the [first-party cookie](#uid2-cookie-format). This closes the client's identity session and disconnects the client lifecycle. @@ -330,10 +303,8 @@ When a user logs out of the publisher's site, make the following call: After this function is executed, the [getAdvertisingToken()](#getadvertisingtoken-string) function returns `undefined` and the [isLoginRequired()](#isloginrequired-boolean) function returns `true`. -### abort(): void +### abort(): void -This function is deprecated and will be removed altogether in June of 2025. Use [disconnect()](#disconnect-void) instead as it performs the same logic as `abort()` plus a more thorough disconnection. - Terminates any background timers or requests. The UID2 object remains in an unspecified state and cannot be used anymore. This function is intended for use in advanced scenarios where you might want to replace the existing UID2 object with a new instance. For example, a single-page application could use this to clear the current UID2 object and construct or initialize a new one after receiving a new identity from the server in the [POST /token/generate](../endpoints/post-token-generate.md) response. diff --git a/docs/sdks/sdk-ref-javascript.md b/docs/sdks/sdk-ref-javascript.md index 3e3426780..5a7f9e5ff 100644 --- a/docs/sdks/sdk-ref-javascript.md +++ b/docs/sdks/sdk-ref-javascript.md @@ -15,6 +15,14 @@ export const New = () => ( NEW IN V3 ); +export const New3100 = () => ( + New in version 3.10.0 +); + +export const Deprecated3100 = () => ( + Deprecated in version 3.10.0 +); + # SDK for JavaScript Reference Guide Use this SDK to facilitate the process of generating or establishing client identity using UID2, retrieving advertising tokens for bidstream use, and automatically refreshing UID2 tokens. @@ -261,8 +269,9 @@ All interactions with the SDK for JavaScript are done through the global `__uid2 - [getAdvertisingToken()](#getadvertisingtoken-string) - [getAdvertisingTokenAsync()](#getadvertisingtokenasync-promise) - [isLoginRequired()](#isloginrequired-boolean) +- [isIdentityAvailable()](#isidentityavailable-boolean) - [disconnect()](#disconnect-void) -- [abort()](#abort-void) +- [abort()](#abort-void) - [callbacks](#callbacks) - [setIdentity()](#setidentityidentity-identity-void) - [getIdentity()](#getidentity-identity--null) @@ -424,6 +433,24 @@ Specifies whether a UID2 [POST /token/generate](../endpoints/post-token-gen | `false` | This value indicates one of the following:
  • The identity is present and valid.
  • The identity has expired (but the refresh token has not expired), and the token was not refreshed due to an intermittent error. The identity might be restored after a successful auto-refresh attempt.
| | `undefined` | The SDK initialization is not yet complete. | +### isIdentityAvailable(): boolean + +Specifies whether an identity is available. An identity can be available if there is an identity, in local storage or a cookie, that is not expired, or if there is an active request. + +If false, a UID2 [POST /token/generate](../endpoints/post-token-generate.md) call is required. + +```html + +``` +#### Return Values + +| Value | Description | +| :--- | :--- | +| `true` | This value indicates one of the following:
- The identity is present and valid in a first-party cookie or local storage.
- The identity has expired, and the token was not refreshed due to an intermittent error. The identity might be restored after a successful auto-refresh attempt. | +| `false` | This value indicates any of the following:
- The user has opted out.
- The identity is present, but the refresh token has expired.
- A first-party cookie is not available and no server-generated identity has been supplied. | + ### disconnect(): void Clears the UID2 identity from the first-party cookie and local storage (see [UID2 Storage Format](#uid2-storage-format)). This closes the client's identity session and disconnects the client lifecycle. @@ -442,7 +469,9 @@ After this function is executed, the [getAdvertisingToken()](#getadvertisingtoke If you need to provide a `cookieDomain` or `cookiePath` for the SDK to access the correct cookie, and `init` has not been completed, the SDK cannot clear the cookie. In this case, no error is raised. ::: -### abort(): void +### abort(): void + +This function is deprecated and will be removed altogether in June of 2025. Use [disconnect()](#disconnect-void) instead as it performs the same logic as `abort()` plus a more thorough disconnection. Terminates any background timers or requests. The UID2 object remains in an unspecified state and cannot be used anymore. From 073f1495fa64313f57d679bba26a411d04564645 Mon Sep 17 00:00:00 2001 From: Ashley Smith Date: Thu, 12 Dec 2024 17:00:10 -0700 Subject: [PATCH 4/8] wording changes --- docs/sdks/sdk-ref-javascript.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/sdks/sdk-ref-javascript.md b/docs/sdks/sdk-ref-javascript.md index 5a7f9e5ff..20303cbfe 100644 --- a/docs/sdks/sdk-ref-javascript.md +++ b/docs/sdks/sdk-ref-javascript.md @@ -435,7 +435,7 @@ Specifies whether a UID2 [POST /token/generate](../endpoints/post-token-gen ### isIdentityAvailable(): boolean -Specifies whether an identity is available. An identity can be available if there is an identity, in local storage or a cookie, that is not expired, or if there is an active request. +Determines whether an identity is available: for example, if there is an unexpired identity in local storage or a cookie, or an existing active request. If false, a UID2 [POST /token/generate](../endpoints/post-token-generate.md) call is required. @@ -471,7 +471,7 @@ If you need to provide a `cookieDomain` or `cookiePath` for the SDK to access th ### abort(): void -This function is deprecated and will be removed altogether in June of 2025. Use [disconnect()](#disconnect-void) instead as it performs the same logic as `abort()` plus a more thorough disconnection. +This function is deprecated and support will be removed completely in June of 2025. Instead, use [disconnect()](#disconnect-void) which has the same functionality as `abort()` and also includes more thorough disconnection steps. Terminates any background timers or requests. The UID2 object remains in an unspecified state and cannot be used anymore. From 87f856412fe6d0ab9b71897049dded219f4f1fd0 Mon Sep 17 00:00:00 2001 From: Ashley Smith Date: Thu, 12 Dec 2024 17:15:24 -0700 Subject: [PATCH 5/8] docs changes --- docs/sdks/sdk-ref-javascript-v2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sdks/sdk-ref-javascript-v2.md b/docs/sdks/sdk-ref-javascript-v2.md index 2f4b8c811..657217577 100644 --- a/docs/sdks/sdk-ref-javascript-v2.md +++ b/docs/sdks/sdk-ref-javascript-v2.md @@ -288,6 +288,7 @@ This function can also provide additional context for handling missing identitie | :--- | :--- | | `true` | The identity is not available. This value indicates any of the following:
- The user has opted out.
- The refresh token has expired.
- A first-party cookie is not available and no server-generated identity has been supplied. | | `false` | This value indicates one of the following:
- The identity is present and valid.
- The identity has expired, and the token was not refreshed due to an intermittent error. The identity might be restored after a successful auto-refresh attempt. | +| `undefined` | The SDK initialization is not yet complete. | ### disconnect(): void @@ -304,7 +305,6 @@ When a user logs out of the publisher's site, make the following call: After this function is executed, the [getAdvertisingToken()](#getadvertisingtoken-string) function returns `undefined` and the [isLoginRequired()](#isloginrequired-boolean) function returns `true`. ### abort(): void - Terminates any background timers or requests. The UID2 object remains in an unspecified state and cannot be used anymore. This function is intended for use in advanced scenarios where you might want to replace the existing UID2 object with a new instance. For example, a single-page application could use this to clear the current UID2 object and construct or initialize a new one after receiving a new identity from the server in the [POST /token/generate](../endpoints/post-token-generate.md) response. From 787e080a1db31e4f40070f2934449bb4bd257aa0 Mon Sep 17 00:00:00 2001 From: Ashley Smith Date: Thu, 12 Dec 2024 17:19:44 -0700 Subject: [PATCH 6/8] revert v2 version --- docs/sdks/sdk-ref-javascript-v2.md | 6 ++++-- docs/sdks/sdk-ref-javascript.md | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/sdks/sdk-ref-javascript-v2.md b/docs/sdks/sdk-ref-javascript-v2.md index 657217577..ebf44a3c3 100644 --- a/docs/sdks/sdk-ref-javascript-v2.md +++ b/docs/sdks/sdk-ref-javascript-v2.md @@ -290,6 +290,7 @@ This function can also provide additional context for handling missing identitie | `false` | This value indicates one of the following:
- The identity is present and valid.
- The identity has expired, and the token was not refreshed due to an intermittent error. The identity might be restored after a successful auto-refresh attempt. | | `undefined` | The SDK initialization is not yet complete. | + ### disconnect(): void Clears the UID2 identity from the [first-party cookie](#uid2-cookie-format). This closes the client's identity session and disconnects the client lifecycle. @@ -304,7 +305,8 @@ When a user logs out of the publisher's site, make the following call: After this function is executed, the [getAdvertisingToken()](#getadvertisingtoken-string) function returns `undefined` and the [isLoginRequired()](#isloginrequired-boolean) function returns `true`. -### abort(): void +### abort(): void + Terminates any background timers or requests. The UID2 object remains in an unspecified state and cannot be used anymore. This function is intended for use in advanced scenarios where you might want to replace the existing UID2 object with a new instance. For example, a single-page application could use this to clear the current UID2 object and construct or initialize a new one after receiving a new identity from the server in the [POST /token/generate](../endpoints/post-token-generate.md) response. @@ -334,4 +336,4 @@ The following is an example of the UID2 cookie structure: :::important The contents of the `private` object are explicitly unspecified and are left for the SDK to interpret. Do not make any assumptions about the structure, semantics, or compatibility of this object. Any updates to the cookie must retain its structure. -::: +::: \ No newline at end of file diff --git a/docs/sdks/sdk-ref-javascript.md b/docs/sdks/sdk-ref-javascript.md index 20303cbfe..045378808 100644 --- a/docs/sdks/sdk-ref-javascript.md +++ b/docs/sdks/sdk-ref-javascript.md @@ -431,7 +431,6 @@ Specifies whether a UID2 [POST /token/generate](../endpoints/post-token-gen | :--- | :--- | | `true` | The identity is not available. This value indicates any of the following:
  • The user has opted out.
  • The refresh token has expired.
  • A first-party cookie is not available and no server-generated identity has been supplied.
| | `false` | This value indicates one of the following:
  • The identity is present and valid.
  • The identity has expired (but the refresh token has not expired), and the token was not refreshed due to an intermittent error. The identity might be restored after a successful auto-refresh attempt.
| -| `undefined` | The SDK initialization is not yet complete. | ### isIdentityAvailable(): boolean From 56ba24ced242442ff56ff23dc54072e0ab76e171 Mon Sep 17 00:00:00 2001 From: Ashley Smith Date: Thu, 12 Dec 2024 17:29:11 -0700 Subject: [PATCH 7/8] list to bullet points --- docs/sdks/sdk-ref-javascript.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/sdks/sdk-ref-javascript.md b/docs/sdks/sdk-ref-javascript.md index 045378808..c20af54ec 100644 --- a/docs/sdks/sdk-ref-javascript.md +++ b/docs/sdks/sdk-ref-javascript.md @@ -434,7 +434,7 @@ Specifies whether a UID2 [POST /token/generate](../endpoints/post-token-gen ### isIdentityAvailable(): boolean -Determines whether an identity is available: for example, if there is an unexpired identity in local storage or a cookie, or an existing active request. +Determines whether an identity is available: for example, if there is an unexpired identity in local storage or in a cookie, or if an identity has already been requested. If false, a UID2 [POST /token/generate](../endpoints/post-token-generate.md) call is required. @@ -447,8 +447,8 @@ If false, a UID2 [POST /token/generate](../endpoints/post-token-generate.md | Value | Description | | :--- | :--- | -| `true` | This value indicates one of the following:
- The identity is present and valid in a first-party cookie or local storage.
- The identity has expired, and the token was not refreshed due to an intermittent error. The identity might be restored after a successful auto-refresh attempt. | -| `false` | This value indicates any of the following:
- The user has opted out.
- The identity is present, but the refresh token has expired.
- A first-party cookie is not available and no server-generated identity has been supplied. | +| `true` | This value indicates one of the following:
  • The identity is present and valid in a first-party cookie or local storage.
  • The identity has expired, and the token was not refreshed due to an intermittent error. The identity might be restored after a successful auto-refresh attempt.
| +| `false` | This value indicates any of the following:
  • The user has opted out.
  • The identity is present, but the refresh token has expired.
  • The identity has expired, even if the refresh token is still valid.
  • A first-party cookie is not available and no server-generated identity has been supplied.
| ### disconnect(): void @@ -470,7 +470,7 @@ If you need to provide a `cookieDomain` or `cookiePath` for the SDK to access th ### abort(): void -This function is deprecated and support will be removed completely in June of 2025. Instead, use [disconnect()](#disconnect-void) which has the same functionality as `abort()` and also includes more thorough disconnection steps. +This function is deprecated and support will be removed completely in June of 2025. Instead, use [disconnect()](#disconnect-void) which has the same functionality as `abort()`, but also includes more thorough disconnection logic. Terminates any background timers or requests. The UID2 object remains in an unspecified state and cannot be used anymore. From b179d4d5551549f0bf2f92df413ed635cff5e250 Mon Sep 17 00:00:00 2001 From: genwhittTTD Date: Fri, 13 Dec 2024 12:44:56 -0500 Subject: [PATCH 8/8] refresh from main + fix links on 2 headings --- docs/sdks/sdk-ref-javascript.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/sdks/sdk-ref-javascript.md b/docs/sdks/sdk-ref-javascript.md index c20af54ec..e74d5e09d 100644 --- a/docs/sdks/sdk-ref-javascript.md +++ b/docs/sdks/sdk-ref-javascript.md @@ -432,7 +432,9 @@ Specifies whether a UID2 [POST /token/generate](../endpoints/post-token-gen | `true` | The identity is not available. This value indicates any of the following:
  • The user has opted out.
  • The refresh token has expired.
  • A first-party cookie is not available and no server-generated identity has been supplied.
| | `false` | This value indicates one of the following:
  • The identity is present and valid.
  • The identity has expired (but the refresh token has not expired), and the token was not refreshed due to an intermittent error. The identity might be restored after a successful auto-refresh attempt.
| -### isIdentityAvailable(): boolean +### isIdentityAvailable(): boolean + + Determines whether an identity is available: for example, if there is an unexpired identity in local storage or in a cookie, or if an identity has already been requested. @@ -468,7 +470,9 @@ After this function is executed, the [getAdvertisingToken()](#getadvertisingtoke If you need to provide a `cookieDomain` or `cookiePath` for the SDK to access the correct cookie, and `init` has not been completed, the SDK cannot clear the cookie. In this case, no error is raised. ::: -### abort(): void +### abort(): void + + This function is deprecated and support will be removed completely in June of 2025. Instead, use [disconnect()](#disconnect-void) which has the same functionality as `abort()`, but also includes more thorough disconnection logic.