User id is not being set in tag manager code

I am using only tag manager code and not the tracking code in my website. I have to set visitor id for each visitor. I added _mtm.push(['setUserId', 'some number']); in tag manager code and still the visitor id is not being set

I don’t really use Tag Manager, but maybe @RonanChardonneau has an idea.

Can you expand on how you “added _mtm.push(['setUserId', 'some number']); in tag manager code”?

Hi there,
Well if you go this way you then need to create a datalayer variable within MTM backend in order to grab it and then make it available within the matomo configuration variable.

There you go

I cannot do more :slight_smile:

Thanks for your response.Its working. :grinning:

1 Like