List of supported macros

Modified on Wed, 4 Nov at 5:09 AM

bideaseREFERENCE
Supported Macros
Macros you can use in tracking links: inventory, device, geo, campaign and pricing data, plus your own custom variables.
{ }
{{.Macro}} syntax
Most macros are written with a dot, e.g. {{.BidID}}.
◷
Time without a dot
Bid-time functions are written without the dot, e.g. {{time.Unix}}.
✎
Variables & bindings
Pass your own values with {{.Var}}, or with {{.Binding}} to also see them in the Reporting API.
REFERENCE
Available Macros
1
Macro syntax

Write the macros below as {{.MACRO}}; each comes with a description, so just pick the ones you need.

2
Inventory & placement
MacroDescription
{{.Exchange}}Name of the exchange
{{.SSP}}Name of the SSP
{{.AppBundle}}Unique identifier of the app (bundle_id)
{{.MD5 .AppBundle}}MD5-hashed unique identifier of the app (bundle_id)
{{.AppName}}App name from the store
{{.BundleID}}Bidease internal numeric ID of the app (publisher bundle)
{{.ImpWidth}}Width of the placement at bid time
{{.ImpHeight}}Height of the placement at bid time
{{.Interstitial}}Whether the placement is full screen
{{.Rewarded}}Whether the ad placement is rewarded
3
Device & user
MacroDescription
{{.IFA}}Unique advertising ID; its case is set automatically depending on the OS
{{.DeviceID}}Main device ID: the advertising ID (IFA) for mobile devices, otherwise the Bidease internal device ID
{{.UniqueID}}Bidease internal device ID
{{.DeviceMake}}Manufacturer of the device
{{.DeviceModel}}Device model
{{.OS}}Operating system of the device
{{.OSVer}}Operating system version
{{.UserAgent}}User agent at bid time
{{.Lang}}Device language, 2-letter code (e.g. en / ru)
{{.DeviceIP4}}IP address
4
Geo
MacroDescription
{{.Country}}Country, 3-letter code (RUS / USA)
{{.Country2}}Country, 2-letter code (RU / US)
{{.City}}City
{{.Lat}}Latitude from -90.0 to +90.0, where negative is south
{{.Lon}}Longitude from -180.0 to +180.0, where negative is west
5
Campaign & creative
MacroDescription
{{.CompanyID}}Organization ID on the Bidease platform
{{.ProductID}}Product (application or mobile content) ID
{{.ProductBundle}}Bundle ID of the advertised app (product)
{{.CampaignID}}Campaign ID
{{.CampaignTitle}}Campaign name
{{.CampaignCreatedAt.Format "2006-01-02"}}Campaign creation date in 2024-02-07 format
{{.CreativeID}}ID of the main resource served in the creative (falls back to the creative ID)
{{.CampaignCreativeID}}ID of the creative in the campaign
{{.CreativeHash}}Creative hash
{{.CreativeType}}Creative type: banner / video / native
{{.EridToken}}ORD token
6
Bid & pricing
MacroDescription
{{.BidID}}Unique ID of the bid (and of the impression, click and install that follow it)
{{.PayoutCPI}}Payout CPI size
{{.Revenue}}Price of the event: per impression for CPM campaigns, per click for CPC campaigns
{{.RevenueCPM}}{{.Revenue}} multiplied by 1000 (price per 1000 impressions)
7
Trackers & links
MacroDescription
{{.Event}}Address of the Bidease event tracker
{{.Imp}}Address of the Bidease impression tracker
{{.Click}}Address of the click tracker
{{.TargetURL}}Link to the app in the store
8
Bid time

These macros are written without the dot: {{MACRO}}.

MacroDescription
{{time.Unix}}Bid time as a Unix timestamp
{{time.Format "2006-01-02"}}Bid time in 2024-02-07 format
9
Custom variables

You can use custom variables to pass hardcoded values for each campaign or creative, e.g. the campaign and creative names you want to see in your MMP. Create a custom variable:

■
In the Key field, specify the name of the macro (any name works)
■
In the Value field, specify its value

Then add the variable to the tracking link as {{.Var "VARIABLE_NAME"}}. Two common examples:

KeySet onExample valueMacro in the tracking link
CustomCampaignCampaignUS_iOS_Purchase{{.Var "CustomCampaign"}}
CustomCreativeResourceVideo_15s_v2{{.Var "CustomCreative"}}
ⓘ
Macros inside variables: a variable value can itself contain macros, e.g. {{.CampaignID}}_{{.Country}}; they are filled in at bid time.
10
Bindings

Bindings are also custom key–value pairs, set on the product or the campaign (the campaign value wins). In tracking links they are written as {{.Binding "BINDING_NAME"}}. A binding value can contain macros and custom variables, e.g. {{.Var "CustomCampaign"}}_{{.Exchange}}.

ⓘ
The main difference: bindings are written into the bid context, so you can later retrieve them in the Reporting API as a separate grouping with group-by-param=BINDING_NAME, e.g. &group-by-param=CustomCampaign.
Custom variablesBindings
Macro{{.Var "NAME"}}{{.Binding "NAME"}}
Set onCampaign / resourceProduct / campaign
Value can containMacrosMacros and {{.Var}}
In Reporting APINoYes, via group-by-param
⚠️
Separate namespaces: a value saved as a custom variable is not available through {{.Binding}}, and a binding is not available through {{.Var}}. Use the macro that matches where the value is set. A binding can use variables, but not the other way round: a variable cannot contain {{.Binding}}.
bidease
Grow Your App with Ease
Questions? Contact your Bidease account manager
support@bidease.com

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article