Key takeaways
- Macros replace placeholders with live data at playback time.
- Common macros include device ID, user agent, and video duration.
- Incorrect syntax breaks ad delivery or causes tracking failures.
- SSAI resolves macros server-side, while client-side ads resolve in the player.
How Ad Macros work
An ad macro is a text string inside a VAST XML tag that gets swapped for real data before the ad plays. The player or ad server scans the ad URL or tracking pixel for these placeholders. It then substitutes the value based on the current environment.
For example, a macro like {playerWidth} becomes 1920 on a full-screen desktop player. A macro like {deviceID} might become a unique identifier for that specific app instance. This happens in milliseconds, before the ad creative loads.
In client-side ad insertion, the player handles this replacement. In server-side ad insertion, the ad server does it. The ad server knows the viewer's IP, location, and device type, so it can fill the macros with more precise data. The player then receives a fully resolved ad tag.
Most macro errors come from typos or unsupported fields. If the player does not recognize a macro, it may leave the placeholder as-is or drop the ad entirely. Always test ad tags in a sandbox environment before pushing them to production.
Why Ad Macros matter for a streaming business
Ad macros turn static ad spots into dynamic inventory. Without them, you serve the same ad to every viewer in a region. With them, you can pass the video title, channel name, or viewer location to the ad server. This allows for contextual targeting. An ad for a sports drink can appear only during sports content.
Operators care about this because it improves ad relevance and click-through rates. Higher relevance means advertisers pay more for the same inventory. It also improves viewer experience because ads feel less random.
Macros also help with fraud detection. By passing device and session data, you can verify that ads are served to real humans on real devices. This protects your reputation with ad buyers.
Finally, macros simplify reporting. Advertisers can see exactly which video or channel generated a click. This transparency builds trust and encourages repeat business.
Common mistakes with Ad Macros
Operators often make these errors when implementing ad macros:
- Unsupported macros: Using a macro the player does not recognize. This causes silent failures or broken ads.
- Case sensitivity errors: Some systems require exact casing.
{DeviceID}may fail if the system expects{deviceID}. - Overloading URLs: Too many macros can make the ad URL too long, causing truncation or parsing errors.
- Ignoring privacy rules: Passing sensitive data like exact location or personal identifiers without consent violates privacy laws.
- Not testing edge cases: Macros may behave differently on mobile versus web. Test on all major platforms.
How Flicknexs handles Ad Macros
Flicknexs supports ad macros within its SSAI (server-side ad insertion) workflow. The ad server resolves macros like device ID and video title before sending the final ad tag to the player. This keeps the client lightweight and ensures consistent data across all devices, including web, iOS, Android, and smart TV apps. You can configure which macros are available in your ad settings. The system validates syntax before deployment to prevent broken tags. This approach reduces player-side complexity and improves ad load times. For operators running FAST channels, this means you can serve dynamic ads without custom coding. See the Launch a FAST channel page for more details on setting up ad-supported linear streams.
Done reading about Ad Macros?
Flicknexs ships it as part of a white-label streaming platform: web, mobile and TV apps, billing, ads, DRM and playout, on your own domain.