appActivityGuests
Requires permission analytics:sales:read.
App activity of guest visitors on the customer portal, meaning people who are not logged in, over a date range. Needs the sales analytics read permission.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query AppActivityGuests($range: AnalyticsRangeInput!) {
appActivityGuests(range: $range) {
app
available
guestBrowsing
loggedIn
periodDays
productViews
topProducts {
productName
variantName
guests
productId
variantId
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query AppActivityGuests($range: AnalyticsRangeInput!) {\n appActivityGuests(range: $range) {\n app\n available\n guestBrowsing\n loggedIn\n periodDays\n productViews\n topProducts {\n productName\n variantName\n guests\n productId\n variantId\n }\n }\n}",
"variables": {
"range": {
"from": "2025-01-15T00:00:00Z",
"to": "2025-01-15T00:00:00Z"
}
}
}
EOF
Variables:
{
"range": {
"from": "2025-01-15T00:00:00Z",
"to": "2025-01-15T00:00:00Z"
}
}
Response:
{
"data": {
"appActivityGuests": {
"app": 0,
"available": true,
"guestBrowsing": true,
"loggedIn": 0,
"periodDays": 0,
"productViews": 0,
"topProducts": [
{
"productName": "string",
"variantName": "string",
"guests": 0,
"productId": "id",
"variantId": "id"
}
]
}
}
}
appActivityGuests(
range: AnalyticsRangeInput!
): AppActivityGuests!
Arguments
appActivityGuests.range ● AnalyticsRangeInput! non-null input
The date range and, optionally, the visibility scope.
Type
AppActivityGuests object
Visitors who browse without signing in.