Hi,
I'm using Module Federation with Angular. In the host application, I initialize Amplitude using a single API key. However, I have several other applications that also utilize the same instance of Amplitude.
Is it possible to set a global property, such as appName
, so that all events coming from the different applications have this identifier? This would help in grouping those events or creating charts for unique apps. Alternatively, do I need to manage multiple instances and use multiple API keys to achieve this distinction?
I know I can add appName
to each track event but I would like to avoid that approach:
amplitude.track(eventName, {
appName: 'testApp',
});
amplitude.track(eventName, {
appName: 'testApp1',
});
amplitude.track(eventName, {
appName: 'testApp2',
});
etc...