Get analytics settings
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.
AuthorizationBearer <token>A secret, trusted or limited token. See Authentication.
show?stringComma-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?stringComma-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?booleanWhen 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.
falseThe analytics settings.
application/json- 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.
"settings_analytics"url?stringThe URL of this object.
uriaccount_id?stringThe ID of the account the settings belong to.
test?booleanTrue for the test mode settings, false for live.
date_modified?stringWhen the settings were last changed.
date-timepageview_tracking?|Your own JavaScript, run on every storefront page view.
length <= 5000conversion_tracking?|Your own JavaScript, run once when an order is completed.
length <= 5000google_tracking_id?|DeprecatedDeprecated. 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.
^[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.
^AW-[0-9]+$google_ads_label?|The Google Ads conversion label for purchases. Letters, numbers, underscores and hyphens only.
^[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.
urimatomo_site_id?|Your Matomo site ID.
1 <= valuehas_matomo_token_auth?booleanTrue when a Matomo API token is saved. The token itself is never returned.
send_transactions?booleanSend completed orders to your Matomo site as ecommerce transactions.
send_events?booleanSend shopper events (such as add to cart) to your Matomo site.
formatted?Display text for the dates. Returned only when formatted=true.
curl -X GET 'https://api.comecero.com/api/v1/settings/analytics'{ "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}Overview
Previous Page
Update analytics settings POST
Changes the tracking settings. Send only the fields you want to change. The tracking scripts are rebuilt at once, so the change shows on the next page load. 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.