Question

Tracking multiple applications on one instance (API-KEY)

  • 11 August 2023
  • 0 replies
  • 141 views

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...

 


0 replies

Be the first to reply!

Reply