matomo-tracker icon indicating copy to clipboard operation
matomo-tracker copied to clipboard

Multiple tracker objects

Open gabrielbenjamim opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. Unable to have two instances of Matomo for the same code base, example, if I have a SPA and a Microfrontend, even though, they are different projects, they share the same URL and bundle, but if both requires different implementation for Matomo, with siteID or even baseURL, it's not possible since the first createInstance conflicts and overwrites the other and there's no way to distinguish posterior calls to trackEvent, trackPageView, pushInstruction and etc.

Describe the solution you'd like Direct references or calls to either "getAsyncTracker" or/and "addTracker", according to Matomo guide for multiple instances/trackers: https://developer.matomo.org/guides/tracking-javascript-guide#customise-one-of-the-tracker-object-instances

gabrielbenjamim avatar May 20 '21 15:05 gabrielbenjamim

Ended up with the exact same behavior.

michael-scheurer avatar Nov 23 '22 09:11 michael-scheurer