From 0384f516a167837ab188953707e835e216ebde00 Mon Sep 17 00:00:00 2001 From: Ashton Huxtable <78318468+ashton-huxtable@users.noreply.github.com> Date: Thu, 28 Mar 2024 13:14:12 -0600 Subject: [PATCH 1/2] Add note about config options for downstream sdks --- .../sources/catalog/libraries/website/javascript/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/connections/sources/catalog/libraries/website/javascript/index.md b/src/connections/sources/catalog/libraries/website/javascript/index.md index 0bfd85ab1f..26e93c2d13 100644 --- a/src/connections/sources/catalog/libraries/website/javascript/index.md +++ b/src/connections/sources/catalog/libraries/website/javascript/index.md @@ -360,11 +360,11 @@ analytics.identify("hello world") ### Ready -The `ready` method allows you to pass in a method that is called once Analytics.js finishes initializing, and once all enabled device-mode destinations load. It's like [jQuery's `ready` method](https://api.jquery.com/ready/){:target="_blank"}, except for Destinations. +The `ready` method allows you to pass in a method that is called once Analytics.js finishes initializing, and once all enabled device-mode destinations load. It's like [jQuery's `ready` method](https://api.jquery.com/ready/){:target="_blank"}, except for Destinations. Because it does not fire until all enabled device-mode destinations are loaded, it cannot be used to change configuration options for downstream SDKs. That can only be done if the SDK is loaded natively. The `ready` method isn't invoked if any Destination throws an error (for example, for an expired API key, incorrect settings configuration, or when a Destination is blocked by the browser) during initialization. -The code in the `ready` function only executes after `ready` is emitted. +The code in the `ready` function only executes after `ready` is emitted. If you want to access end-tool library methods that do not match any Analytics.js methods, like adding an extra setting to Mixpanel, you can use a `ready` callback so that you're guaranteed to have access to the Mixpanel object, like so: From aca156ea7aabd189a364ab66d19c16b54f68640b Mon Sep 17 00:00:00 2001 From: pwseg <86626706+pwseg@users.noreply.github.com> Date: Mon, 24 Jun 2024 10:46:32 -0500 Subject: [PATCH 2/2] minor rewording --- .../sources/catalog/libraries/website/javascript/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connections/sources/catalog/libraries/website/javascript/index.md b/src/connections/sources/catalog/libraries/website/javascript/index.md index 26e93c2d13..0a715574e3 100644 --- a/src/connections/sources/catalog/libraries/website/javascript/index.md +++ b/src/connections/sources/catalog/libraries/website/javascript/index.md @@ -360,7 +360,7 @@ analytics.identify("hello world") ### Ready -The `ready` method allows you to pass in a method that is called once Analytics.js finishes initializing, and once all enabled device-mode destinations load. It's like [jQuery's `ready` method](https://api.jquery.com/ready/){:target="_blank"}, except for Destinations. Because it does not fire until all enabled device-mode destinations are loaded, it cannot be used to change configuration options for downstream SDKs. That can only be done if the SDK is loaded natively. +The `ready` method lets you pass in a method that gets called after Analytics.js finishes initializing and after all enabled device-mode destinations load. It's like [jQuery's `ready` method](https://api.jquery.com/ready/){:target="_blank"}, except for Destinations. Because it doesn't fire until all enabled device-mode destinations are loaded, it can't be used to change configuration options for downstream SDKs. That can only be done if the SDK is loaded natively. The `ready` method isn't invoked if any Destination throws an error (for example, for an expired API key, incorrect settings configuration, or when a Destination is blocked by the browser) during initialization.