You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the old SDK it was possible to disable sending data to Amplitude using middleware. In the current version, it's not possible to disable the default Amplitude destination. For example:
but we would love to skip patching it. Would you be open to somehow disabling programmatically this default destination?
Motivations
We are sending data to Amplitude through Segment because we enhance data with some custom properties that are impossible to access in our frontend code. If we sent it both ways, there would be double the number of events and one without our important custom properties.
The text was updated successfully, but these errors were encountered:
Hi @huv1k, could you try await ampli.load().promise? The default destination is registered on initialization asynchronously. It might be that remove() is executed when the default plugin hasn't been installed yet.
Hi @huv1k, could you try await ampli.load().promise? The default destination is registered on initialization asynchronously. It might be that remove() is executed when the default plugin hasn't been installed yet.
Yes, this works. Thanks it didn't cross my mind that it can be issue 😅 I though it's going to execute faster 🙈
Summary
In the old SDK it was possible to disable sending data to Amplitude using middleware. In the current version, it's not possible to disable the default Amplitude destination. For example:
We are using
@amplitude/analytics-browser
version2.11.11
and SDK generated with@amplitude/ampli
. We could patch it and disable it hereAmplitude-TypeScript/packages/analytics-browser/src/browser-client.ts
Line 120 in ab16340
Motivations
We are sending data to Amplitude through Segment because we enhance data with some custom properties that are impossible to access in our frontend code. If we sent it both ways, there would be double the number of events and one without our important custom properties.
The text was updated successfully, but these errors were encountered: