# Upstack Data - [Documentation (224 pages)](https://docs.upstackdata.com/_llms/documentation.md): Documentation for Documentation. ## Pixel ### SDK - [Upstack Data Pixel: Event Tracking Overview](https://docs.upstackdata.com/pixel.md): Track customer events, capture identity, and forward data to ad platforms with the Upstack Data JavaScript pixel. Quick setup and full SDK reference. - [How to Install the Upstack Data Tracking Pixel](https://docs.upstackdata.com/pixel/setup.md): Install the Upstack Data pixel on any website in 5 minutes. Covers installation, verification, common tracking patterns, and identity capture. - [Upstack Data JavaScript SDK Reference](https://docs.upstackdata.com/pixel/javascript-sdk.md): Complete API reference for the Upstack Data JavaScript SDK. Covers all 6 queue commands, 2 direct client methods, TypeScript support, and usage patterns. ### IDENTITY - [Understanding Identity Resolution](https://docs.upstackdata.com/pixel/identity-resolution.md): Upstack ID stitches anonymous sessions into unified customer profiles via deterministic and probabilistic matching — improving CAPI match quality. - [How Session Stitching Works](https://docs.upstackdata.com/pixel/identity-stitching.md): How Upstack ID attaches resolved identity to events, stitches anonymous sessions retroactively, and improves destination match quality (EMQ 7-9). - [Upstack Data Glossary: Key Terms Explained](https://docs.upstackdata.com/pixel/glossary.md): Glossary of Upstack Data terminology — attribution, CAPI, EMQ, identity resolution, destinations, server-side tracking, and other key concepts explained. ### AUTOMATIC TRACKING - [Shopify Automatic Event Tracking](https://docs.upstackdata.com/sources/catalog/shopify-automatic-tracking.md): How Upstack Data automatically captures all customer journey events from your Shopify store — page views, add to cart, checkout, and purchases with no config. - [Automatic Form Capture](https://docs.upstackdata.com/guides/integrations/form-capture-integrations.md): Automatic lead capture from Klaviyo, Postscript, Attentive, Omnisend, Sendlane, Recart, Listrak, Justuno, Alia, Octane AI, and Loop Subscriptions. Upstack Data detects form submissions and fires Lead events automatically. - [Event Tracking (118 pages)](https://docs.upstackdata.com/_llms/event-tracking.md): Documentation for Event Tracking. - [Metrics (1011 pages)](https://docs.upstackdata.com/_llms/metrics.md): Documentation for Metrics. ## API ### OVERVIEW - [Introduction](https://docs.upstackdata.com/api-reference/introduction.md): Programmatic access to your Upstack Data pixel — authentication, base URLs, scopes, and a curl quickstart. - [Errors](https://docs.upstackdata.com/api-reference/errors.md): Error response format, status code reference, and how to handle failures from the Upstack Data API. - [Rate limiting](https://docs.upstackdata.com/api-reference/rate-limiting.md): How the Upstack Data API enforces request limits, which headers to watch, and how to retry safely. ### ACCOUNT - [Get the account](https://docs.upstackdata.com/api-reference/account/get-the-account.md): Return the account that owns this API key — display name, active owners and admins, and the current subscription summary (when present). - [Rename the account](https://docs.upstackdata.com/api-reference/account/rename-the-account.md): Rename the account that owns this API key. Single-field strict allowlist — `accountName` is the only accepted field; any other key in the body is rejected with 400. - [Get order settings](https://docs.upstackdata.com/api-reference/account/get-order-settings.md): Return the account's order settings — count flags for pending / voided orders, refund-date attribution, and the list of exclusion filters that drop matching orders from every analytics query. - [Replace order settings](https://docs.upstackdata.com/api-reference/account/replace-order-settings.md): Replace the account's order settings in full. **PUT-the-whole-config semantics** — any existing exclusion filter not present in the body is deleted. The server assigns `id`, `createdAt`, and `updatedAt` on new filters (and on nested groups + conditions); entries that already carry an `id` preserve t… ### CATALOG - [List available measures](https://docs.upstackdata.com/api-reference/catalog/list-available-measures.md): Return the catalog of measures available to your pixel — the same list the in-app query builder shows. Use this to discover canonical measure ids before constructing a query or building a dashboard. - [List filter fields](https://docs.upstackdata.com/api-reference/catalog/list-filter-fields.md): Return the catalog of filterable fields available across your query endpoints — field id, label, value type, supported operators, and the endpoint contexts each field applies to. Use this to discover canonical filter ids before constructing a `filters` body on any query endpoint. ### ANALYTICS - [Run an analytics query](https://docs.upstackdata.com/api-reference/analytics/run-an-analytics-query.md): Execute a measures-and-dimensions query against your event stream. Mirrors the in-app query builder. - [Run an attribution query](https://docs.upstackdata.com/api-reference/analytics/run-an-attribution-query.md): Attribute conversions across marketing touchpoints. Supports first-click, last-click, and any-click models with a fixed-set lookback window. - [Run a cohort analysis](https://docs.upstackdata.com/api-reference/analytics/run-a-cohort-analysis.md): Cohort an audience by acquisition period and analyze retention or LTV over time. Limited to cohort-specific measures and to weekly / monthly / yearly granularity. - [List channel entities with optional metrics](https://docs.upstackdata.com/api-reference/analytics/list-channel-entities-with-optional-metrics.md): List ad accounts, campaigns, ad sets, or ads from the ads-platform integrations connected to your pixel, with optional metric aggregation over a date range. ### DASHBOARDS - [List dashboard views](https://docs.upstackdata.com/api-reference/dashboards/list-dashboard-views.md): Return a summary list of dashboard views for the authenticated pixel. - [Get a dashboard view](https://docs.upstackdata.com/api-reference/dashboards/get-a-dashboard-view.md): Fetch a single view with its full configuration. - [Create a dashboard view](https://docs.upstackdata.com/api-reference/dashboards/create-a-dashboard-view.md): Create a dashboard view from a full `DashboardViewConfiguration` body. For the high-level builder that auto-lays-out widgets from a measure list, see the `POST /api/dashboard/views/from-preset` endpoint. - [Build a dashboard from a measure list (preset)](https://docs.upstackdata.com/api-reference/dashboards/build-a-dashboard-from-a-measure-list-preset.md): High-level builder — pass a list of measures, get back a finished dashboard with auto-laid-out widgets. The backend packs sparkline tiles 4-per-row in the `kpi-grid` layout and fills in sensible defaults for attribution, granularity, date range, and filters. - [Duplicate a dashboard view](https://docs.upstackdata.com/api-reference/dashboards/duplicate-a-dashboard-view.md): Create a copy of an existing view. The copy inherits the source's name and order; rename via `PATCH` afterwards if needed. Body must be empty (an empty object `{}` is accepted; unknown keys are rejected). - [Update a dashboard view](https://docs.upstackdata.com/api-reference/dashboards/update-a-dashboard-view.md): Partial update — only fields supplied in the body are changed. Pass at least one of `name`, `configuration`, or `order`. Other fields are rejected by the schema. - [Delete a dashboard view](https://docs.upstackdata.com/api-reference/dashboards/delete-a-dashboard-view.md): **Required scope:** `dashboards:write`. ### COSTS - [Get cost configuration](https://docs.upstackdata.com/api-reference/costs/get-cost-configuration.md): Return the account's cost configuration. Use `?type=` to filter to a single cost type; omit it to get the full bag. - [Update the global product override](https://docs.upstackdata.com/api-reference/costs/update-the-global-product-override.md): Update the default COGS / handling fee applied to product variants that have no per-variant COG line. At least one of `defaultCogs`, `globalHandlingFee`, or `currency` must be supplied. - [Update shipping cost settings](https://docs.upstackdata.com/api-reference/costs/update-shipping-cost-settings.md): Switch the shipping cost attribution method. Pass `fixedRateAmount` when switching to `fixed_rate`; it is not validated as required, and without it no fixed charge applies. - [Add a cost line](https://docs.upstackdata.com/api-reference/costs/add-a-cost-line.md): Add a new cost line for one of the five line-typed cost surfaces — `order`, `gateway`, `shipping` (profile rule), `variable`, or `fixed`. The server assigns a ULID for the new line. - [Update a cost line](https://docs.upstackdata.com/api-reference/costs/update-a-cost-line.md): Partial-update an existing cost line by its ULID. Only the fields supplied in `updates` are written; omitted fields stay as-is. Triggers a per-order COGS recalculation downstream (except for `variable` and `fixed`). - [Delete a cost line](https://docs.upstackdata.com/api-reference/costs/delete-a-cost-line.md): Remove a cost line from the named cost config by its ULID. Triggers a per-order COGS recalculation downstream — the deleted line is passed to the recalc trigger so affected orders can be identified. ### PRODUCTS - [Search products](https://docs.upstackdata.com/api-reference/products/search-products.md): Search products by title / SKU / variant. Cursor-paginated. - [Get the resolved cost for a variant](https://docs.upstackdata.com/api-reference/products/get-the-resolved-cost-for-a-variant.md): Returns the effective per-unit cost for a single variant, including which configuration tier supplied it (per-variant COG line, global override, or default fallback). - [Set a variant's handling fee](https://docs.upstackdata.com/api-reference/products/set-a-variants-handling-fee.md): Set the per-variant handling fee. Triggers a per-order COGS recalculation downstream. - [Add a COG line to a variant](https://docs.upstackdata.com/api-reference/products/add-a-cog-line-to-a-variant.md): Append a new COG line to a variant's `manualCostHistory`. The server assigns a ULID for the new line. Triggers a per-order COGS recalculation downstream. - [Update a COG line](https://docs.upstackdata.com/api-reference/products/update-a-cog-line.md): Update an existing COG line by its server-assigned ID. Only the supplied fields are updated; omitted fields stay as-is. Triggers a per-order COGS recalculation downstream. - [Delete a COG line](https://docs.upstackdata.com/api-reference/products/delete-a-cog-line.md): Remove a COG line from a variant's history. Triggers a per-order COGS recalculation downstream (the deleted line is passed through to the recalc trigger so affected-orders can be identified). ### EVENTS - [Send events via Upstack Conversion API](https://docs.upstackdata.com/api-reference/events/send-events-via-upstack-conversion-api.md): **Upstack Conversion API (CAPI)** — send a batch of tracking events from your server. Events enter the **same collect queue and consumer** as browser pixel events (identity resolution, enrichment, analytics, and destination forwarding). Session handling and edge enrichment still differ from the Clou… ## CLI ### GETTING STARTED - [Install the Upstack CLI](https://docs.upstackdata.com/cli/install.md): Install the upstack CLI and configure it with an API key and pixel id. - [AI agent workflow](https://docs.upstackdata.com/cli/ai-agent-workflow.md): Use Claude (or another agent) in your terminal to translate natural-language intent into structured upstack CLI calls. ### ACCOUNT - [upstack account](https://docs.upstackdata.com/cli/account.md): Read and rename the Upstack account that owns the configured API key — wraps the public /api/account endpoints. ### DISCOVERY - [upstack measures](https://docs.upstackdata.com/cli/measures.md): List the measures catalog from the command line. Find canonical measure ids before building a query or dashboard. - [upstack dimensions](https://docs.upstackdata.com/cli/dimensions.md): List the dimensions available for grouping and filtering queries. Bundled with the CLI — no network call. - [upstack filters](https://docs.upstackdata.com/cli/filters.md): List the filter-fields catalog from the command line. Find canonical filter field ids, value types, operators, and applicable contexts before constructing a --filter. ### QUERIES - [upstack query](https://docs.upstackdata.com/cli/query.md): Run a measures-and-dimensions query from the command line. Wraps POST /api/query. - [upstack query-attribution](https://docs.upstackdata.com/cli/query-attribution.md): Run an attribution query from the command line. Wraps POST /api/query-attribution. - [upstack query-cohort](https://docs.upstackdata.com/cli/query-cohort.md): Run a cohort analysis from the command line. Wraps POST /api/query-cohort-analysis. - [upstack query-channel-details](https://docs.upstackdata.com/cli/query-channel-details.md): List ad accounts, campaigns, ad sets, or ads with optional metrics from the command line. Wraps POST /api/query-channel-details. ### DASHBOARDS - [upstack dashboard view](https://docs.upstackdata.com/cli/dashboard-view.md): Manage Upstack dashboard views from the command line — list, show, create, update, copy, delete, organize widgets into sections, pin KPIs, and the high-level preset builder. ### COSTS - [upstack costs](https://docs.upstackdata.com/cli/costs.md): Read and update cost configuration from the CLI — global overrides, shipping method, and per-type cost lines (order / gateway / shipping / variable / fixed). ### PRODUCTS - [upstack products](https://docs.upstackdata.com/cli/products.md): Browse products and manage per-variant costs — handling fee + COGS history — from the CLI. ### ADVANCED - [upstack saved](https://docs.upstackdata.com/cli/saved-queries.md): Cache query parameters locally for reuse. Run, list, inspect, and delete saved queries. - [upstack history](https://docs.upstackdata.com/cli/history.md): Inspect or re-run previously executed queries. Every query run is logged locally. - [Profiles](https://docs.upstackdata.com/cli/profiles.md): Switch between API keys, pixels, and environments using named profiles. - [Configuration defaults](https://docs.upstackdata.com/cli/config-defaults.md): Set per-profile defaults so you don't repeat common flags on every query. ## OpenAPI Specs - [openapi](/api-reference/openapi.yaml) > The links below point to documentation indexes. Follow each `/_llms/` index recursively until you reach documentation pages. ## Indexes - [Documentation (224 pages)](https://docs.upstackdata.com/_llms/documentation.md): Documentation for Documentation. - [Event Tracking (118 pages)](https://docs.upstackdata.com/_llms/event-tracking.md): Documentation for Event Tracking. - [Metrics (1011 pages)](https://docs.upstackdata.com/_llms/metrics.md): Documentation for Metrics. - [Metrics / METRICS (1011 pages)](https://docs.upstackdata.com/_llms/metrics/metrics.md): Documentation for Metrics / METRICS. - [Metrics / METRICS / Advertising (368 pages)](https://docs.upstackdata.com/_llms/metrics/metrics/advertising.md): Documentation for Metrics / METRICS / Advertising. - [Metrics / METRICS / Advertising / Blended (135 pages)](https://docs.upstackdata.com/_llms/metrics/metrics/advertising/blended.md): Documentation for Metrics / METRICS / Advertising / Blended. - [Metrics / METRICS / Orders (323 pages)](https://docs.upstackdata.com/_llms/metrics/metrics/orders.md): Documentation for Metrics / METRICS / Orders.