Stores and tracking API
API operations to connect a store, install website tracking, set consent and features, route tracking to a property and check purchases arrive.
Connect the store, install tracking on the website, decide where each tracking scope sends its purchases, and check that purchases arrive.
14 operations. Paths are relative to https://prod-backend.productmetrics.io/api/public/v1; every request needs Authorization: Bearer $PM_TOKEN. See the API overview for authentication, errors and rate limits.
Connect a store or website
PUT /companies/{companyId}/store-platform
Saves which store platform the workspace sells on.
POST /companies/{companyId}/stores
Starts connecting a store so its orders are tracked.
POST /tracking/installations/{installationId}/woocommerce/setup-claims
A new one-time setup token for a WooCommerce store.
POST /companies/{companyId}/tracking/website-installations
Sets up tracking for a website without a store connection.
Route and configure
PUT /companies/{companyId}/tracking/scopes/{scopeId}/destination
Sends a store’s purchases to a property’s Google Ads.
POST /companies/{companyId}/tracking/scopes/{scopeId}/property-assignments
Assigns a store’s orders to a property.
PUT /companies/{companyId}/tracking/installations/{installationId}/features
Sets the cookie consent manager and tracking features.
PUT /companies/{companyId}/tracking/scopes/{scopeId}/dimensions
Sets the countries, currencies, languages and paths a store scope covers.
PUT /companies/{companyId}/tracking/connections/{connectionId}/margin-policy
Sets the product cost fallback and margin costs that profit uses.
Check
GET /companies/{companyId}/properties/{propertyId}/tracking
The property’s tracking setup in one read.
GET /companies/{companyId}/tracking/commerce
The workspace’s store connections across all its properties.
GET /companies/{companyId}/tracking/installations/{installationId}/last-purchase
The last purchase tracked on a website: is tracking working?
GET /companies/{companyId}/tracking/installations/{installationId}/shopware6/status
Whether a Shopware 6 store’s orders arrive.
GET /companies/{companyId}/properties/{propertyId}/tracking/enhanced-conversions
Whether Google Ads enhanced conversions are ready.