Shopify Session Analytics in a Section

How to display “session analytics” date from Shopify Admin in a custom section on my store?

like number counter section
75000- users
5000 - products

Hi @work_tops

I dont believe that is possible without some middleware fetching the analytics data from the Admin API. Maybe possible with automation tools storing the data as custom data - but probably wouldnt recommend. Sounds heavy and expensive in API costs.

Active products can be collected with something like {{ collections['all'].all_products_count }}, assuming you have a collection containing all products with the all handle.

2 Likes

@curzey is right, Shopify’s storefront Liquid environment does not directly expose real-time analytics (e.g., session analytics, total visitors, unique page views).

You will need a custom (private or public) app that queries analytics data via the Shopify Admin API or a third-party analytics API.

2 Likes