How to Track Login and Customer creation events

Topic summary

  • Objective: Track customer login and account creation in a Shopify theme using Mixpanel.

  • Recommendation: Combine the Mixpanel API to record analytics events with Shopify webhooks (server-to-server event notifications).

    • Subscribe to customers/create to capture account creation and send an event to Mixpanel.
    • No known webhook exists for customer login; an alternative approach was not provided.
    • Correlate the browser session and the webhook payload by sharing the customer ID across both contexts.
  • Status: Partial solution (account creation) identified; login tracking remains unresolved. No final decision or code shared; next steps are implementation and exploring a workaround for login events.

Summarized with AI on January 13. AI used: gpt-5.

How can we track Login and customer creation events in shopify liquid?.
We have enabled mixpanel tracking system in our theme, there we need to track the login and customer creation events.

You can likely use the Mixpanel API, combined with Shopify webhooks.

For example, you can subscribe to customers/create and log events.

However, you’ll need a way to share the customer’s ID between the on-page session and the webhook.

Also, I’m not aware of a “customer login” webhook topic you can subscribe to.

But hopefully this information gets you started in the right direction.