Description
@benjackwhite Sure, there are basically two issues here:
I have two instances of Posthog reporting to the same project. One is using all bells and whistles and is capturing only once user gives their consent. It reports heatmaps, autocapture, recordings, etc. The second instance is for manually capturing anonymous actions - with a shared distinct_id. They're separate, so that non-anonymous tracking doesn't leach out by accident to the anonymous actions.
When the two toolbars show up, one of them displays a big warning that it doesn't work because decide is disabled. It does display data though, but only because it's being capture by the second instance. As toolbar stores it's preferences on a single localStorage key, touching any of the toolbars will overwrite the other one. They're simply not very compatible with multiple instances.
As for solutions...
For 1) - it's very specific to my use-case. This PR, while fixing nr 2, solves my main issue. I could also refactor it to just accept an option, like disable_toolbar.
For 2) - now as I'm thinking of it, the warning probably is too excessive and it lead me to believe it won't work without decide. Debugging or creating actions do make a lot of sense even without it.
So I'd propose to add the disable_toolbar option, or add the projectId to the toolbar storage key, ensuring at the same time, that there's only one toolbar active per projectId. The second is probably more sound, but the first I believe would be much efficient to implement.
Sounds like we need to fix the clashing localstorage keys or something, rather than adding more config options. I want to be sure that will solve it so just need a few more details on how to reproduce.
- Screenshot of the error message
- How the two instances are configured