Hi, I have installed matomo for a high traffic website and also am using only the matomo tag manager code in my website. I followed https://peertube.floss-marketing-school.com/videos/watch/2e9c81d5-3f4b-4cdf-9959-34d52863b1d6 in setting up the user id. I have created a data layer as uid and associated with the custom variable. In my site, i’ll be getting a id for each unique user in the body tag.I dont have login/logout functionality.So i am tracking users based on this id.
<script>
var _mtm = _mtm || [];
windows._mtm.push({'uid':'1000' });
</script>
Here 1000 is the id for a unique user.If another user comes, another new id will be generated.If the user returns, already generated id for that user will be used. So, I have added this 4 lines of code in the body part of all pages. But the user id is getting mapped only for 50% of the users.
Is there any other way to do this? Thanks in advance
1 post - 1 participant