Location: Targets / RTB โ RTBs
โLast Updated: October 2025
๐ Overview
Custom Tags allow you to insert dynamic variables into RTB requests โ including URLs, headers, query parameters, and request bodies โ using bracketed placeholders such as:
[CALLER_ID][ZIP_CODE][STATE]User-defined tag IDs
These placeholders are resolved at request time using the current call and session context. The system preserves correct data types, fills in missing location data when possible, and logs all resolved values for visibility and troubleshooting.
โ๏ธ How Custom Tags Work
When an RTB request is executed, Moja replaces tag placeholders with real values derived from the active call or session.
Tags resolve dynamically per request
Numeric values retain numeric types
Missing ZIP or State values are filled using NPANXX lookup
All resolved parameters are logged per request
You can view resolved values under:
โReporting โ RTB Requests โ (+) next to each RTB entry.
๐ง Inserting Tags in the RTB Builder
The RTB builder includes a Variables modal to help you insert tags consistently.
Variables Modal
Searchable picker for available tags
Insert tags into:
Query parameters
Headers
Request body (structured or raw)
๐ฆ Tip: Using the Variables picker avoids formatting errors and ensures valid tag syntax.
๐ฆ Body & Raw Body Support
Custom Tags work in both:
Structured JSON bodies
Raw JSON payloads
Resolved request bodies โ including raw payloads โ are fully captured and visible in the Reporting panel.
๐ข Numeric Tag Handling
Tags ending with _NUMERIC are automatically emitted as numbers, not strings.
Example:
"bid": 100
instead of:
"bid": "100"
This ensures compatibility with buyer and partner APIs that enforce numeric typing and prevents common downstream parsing errors.
๐ฉ Runtime Enforcement: Numeric typing is applied at request build time, ensuring consistent behavior across all RTB executions.
๐ Dynamic Resolution Pipeline
Tag resolution follows a consistent pipeline:
Values resolve from the current call or session context
ZIP and State use NPANXX fallback when missing
Resolution occurs before filters execute, ensuring compatibility with Advanced Filters
๐งฎ Advanced Filter Behavior
Custom Tags and Advanced Filters work together within the same RTB configuration.
Pre-Resolution for Filtering
ZIP and State tags are resolved before filters run
Allows filters to reference tags like
[STATE]or[ZIP_CODE]
Sequential Filter Evaluation
Filters now evaluate left-to-right within each group (AND / OR)
Produces predictable results when mixing tag-based conditions
๐จ Result: Routing logic behaves consistently even under complex, conditional targeting rules.
๐ Request Logging
All RTB request data is logged in detail, including:
Query parameters
Headers
Body and raw body payloads
Fully resolved tag values
Logs are accessible under Reporting โ RTB Requests, enabling easy debugging and validation.
๐ฏ Why This Matters
Custom Tags make RTB integrations more flexible, reliable, and observable without requiring schema or code changes.
They help ensure:
Correct numeric typing
Consistent location data resolution
Predictable filter behavior
Clear visibility into outbound RTB requests
This is especially valuable for complex routing logic, buyer-specific payloads, and troubleshooting delivery issues.
๐ก Example Use Cases
Add
[CALLER_ID]and[ZIP_CODE]to a POST body; Moja auto-resolves ZIP and State via NPANXX if missingInclude
[BUYER_ID]in headers and[PAYOUT_NUMERIC]in the JSON body for buyer-specific attributionReference
[STATE]or[ZIP_CODE]inside filters to refine targeting without modifying RTB schemas
๐ Getting Started
Go to Targets / RTB โ RTBs
Open an existing RTB or click Create New
In Query, Headers, or Body, click Variables to insert a tag
Save the RTB
Run a test call
View resolved values under Reporting โ RTB Requests โ (+)
๐ Inbound RTB Behavior
Custom Tags cannot be created directly inside Campaigns.
However, if a Campaign references an RTB that uses Custom Tags, those tags automatically pass through and resolve during RTB execution.