There are some resource properties in the Mopedo DSP, where it’s possible to make reference to other data sources by using path expression strings. The best example is bid rule conditions, where we use path expressions as the values of the
Here is the complete list of places where path expression strings can be used:
- In macros used in
- In macros used in
Path expressions are used to reference a property of some data source, and consist of the name of a data source, followed by names of properties divided by dots.
Available data sources
Used to denote the static
Example path expressions
Path expressions are case sensitive. For more information about the properties of the above data sources, see their respective documentation.
1 2 3 4 5 6 7 8 9 10 11 User.UserId Device.Geo.Longitude Site.Publisher.Domain Banner.Width Banner.AboveTheFold App.Bundle User.AdWinCount(ad001) // where ad001 is an ad id Device.Extension.deviceGroup Now.Hour Device.CreatedAt User.Extension.usergroup
For more examples, see the advertising example section of the documentation.
Sometimes it’s useful to insert values from path expressions straight into the
LandingPage strings of
Ad entities. This allows us to, for example, include banner ad slot dimensions in the call to an ad server, or insert user information in the URL that is called when a banner ad is clicked. To allow this, there is support for macros in the
LandingPage strings. All the data sources detailed above can be used for this. Macros have the following syntax:
1 $(<path expression>)
<path expression> is a path expression.
Using macros, we can insert the banner dimensions into an iframe in
1 "AdMarkup": "<iframe width='$(Banner.Width)' height='$(Banner.Height)' frameBorder='0' src='http://my-dsp.com/getmarkup?ad=0123&uid=$(User.Extension.UID)'> </iframe>"
In the example, we also include a
UID from the
UserExtension object belonging to the
User of the bid request in the call to the ad server.a