-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: migrate to new amplitude node sdk (#1322)
<!-- For Coveo Employees only. Fill this section. CDX-1472 --> ## Proposed changes Tldr; https://www.docs.developers.amplitude.com/data/sdks/typescript-node/migration/ Also refactor dup code between core and commons, removed duplicate from core and make it point to commons ## Breaking changes `@coveo/cli-commons` some function sig changed, flagged as such in appropriate commits, will rebase merge. ## Testing - [x] Unit Tests
- Loading branch information
1 parent
bc067ff
commit c2a59ff
Showing
13 changed files
with
78 additions
and
627 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,7 @@ | ||
import {init, NodeClient} from '@amplitude/node'; | ||
import {init} from '@amplitude/analytics-node'; | ||
export {flush, track} from '@amplitude/analytics-node'; | ||
|
||
const analyticsAPIKey = 'af28cba7acfd392c324bebd399e2d9ea'; | ||
|
||
export interface AmplitudeClient extends NodeClient { | ||
identified: boolean; | ||
} | ||
|
||
// TODO: CDX-667: support proxy | ||
export const amplitudeClient = init(analyticsAPIKey); | ||
|
||
export const flush = async () => { | ||
await amplitudeClient.flush(); | ||
}; | ||
init(analyticsAPIKey); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.