Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

google-tag-manager add identify properties to dataLayer #693

Open
ls-jacob-lawrence opened this issue Aug 2, 2022 · 0 comments
Open

google-tag-manager add identify properties to dataLayer #693

ls-jacob-lawrence opened this issue Aug 2, 2022 · 0 comments

Comments

@ls-jacob-lawrence
Copy link

Hi,

Currently the Segment identify method does not push any user properties to the GTM data layer. Should it?

in the app code

 window?.analytics?.identify('userId123', {
      account: '12345678',
      contact: '[email protected]',
    });

but when you console.log the window.dataLayer, you only have the page event which is missing the user properties like account and contact

[{
event: "Loaded a Page"
gtm.uniqueEventId: 1
path: "/blah"
referrer: "blah"
search: ""
segmentAnonymousId: "123123123"
title: "blah"
url: "blah"
userId: "userId123"
}]

This means if I want to use the account property as a dataLayer variable in GTM then I need to explicitly call an eventless track on page load with it, or inject it into the dataLayer manually.

Both approaches seem to go against the Segment best practice.

What should the expected behaviour be?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant