Update analytics settings
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.
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.
falseapplication/json- body
The analytics fields to change. Send only the fields you want to change. Send a field as null or an empty string to clear it.
1 <= propertiespageview_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 ID in the form UA-XXXXXX-XX.
ga4_measurement_id?|Your GA4 measurement ID, in the form G-XXXXXXXXXX.
^[Gg]-[A-Za-z0-9]{6,}$google_ads_id?|Your Google Ads conversion ID, in the form AW-123456789.
^AW-[0-9]+$google_ads_label?|The Google Ads conversion label for purchases.
^[A-Za-z0-9_-]+$matomo_url?|The HTTPS address of your Matomo installation.
urimatomo_site_id?|Your Matomo site ID. Send null to clear it.
1 <= valuematomo_token_auth?|A Matomo API token, used to read your Matomo reports into the dashboard. Write only: it is never returned. Send an empty string to remove it.
send_transactions?booleanSend completed orders to your Matomo site.
send_events?booleanSend shopper events to your Matomo site.
The analytics settings, after the change.
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 POST 'https://api.comecero.com/api/v1/settings/analytics' \ -H 'Content-Type: application/json' \ -d '{ "ga4_measurement_id": "G-4X7KQ2M9PL", "google_ads_id": "AW-123456789", "google_ads_label": "AbC_dEfGh-12"}'{ "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}Get analytics settings GET
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.
Get fraud settings GET
Returns the fraud screening rules: the score threshold, payment counts per shopper and blocked countries. Settings are kept per mode: a test token works on the test settings, a live token on the live ones. Only Comecero staff tokens may call it. Secret and trusted tokens get `403`; ask support to change these rules.