Tags

Route ad requests to specific line items by tagging each request with one or more tag values. Use tags for house ads, catch-all inventory, A/B-style audience cuts, or any other request-level routing rule.

Introduction

Tags let you route a single ad request to a specific subset of line items. The SDK attaches an array of tag values to the ad request, and only line items configured with a matching tag compete for that impression.

A typical use case is reserving inventory for a house ad or fallback campaign:

  • The SDK tags a request with tags = ["house_ad"]
  • Only line items with the house_ad tag are eligible
  • All other line items — even higher-priority ones — are skipped for that request

A request can carry one or more tags. A line item can also have multiple tags, and it is eligible when any request tag matches any line item tag.

How matching works

CloudX uses strict isolation between tagged and untagged traffic. The presence or absence of a tag on the request fully decides which line items compete.

Request tagsLine item tagsResult
emptyemptyEligible
emptynon-emptySkipped
non-emptyemptySkipped
non-emptynon-empty, any matching tagEligible
non-emptynon-empty, no matching tagsSkipped

Create or edit tags for line items

Tags are part of the Advanced (Optional) step on the line item form.

  1. Open Line Items and click + Add line item, or edit an existing line item
  2. Complete General and Targeting as usual
  3. Expand Advanced (Optional)
  4. In the Tags section, click any tag chip to toggle it on or off
  5. To add a new tag, click + Create new tag, enter a name (e.g. Catch All), and click Add
  6. Click Save

Tags

Send a tag from the SDK

Use setExtraParameter on the ad object to attach a tag array before calling load. You can change the values between loads — the SDK captures them at the time of load, and subsequent updates take effect on the next load call.

The tags key changes line-item routing. For publisher-defined request correlation fields, use a different extra-parameter key and read it from the extra_parameters request-export column.

Android

setExtraParameter is available on banners (CloudXAdView), interstitials and rewarded ads (CloudXFullscreenAd), and native ads (CloudXNativeAdLoader).

Kotlin:

// Banner / MREC
adView.setExtraParameter("tags", listOf("house_ad"))
adView.load()

// Interstitial
interstitial.setExtraParameter("tags", listOf("vip", "house_ad"))
interstitial.load()

// Native
nativeAdLoader.setExtraParameter("tags", listOf("house_ad"))
nativeAdLoader.loadAd()

Java:

adView.setExtraParameter("tags", Arrays.asList("vip", "house_ad"));
adView.load();

To stop sending tags on subsequent loads, pass null:

adView.setExtraParameter("tags", null)

iOS

setExtraParameter is available on banners (CLXBannerAdView, CLXBanner), fullscreen ads (CLXFullscreenAd), and native ads (CLXNativeAdLoader).

Swift:

// Banner / MREC
banner?.setExtraParameter("tags", value: ["house_ad"])
banner?.load()

// Interstitial / Rewarded
interstitial?.setExtraParameter("tags", value: ["vip", "house_ad"])
interstitial?.load()

// Native
nativeLoader?.setExtraParameter("tags", value: ["house_ad"])
nativeLoader?.load()

Objective-C:

[self.banner setExtraParameter:@"tags" value:@[@"vip", @"house_ad"]];
[self.banner load];

To stop sending tags on subsequent loads, pass nil / null:

banner?.setExtraParameter("tags", value: nil)

Validate your setup

After wiring up the SDK and saving the line item, confirm the end-to-end flow before relying on tags in production:

  1. In the dashboard, set the line item status to Active
  2. In your app build, call setExtraParameter("tags", ["..."]) before load
  3. Trigger an ad request and confirm an impression serves from the expected line item

Common patterns

House ads / fallback inventory. Create a line item with the house_ad tag, and have the app send tags = ["house_ad"] whenever it wants the house creative to win. All other requests stay on your regular monetization pool.

Audience cohorts. Tag VIP or high-LTV users with tags = ["vip"] from your app code and configure premium line items with the vip tag to serve them.

Combined routing. Send multiple values such as tags = ["vip", "house_ad"] when a request should be eligible for line items configured with either tag.