Accessing Session Data via Latest Shopify GraphQL API

Topic summary

A developer seeks to programmatically retrieve session analytics data from Shopify’s GraphQL API to automate reporting. They currently manually download reports containing metrics like sessions, online store visitors, UTM parameters (source, medium), and referrer sources.

The user includes a screenshot showing their current ShopifyQL query used for generating these reports. Their goal is to eliminate manual report downloads by accessing this session-level data directly through the API.

The question remains unanswered: whether GraphQL supports querying these specific session metrics, or if an alternative programmatic approach exists for accessing this analytics data.

Summarized with AI on November 1. AI used: claude-sonnet-4-5-20250929.

Hi,

I’m looking for a way to retrieve session data through the latest version of the Shopify GraphQL API. Specifically, I want to access metrics such as sessions, online_store_visitors, utm_source, utm_medium, and referrer_source.

Right now, I have to manually download and send reports, but I’d like to automate this process using the API instead. To give you an idea, here’s the ShopifyQL query I currently use in reports:

Is there a way to achieve this via GraphQL? If not, what would be the recommended approach to programmatically access session-related data?

Thanks for your help!

2 Likes