The Stape Margin Lookup Variable for GTM Server allows you to retrieve margin data from Stape POAS Data Feed or Stape Data Store for each product in your items array and returns a combined margin value that accounts for quantity, enabling you to track Profit on Ad Spend (POAS) for your conversion events and advertising campaigns.
Useful Resources
- How to set up POAS Data Feed
- Setting up Profit on Ad Spend via Stape Data Store
- Profit tracking with sGTM and Stape Data Store: a complete guide
How to Configure Stape Data Store as a Product Feed Source
When using Stape Data Store to store margin data, you must organize it following the schema below. In Stape Data Store, margin data is organized in collections, where each document in a collection represents a single product:
- Document ID — must match the product ID used in your
itemsarray (e.g., the value ofitem_id). - Margin value field — a numeric field holding the margin amount. Defaults to
margin; configurable via the Feed key for profit margin value setting in the template. - Margin type field (optional) — a string field set to either
absolute(fixed currency amount) orpercent(fraction of revenue). Defaults tovalue_type; configurable via the Feed key for profit margin value type setting.
Product data can be uploaded to Stape Data Store via the REST API, and through the Stape Data Store interface via CSV import or manually.
Open Source
The Stape Margin Lookup Variable for GTM Server Side is developed and maintained by the Stape Team under the Apache 2.0 license.