How to set user id in tag manager code

Hi, I am using only matomo tag manager code and i have used

_mtm.push(['setUserId', 'some number']); to set user id and it is not being set. Do anyhave have solution for this?

Duplicate of