Google Analytics

Products by device

GET
/v1/google-analytics/products-by-device

GA4 product funnel of the period summed per device category, for the audit: product views, carts, checkouts, purchases and item revenue, over every product. Reads google_analytics_products_by_device (item x device x date). Aggregates only. A period without data answers 200 with zeroed totals and an empty byDevice. An environment where google_analytics_products_by_device does not exist yet answers like a period without data: 200 with period, zeroed totals and an empty byDevice. Both dates are required; the period spans at most 366 days. Cached for 30 minutes.

Autorização

ClientIdAuthClientSecretAuth
headerx-client-id<token>

Client ID

headerx-client-secret<token>

Client secret

Parâmetros de query

organizationId*string

Organization identifier (UUID, required)

Formatouuid
startDate*string

First day of the period, inclusive (YYYY-MM-DD, UTC). Required.

Formatodate
endDate*string

Last day of the period, inclusive (YYYY-MM-DD, UTC). Required. At most 366 days from startDate.

Formatodate

Corpo da resposta

Successful response

application/json
  1. response
period*
totals*
byDevice*array<>

Period total per device category, most product views first.

curl -X GET "https://example.com/v1/google-analytics/products-by-device?organizationId=11111111-1111-4111-8111-111111111111&startDate=2026-10-01&endDate=2026-10-02"
{  "period": {    "startDate": "2026-10-01",    "endDate": "2026-10-31"  },  "totals": {    "itemsViewed": 5000,    "itemsAddedToCart": 400,    "itemsCheckedOut": 150,    "itemsPurchased": 60,    "itemRevenue": 7200.5  },  "byDevice": [    {      "device": "mobile",      "itemsViewed": 4000,      "itemsAddedToCart": 300,      "itemsCheckedOut": 100,      "itemsPurchased": 40,      "itemRevenue": 4500.25    },    {      "device": "desktop",      "itemsViewed": 1000,      "itemsAddedToCart": 100,      "itemsCheckedOut": 50,      "itemsPurchased": 20,      "itemRevenue": 2700.25    }  ]}