-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changing the matomo tracker's siteID dynamic #316
Comments
Hi @Ovid-iu and thanks for opening this question. No, that's not a known issue and there is no immediate reason that comes to my head why that could happen. Can you try to reproduce this in an empty / example project? |
Hey @brototyp , As a side note, I wrote that the fact that I do not see the events tracked anymore - I didn't actually check to see if the events were tracked on the site, but the logs were not showing anymore after changing the siteID. |
First of all, I am sorry, there is no issue when changing the site id, I simply forgot to setup the logger again for the new instance, and this was the reason why I was not seeing the logs anymore - again I apologise. Secondly, I have found another issue, when setting up the same instance with a new siteId, the timer from the first setup used to dispatch events from the queue remains, so I keep seeing the following message: MatomoTracker [I] No need to dispatch. Dispatch queue is empty. Steps to reproduce:
By doing so, the logs will show: MatomoTracker [I] No need to dispatch. Dispatch queue is empty multiple times - more than it should. Based on the 30 seconds rule used to dispatch events, I could verify the fact that for each instance, the log was displaying as expected. I tried making the instance nil, but this was of no effect. Is there a way to clear the previous timer/queue? |
Hey @Ovid-iu, thanks for getting back on that and reporting the other issue. I have the suspicion, there is a retain cycle and the dispatcher is kept. I'll have a look at it, but it might take a little. Feel free to investigate yourself 😊 |
@brototyp Seems about right, when can this be released into a new version? |
This was just released in version 7.2.0. |
Hello,
I am trying to implement matomo for a particular scenario, but I am unable to make it work.
I am setting up the matomo tracker with a siteID when the app launches, but after that, I would like to allow the user to change the siteID.
If I make the matomo tracker nil, then redo the setup with the same URL but a different siteID, past this point I do not see the events tracked anymore.
Is this a known issue?
The text was updated successfully, but these errors were encountered: