I am trying to retrieve basic aggregated traffic analytics for merchants who have installed my public app (e.g., sessions breakdown by device, traffic by country). I do not need PII (names, emails, specific addresses).
The Query: I am running a standard query against the sessions dataset (via shopifyqlQuery). No customer fields are requested:
GraphQL
query TrafficByDevice {
shopifyqlQuery(
query: "FROM sessions SHOW sessions, device_type GROUP BY device_type SINCE last_30_days"
) {
tableData {
columns { name }
rows
}
}
}
The Issue: Despite requesting zero PII, the API returns a blocking error stating that Level 2 access is required:
“Access denied for shopifyqlQuery field. Required access:
read_reportsaccess scope. Also: Level 2 access to Customer data including name, address, phone, and email fields.”
My Question: Is there another way I can get this aggregated Shopify Analytics traffic data without Level 2 access? Or has anyone successfully used shopifyqlQuery to get traffic/session data with only Level 1 access?
Thanks!