How to find date of last customer login date, is it possible?

Hi,

I have looked through the GraphQL schema and can’t find any way to see the last date that a customer logged in to their Shopify account. Does anyone know if Shopify exposes this data? I am sure they have it in the system but I can’t see a way to get to it via any of the APIs. I run a wholesale business via Shopify and all customers are required to log in to place their order so I am interested in tracking who has logged in but not placed an order.

Any suggestions would be much appreciated!

Thanks,

Tim

Hello @tim_gordon

You can check this app https://apps.shopify.com/customer-login-history

Thank you

Hi @tim_gordon ,

The easiest way would be to install an app like https://apps.shopify.com/customer-login-history or https://apps.shopify.com/last-login

The hard way would be to build a private app that can update an api route and write the customer’s login data to metafields or a postgres database. On each successful login you can update a new entry in the table with the date. I wouldn’t recommend this unless the cost for the aforementioned apps is too prohibitive.

I do not know what app framework you’re using but for a fair idea of how to pass data from the store to the backend can be found in this repo and the associated youtube video series.
https://github.com/Hujjat/wishlist-inspire-app

We actually already built an app like you suggest and this works with Classic Accounts but we couldn’t find a way to implement with New Accounts since the templates for New Accounts are currently locked. Do you know if there is a way round this? I will check the apps that others have suggested and see if they support New Accounts, if they do then I guess there must be a way to do this.

1 Like