-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add engagement.init to third-part Analytics provider installation #549
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -51,6 +51,24 @@ amplitude.add(engagementPlugin()); | |||
|
|||
Using the Guides and Surveys standalone SDK with another analytics provider requires extra configuration to help map properties to Amplitude. This initialization code accepts parameters that define the user and any integrations. | |||
|
|||
First, call `init` to initialize the SDK. After calling this function, it will be possible to acccess `window.engagement` and call the SDK functions: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First, call `init` to initialize the SDK. After calling this function, it will be possible to acccess `window.engagement` and call the SDK functions: | |
First, call `init` to initialize the SDK. After calling this function, you can access `window.engagement` and call the SDK functions: |
@@ -51,6 +51,24 @@ amplitude.add(engagementPlugin()); | |||
|
|||
Using the Guides and Surveys standalone SDK with another analytics provider requires extra configuration to help map properties to Amplitude. This initialization code accepts parameters that define the user and any integrations. | |||
|
|||
First, call `init` to initialize the SDK. After calling this function, it will be possible to acccess `window.engagement` and call the SDK functions: | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | ||
| `apiKey` | `string` | Required. API key of the Amplitude project you want to use. | | ||
| `initOptions.serverZone` | `EU` or `US` | Optional. Sets the Amplitude server zone. Set this to EU for Amplitude projects created in EU data center. Default: `US` | | ||
| `initOptions.logger` | [Logger interface](https://github.com/amplitude/Amplitude-TypeScript/blob/main/packages/analytics-types/src/logger.ts#L1-L8) | Optional. Sets a custom loggign provider class. Default: [Amplitude Logger](https://github.com/amplitude/Amplitude-TypeScript/blob/main/packages/analytics-core/src/logger.ts) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| `initOptions.logger` | [Logger interface](https://github.com/amplitude/Amplitude-TypeScript/blob/main/packages/analytics-types/src/logger.ts#L1-L8) | Optional. Sets a custom loggign provider class. Default: [Amplitude Logger](https://github.com/amplitude/Amplitude-TypeScript/blob/main/packages/analytics-core/src/logger.ts) | | |
| `initOptions.logger` | [Logger interface](https://github.com/amplitude/Amplitude-TypeScript/blob/main/packages/analytics-types/src/logger.ts#L1-L8) | Optional. Sets a custom logging provider class. Default: [Amplitude Logger](https://github.com/amplitude/Amplitude-TypeScript/blob/main/packages/analytics-core/src/logger.ts) | |
| `initOptions.logLevel` | `LogLevel.None` or `LogLevel.Error` or `LogLevel.Warn` or `LogLevel.Verbose` or `LogLevel.Debug`. | Optional. Sets the log level. Default: `LogLevel.Warn` | | ||
|
||
|
||
However, Guides and Surveys will not be fully functional until you call `boot`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However, Guides and Surveys will not be fully functional until you call `boot`: | |
However, Guides and Surveys isn't fully functional until you call `boot`: |
Context: https://amplitude.slack.com/archives/C08BLQDFT98/p1739877518424259
If you use Amplitude Analytics, we will call
init
automatically on plugin initialization. If youboot
Guides and Surveys manually, you also need to callinit
manually. Before callinginit
, the boot method will not even be available on the global.