-
Notifications
You must be signed in to change notification settings - Fork 63
how to setUserid from user?? #106
Comments
@ramHruday I'm not sure what you want to do... Could you explain in detail / give an example what do you want to accomplish? |
_paq.push(['setUserId', 'USER_ID_HERE']); i actually want to set the userid..after he logs in my application thanks for immediate response |
@ramaHruday Unfortunately it's still too insufficient info... Which package are you using (react or js?) I strongly suggest you take a look at the documentation on how to track events and page views, as we use different methods to call them (unlike your example with
Hope this helps |
@ramaHruday Is this issue still relevant? Otherwise will close it. |
Can this be reopened? I'm looking for this too. More info can be found on matomo's homepage: https://developer.matomo.org/guides/tracking-javascript-guide#user-id |
@chriggi @ramaHruday This is fixed in version v0.1.5 |
@chrisvanmook unfortunately it's not fixed yet. While you can set a userId on initialization, I can't set it programmatically (via PS: can this issue be reopened for others to see? I saw someone else opened a similar issue which was closed because of insufficient description. |
@chriggi thanks for the clear explanation. I think this is something to take into account when working on issue #176 |
This would be very nice to have :) |
This should now be possible on const tracker = new MatomoTracker({ ... })
tracker.pushInstruction('setUserId', 'USER_ID_HERE') |
@jonkoops, since the fix for this issue is on the |
@lgp171188 We just released |
@jonkoops, this is great news! Thanks for acting and responding very quickly! 👍🏼 |
(this issue is probably not the right place to ask this question, but can't find a better place) @jonkoops, the usage instructions that you have shared are not clear about how one could use the const instance = React.useContext(MatomoContext); to get the already created instance? If yes, I'd like to submit a documentation PR mentioning this. If not, would it be okay to expose the |
@lgp171188 Yeah, I am not happy with how the React context works here. We're thinking about changing this API in the future. I've created #242 to export the method in the |
@jonkoops, thanks for the very quick response and creating+merging #242. I have created a documentation PR #243 mentioning the functions exposed by the Since this is a monorepo with both the JS and React versions of the library, there is no easy way to install the master branch and hence it will be great if you can tag a new release once all the changes planned for that release are merged and ready. Thanks again! 🙂 |
Thanks @lgp171188, it's much appreciated. If you want to use that package locally I would recommend building the project locally, buidling it and use Regardless of this we will publish a new version that includes this fix soon. |
I need to set User on logging in, how can't achieve that..
Any examples
The text was updated successfully, but these errors were encountered: