comecerodocs

Get analytics settings

GET
/settings/analytics

Returns the tracking settings: your GA4 measurement ID, Google Ads conversion ID and label, Matomo site and your own tracking code. Settings are kept per mode: a test token works on the test settings, a live token on the live ones. Secret and trusted tokens may call it when their permissions include settings_analytics. Limited tokens may not.

Authorization

headerAuthorizationBearer <token>

A secret, trusted or limited token. See Authentication.

Query Parameters

show?string

Comma-separated fields to return; all others are left out. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.

hide?string

Comma-separated fields to leave out of the response. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.

formatted?boolean

When true, the object also has a formatted child with amounts and dates as display text in the shopper's language and currency (for example $19.99 or November 7, 2026). The default is false. See Localized formatting.

Defaultfalse

Response Body

The analytics settings.

application/json
  1. response

The analytics settings of the account in the current mode (test or live). They set the tracking code the hosted storefront adds to its pages and to the order receipt.

object?"settings_analytics"

The object type. Always settings_analytics.

Value in"settings_analytics"
url?string

The URL of this object.

Formaturi
account_id?string

The ID of the account the settings belong to.

test?boolean

True for the test mode settings, false for live.

date_modified?string

When the settings were last changed.

Formatdate-time
pageview_tracking?|

Your own JavaScript, run on every storefront page view.

Lengthlength <= 5000
conversion_tracking?|

Your own JavaScript, run once when an order is completed.

Lengthlength <= 5000
google_tracking_id?|Deprecated

Deprecated. A Universal Analytics property ID in the form UA-XXXXXX-XX. Google has retired Universal Analytics: use ga4_measurement_id.

ga4_measurement_id?|

Your Google Analytics 4 measurement ID, in the form G-XXXXXXXXXX (in GA4 under Admin, Data Streams). When set, page views and purchases are sent to GA4.

Match^[Gg]-[A-Za-z0-9]{6,}$
google_ads_id?|

Your Google Ads conversion ID, in the form AW-123456789 (in Google Ads under Tools, Conversions). Used with google_ads_label to report purchases as conversions.

Match^AW-[0-9]+$
google_ads_label?|

The Google Ads conversion label for purchases. Letters, numbers, underscores and hyphens only.

Match^[A-Za-z0-9_-]+$
matomo_url?|

The HTTPS address of your own Matomo installation, for example https://analytics.example.com or https://yoursite.matomo.cloud.

Formaturi
matomo_site_id?|

Your Matomo site ID.

Range1 <= value
has_matomo_token_auth?boolean

True when a Matomo API token is saved. The token itself is never returned.

send_transactions?boolean

Send completed orders to your Matomo site as ecommerce transactions.

send_events?boolean

Send shopper events (such as add to cart) to your Matomo site.

formatted?

Display text for the dates. Returned only when formatted=true.

Example Request
curl -X GET 'https://api.comecero.com/api/v1/settings/analytics'
Example Response
{  "object": "settings_analytics",  "url": "https://api.comecero.com/api/v1/settings/analytics",  "account_id": "AB1234",  "test": true,  "date_modified": "2026-10-02T14:21:07Z",  "pageview_tracking": null,  "conversion_tracking": null,  "google_tracking_id": null,  "ga4_measurement_id": "G-4X7KQ2M9PL",  "google_ads_id": "AW-123456789",  "google_ads_label": "AbC_dEfGh-12",  "matomo_url": null,  "matomo_site_id": null,  "has_matomo_token_auth": false,  "send_transactions": false,  "send_events": false}