Documentation

get_session_insights

Aggregate session health — total sessions, engagement and frustration scores, conversion, revenue, AOV and revenue per session.

When to use it

A quick health read, or as the denominator for something else. Apply the session filters to compare any two audiences.

Ask for it like this

You do not name the tool. These are questions that make an assistant reach for it:

How did the store do last month?
Compare returning visitors against new visitors.

What will make you wrong

Caveats

  • Its conversion rate is over all sessions. get_funnel_analysis computes conversion over product-viewing sessions. The two will not match, and neither is wrong — say which one you are quoting.

Parameters

This tool takes no parameters of its own.

Shared parameters it accepts

Documented in full on the tool reference index.

Date window — defaults to the last 30 days.

dateFrom
stringdefault: 30 days ago
Start of the window, YYYY-MM-DD. Inclusive.
dateTo
stringdefault: today
End of the window, YYYY-MM-DD. Inclusive.

Session filters — narrow the result to one audience.

device
enum
Keep only sessions on this device class.
mobiletabletdesktop
visitorType
enum
Keep only first-time or only returning visitors.
newreturning
utmSource
string
Keep only sessions from this UTM source, for example google.
utmMedium
string
Keep only sessions from this UTM medium, for example cpc.
utmCampaign
string
Keep only sessions from this UTM campaign name.
theme
string
Keep only sessions that rendered this Shopify theme id (bare numeric id). Use it to isolate one arm of a theme A/B test. Sessions recorded before 7 August 2026 carry no theme id and drop out.

Every tool also accepts merchantId, which resolves from your connection. You never pass it.

What comes back

JSON. These are the top-level keys; date-scoped tools additionally carry a _meta block with the server date and the data coverage envelope.

totalSessions
Sessions in the window after bot exclusion.
conversion
Converted sessions over all sessions, with a confidence interval.
avgEngagementScore
Mean engagement score, 0 to 100.
avgFrustrationScore
Mean frustration score, 0 to 100.
medianDurationSeconds
Median session length. Compare against the mean before quoting an average.
avgActiveDurationSeconds
Mean time the tab was actually focused.
avgPagesViewed
Mean pages per session.
agentSessions
Sessions flagged as AI-agent traffic. Keep them out of UX conclusions.
totalRevenueCents
Gross pixel revenue for the window.
aovCents
Average order value.
revenuePerSessionCents
Revenue divided by sessions — the number a traffic decision should move.
deviceBreakdown
The same metrics split by device, when no device filter is applied.

Pairs with