How can I push user data to GTM after sign in?

Hi, I’m trying to send user data to GTM when the user signs in.
However, GTM receives the sign in event but not the user data.

Here’s my sign in workflow.

And here is what GTM gets.
image

Seems like the push event is triggered right after the click instead of waiting for the sign in to complete. Is there a way to wait until the user data come in before pushing the event?

Thanks.

Hi @cteerakit :wave:

I think if you open the debugger, you will see that the user is not signed in at that time and that’s why the values are undefined.

Since you are using the sign in with the OAuth Provider, you’ll first need to redirect to a login with provider page.

You could trigger a `signin-start- GTM event here but if you want the user information, you’ll need to push a GTM event after the user has been created and is signed in.

Does that help?

Hi @Joyce,

Thanks for the reply. However, I don’t quite understand.

Since you are using the sign in with the OAuth Provider, you’ll first need to redirect to a login with provider page. You could trigger a `signin-start- GTM event here

Yes, this workflow triggers when clicking the sign-in with Google button on a separate login page. Is that what you mean?

…but if you want the user information, you’ll need to push a GTM event after the user has been created and is signed in.

This is exactly what I was trying to achieve. I thought the workflow would only proceed if the previous step runs successfully, in this case, “Sign In | OAuth Provider”. That doesn’t seem to be the case. Please advise. :pray: