Detecting login and registration after Customer Account API OAuth for GTM tracking

In our Hydrogen storefront on the new Customer Account API, sign-in and sign-up both happen on Shopify’s hosted pages. The OAuth callback doesn’t tell us whether the customer just registered or logged in, so we can’t fire separate login and registration events to GTM. We want to avoid client side redirect as it is not the best for user experience. Is there a supported way to tell sign-up or sign-in after OAuth in the new Shopify accounts area or is something like this planned?

2 Likes