The RTB House Conversions API Tag for Google Tag Manager Server-Side sends page view, product, basket, and conversion events from your server container directly to the RTB House Conversions API (CAPI) at https://{region}.creativecdn.com/partner/omni/postbacks.
Features
- Server-to-Server Events: Sends event data directly from the GTM Server Container to the RTB House CAPI.
- Broad Event Coverage: Page views, basket events, the order/checkout funnel, generic conversions, consent withdrawal, and custom events.
- Automatic Data Mapping: Maps Timestamp, Page URL, Page Referrer URL, Product IDs, and Order/Conversion Value/ID from the incoming Event Data.
- Anonymous ID Cookie Management: Reads/sets the
__rtbh.aid cookie server-side, generating a new ID if none is found.
- Multi-Product Basket Add: Sends one request per product ID when
Basket Added includes multiple products.
- Consent Mode Support: Checks
ad_storage consent before sending data.
- Optimistic Scenario: Optionally fires
gtmOnSuccess() without waiting for the API response.
Installation
- Download the Template: Download the
template.tpl file from this repository.
- Import to GTM Server Container: In Templates → Tag Templates, click New, then use the three-dot menu → Import to select the downloaded file.
- Create a New Tag: Go to Tags → New and select the imported RTB House Conversions API by Stape template.
Tag Configuration
Base Configuration
| Parameter |
Description |
| Event Type Setup Method / Event Name |
Standard picks one of the built-in Event Types; Custom sends an arbitrary name/value agreed with your RTB House representative. |
| Tagging Hash / Partner Key (PKey) |
Static identifier and advertiser key for the CAPI. Contact your RTB House representative to obtain these. |
| Region |
Regional endpoint: Americas (us), Europe/Middle East/Africa (ams), or Asia (asia). |
| Identifier Type / Value |
Anonymous ID, User ID, or Session ID used to track the user. Manual Identifier Value always overrides automap. |
| Automap User Identifiers Parameters |
Looks up Anonymous ID, then User ID, then Session ID from the __rtbh.{type} cookies, then the rtbh.{type} / __rtbh.{type} Event Data parameters, until one is found. |
| Set Anonymous ID “__rtbh.aid” cookie |
Stores (and auto-generates, if missing) the resolved Anonymous ID as the __rtbh.aid cookie. Only shown for Anonymous ID. |
| Use Optimistic Scenario |
Fires gtmOnSuccess() immediately, without waiting for the API response. |
Enabling the Anonymous ID cookie reveals Cookie Domain, SameSite, HTTP Only, and Expiration settings.
Server Event Data Parameters
| Parameter |
Description |
| Automap Server Event Data Parameters |
Maps Event Timestamp, Page URL (page_location), and Page Referrer URL (page_referrer) from the Event Data. |
| Server Event Data Parameters |
Manually override or add these; manual values always win over automap. |
Event Parameters
Shown for events that carry extra data (Category, Search Results, Product, Wishlist, Product Size, Basket Added/Viewed, Order Confirmed, Conversion):
| Parameter |
Description |
| Automap Event Parameters / Custom Item ID Key |
Maps Product ID(s) from eventData.items (or .ecommerce.items, key item_id unless overridden), and Order/Conversion Value/ID from eventData.value/items sum and eventData.transaction_id. |
| Category Name or ID / Product Size |
Required for the Category / Product Size events, respectively. |
| Product ID(s) |
Used by Product, Wishlist, Search Results, Basket Added/Viewed, and Order Confirmed. Basket Added sends one request per ID. |
| Order ID / Order Value / Order Subclass |
For Order Confirmed. ID/Value are required (manual or automapped); Subclass is optional. |
| Conversion ID / Value / Product(s) ID(s) / Class |
Optional fields for the Conversion event. Each Conversion Class reveals its own Subclass field. |
| Use Custom Attribution Deduplication |
Overrides RTB House’s standard deduplication (cd=default) with cd=false (attributed to RTB House) or cd=true (attributed elsewhere), for Order Confirmed and Conversion. |
Advanced Settings
| Parameter |
Description |
| Ad Storage Consent |
Send data always (default), or abort the tag when ad_storage consent is not granted. |
Event Types
| Event |
tag content |
| Home Page Viewed |
home |
| Category Page Viewed |
category2_{categoryId} |
| Sales or Promo Page Viewed |
sales |
| New Products Page Viewed |
newoffers |
| Product Page Viewed |
offer_{productId} |
| Wishlist Added |
wishlist_{productId} |
| Product Size/Color Selected |
size_{productSize} |
| Offline Store Checked |
offlinecheck |
| Search Results Viewed |
listing_{productIds} |
| Basket Added |
basketadd_{productId} (one request per product ID) |
| Basket Viewed (No Item IDs) |
basket |
| Basket Viewed (Item IDs Available) |
basketstatus_{productIds} |
| Order Started (Begin Checkout) |
startorder |
| Order Confirmed |
conversion_order_{orderSubclass}_{orderValue}_{orderId}_{productIds} |
| Conversion |
conversion_{conversionClass}_{conversionSubclass}_{conversionValue}_{conversionId}_{productIds} |
| Other Pages Viewed |
placebo |
| Consent Withdrawed |
cnst_ads_0 |
| Custom |
custom_{eventName}_{eventValue} |
Open Source
The RTB House Conversions API for GTM Server-Side is developed and maintained by the Stape Team under the Apache 2.0 license.
GitHub
Repository
stape-io/rtb-house-tag — updated: view commit
First version
GTM Gallery Status
Not listed