How to replace Analytics User ID with Only customers Shopify User ID

Highlighted
New Member
1 0 0
Good Morning,

We have created a dataLayer to send a login event and User Id information, each time a user successfully registers in our database. To do this, we have installed the code shown below in shopify online store - preferences:

dataLayer.push ({
'event': 'login',
'userid ’:' [User id] '
})

Now, in this code, this [User id] must be replaced by the true User ID in the Database when someone logs in, that is, the one that Shopify generates automatically, in our case it is 349600XXXXXXX and so on. 
Therefore, we need that the Id assigned to each user through Shopify to be collected by the dataLayer and sent to Google Analytics.

We hereby request that you please manage what is requested as soon as possible to proceed with the launch of our store.

Sincerely,

 

0 Likes