{"_id":"5693cb3a237d3b0d00740650","__v":14,"parentDoc":null,"project":"564621e00c30fb2100ba3814","category":{"_id":"56858767d96a760d00545da6","project":"564621e00c30fb2100ba3814","version":"564621e10c30fb2100ba3817","__v":5,"pages":["568587afa3c7070d003dd7a8","5685979c3703ed1700e420bf","56859893d96a760d00545db9","5693c1d03e9d080d00f0641f","5693cb3a237d3b0d00740650"],"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-12-31T19:52:07.609Z","from_sync":false,"order":5,"slug":"mobfox-demand-side-platform","title":"Advertiser Resources"},"user":"56499dade2efd717002afc83","version":{"_id":"564621e10c30fb2100ba3817","__v":14,"project":"564621e00c30fb2100ba3814","createdAt":"2015-11-13T17:46:09.275Z","releaseDate":"2015-11-13T17:46:09.275Z","categories":["564621e10c30fb2100ba3818","564624cf0c30fb2100ba3822","564628d69f3f550d00fa3db6","564dafeeda00e82b00ed601d","564daff8fc36dc3700882b95","564db0ccda00e82b00ed601f","564dcf87d3320b0d0028ca10","5661a6e436398e0d00f79566","568585153703ed1700e420b0","56858767d96a760d00545da6","56858d693703ed1700e420b2","56858d8d22c41b0d00e4666c","56859e9c009a8d0d00797130","5685a6453703ed1700e420d3"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-01-11T15:33:14.587Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":true,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"Custom Macros are stored in the HTML of an ad unit.  Custom Macros are replaced by the DSP right before an ad serves.\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"${MF_AGE}\",\n    \"0-1\": \"Integer\",\n    \"0-2\": \"User year of birth. Value taken from RTB user.yob (e.g. 1985).\",\n    \"1-0\": \"${MF_GENDER}\",\n    \"1-1\": \"String (m or f)\",\n    \"1-2\": \"Replaced with RTP user.gender\",\n    \"2-0\": \"${MF_URL}\",\n    \"2-1\": \"String\",\n    \"2-2\": \"Publication URL value taken from RTP site.page (in the case of site) or app.storeurl (in the case of an app).\",\n    \"3-0\": \"${MF_USER_AGENT}\",\n    \"3-1\": \"String\",\n    \"3-2\": \"Replaced with RTB device.ua\",\n    \"4-0\": \"${MF_LAT}\",\n    \"4-1\": \"Float\",\n    \"4-2\": \"Replaced with RTP device.geo.lat\",\n    \"5-0\": \"${MF_LONG}\",\n    \"5-1\": \"Float\",\n    \"5-2\": \"Replaced with RTB device.geo.lon\",\n    \"6-0\": \"${MF_ADSPACE_WIDTH}\",\n    \"6-1\": \"Integer\",\n    \"6-2\": \"Replaced with RTB imp.banner.w or imp.video.w\",\n    \"7-0\": \"${MF_ADSPACE_HEIGHT}\",\n    \"7-1\": \"Integer\",\n    \"7-2\": \"Replaced with RTB imp.banner.h or imp.video.h\",\n    \"8-0\": \"${MF_IFA}\",\n    \"8-1\": \"String\",\n    \"8-2\": \"Advertising ID (IDFA or GAID) taken from RTB ext.udi.gaid (for Android) or ext.udi.o_iosadvid (for iOS)\",\n    \"9-0\": \"${MF_OS}\",\n    \"9-1\": \"String\",\n    \"9-2\": \"Replaced with RTB device.os\",\n    \"10-0\": \"${MF_DEVICE_BRAND}\",\n    \"10-1\": \"String\",\n    \"10-2\": \"Replaced with RTB device.make\",\n    \"11-0\": \"${MF_DEVICE_MODEL}\",\n    \"11-1\": \"String\",\n    \"11-2\": \"Replaced with RTB device.model\",\n    \"12-0\": \"${MF_PUBLICATION_NAME}\",\n    \"12-1\": \"String\",\n    \"12-2\": \"Replaced with RTB site.name or app.name\",\n    \"13-0\": \"${MFOXCLICKURL}\",\n    \"13-1\": \"String\",\n    \"13-2\": \"Click URL of the served ad\",\n    \"14-0\": \"${MFOXCLICKID}\",\n    \"14-1\": \"String\",\n    \"14-2\": \"Internal click ID of the served ad\",\n    \"15-0\": \"${MFOXPUBID}\",\n    \"15-1\": \"String\",\n    \"15-2\": \"Replaced with RTB site.id or app.id\",\n    \"16-0\": \"${MF_TS}\",\n    \"16-1\": \"Integer\",\n    \"16-2\": \"This macro will be replaced with the unix timestamp value.\",\n    \"17-0\": \"${MF_IP_ADDRESS}\",\n    \"17-1\": \"String\",\n    \"17-2\": \"Replaced with RTB device.ip\",\n    \"18-0\": \"${MF_REF}\",\n    \"19-0\": \"${MF_CACHEBUSTER}\",\n    \"20-0\": \"${RANDOMNR}\",\n    \"21-0\": \"${MF_BUNDLE_ID}\",\n    \"22-0\": \"${MF_APP_STORE_URL}\",\n    \"18-1\": \"String\",\n    \"19-1\": \"String\",\n    \"20-1\": \"Integer\",\n    \"21-1\": \"String\",\n    \"22-1\": \"String\",\n    \"18-2\": \"Replaced with RTB site.ref\",\n    \"19-2\": \"Unique MD5 generated string as cache-breaker\",\n    \"20-2\": \"Will be replaced by a random number\",\n    \"21-2\": \"Replaced with RTB app.bundle\",\n    \"22-2\": \"Replaced with RTB app.storeurl\",\n    \"h-0\": \"Macro\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\"\n  },\n  \"cols\": 3,\n  \"rows\": 23\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Example of custom macro in an ad unit\"\n}\n[/block]\nCustom macro text is embedded in the HTML of an ad unit as shown in the example below. \n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/1evCSoo4T8sTLsTF0Xc9_Screen%20Shot%202016-01-13%20at%2015.58.35.png\",\n        \"Screen Shot 2016-01-13 at 15.58.35.png\",\n        \"1678\",\n        \"722\",\n        \"\",\n        \"\"\n      ],\n      \"border\": true\n    }\n  ]\n}\n[/block]","excerpt":"Placeholders which will be replaced in the final markup before serving","slug":"custom-macros","type":"basic","title":"Markup Macros"}

Markup Macros

Placeholders which will be replaced in the final markup before serving

Custom Macros are stored in the HTML of an ad unit. Custom Macros are replaced by the DSP right before an ad serves. [block:parameters] { "data": { "0-0": "${MF_AGE}", "0-1": "Integer", "0-2": "User year of birth. Value taken from RTB user.yob (e.g. 1985).", "1-0": "${MF_GENDER}", "1-1": "String (m or f)", "1-2": "Replaced with RTP user.gender", "2-0": "${MF_URL}", "2-1": "String", "2-2": "Publication URL value taken from RTP site.page (in the case of site) or app.storeurl (in the case of an app).", "3-0": "${MF_USER_AGENT}", "3-1": "String", "3-2": "Replaced with RTB device.ua", "4-0": "${MF_LAT}", "4-1": "Float", "4-2": "Replaced with RTP device.geo.lat", "5-0": "${MF_LONG}", "5-1": "Float", "5-2": "Replaced with RTB device.geo.lon", "6-0": "${MF_ADSPACE_WIDTH}", "6-1": "Integer", "6-2": "Replaced with RTB imp.banner.w or imp.video.w", "7-0": "${MF_ADSPACE_HEIGHT}", "7-1": "Integer", "7-2": "Replaced with RTB imp.banner.h or imp.video.h", "8-0": "${MF_IFA}", "8-1": "String", "8-2": "Advertising ID (IDFA or GAID) taken from RTB ext.udi.gaid (for Android) or ext.udi.o_iosadvid (for iOS)", "9-0": "${MF_OS}", "9-1": "String", "9-2": "Replaced with RTB device.os", "10-0": "${MF_DEVICE_BRAND}", "10-1": "String", "10-2": "Replaced with RTB device.make", "11-0": "${MF_DEVICE_MODEL}", "11-1": "String", "11-2": "Replaced with RTB device.model", "12-0": "${MF_PUBLICATION_NAME}", "12-1": "String", "12-2": "Replaced with RTB site.name or app.name", "13-0": "${MFOXCLICKURL}", "13-1": "String", "13-2": "Click URL of the served ad", "14-0": "${MFOXCLICKID}", "14-1": "String", "14-2": "Internal click ID of the served ad", "15-0": "${MFOXPUBID}", "15-1": "String", "15-2": "Replaced with RTB site.id or app.id", "16-0": "${MF_TS}", "16-1": "Integer", "16-2": "This macro will be replaced with the unix timestamp value.", "17-0": "${MF_IP_ADDRESS}", "17-1": "String", "17-2": "Replaced with RTB device.ip", "18-0": "${MF_REF}", "19-0": "${MF_CACHEBUSTER}", "20-0": "${RANDOMNR}", "21-0": "${MF_BUNDLE_ID}", "22-0": "${MF_APP_STORE_URL}", "18-1": "String", "19-1": "String", "20-1": "Integer", "21-1": "String", "22-1": "String", "18-2": "Replaced with RTB site.ref", "19-2": "Unique MD5 generated string as cache-breaker", "20-2": "Will be replaced by a random number", "21-2": "Replaced with RTB app.bundle", "22-2": "Replaced with RTB app.storeurl", "h-0": "Macro", "h-1": "Type", "h-2": "Description" }, "cols": 3, "rows": 23 } [/block] [block:api-header] { "type": "basic", "title": "Example of custom macro in an ad unit" } [/block] Custom macro text is embedded in the HTML of an ad unit as shown in the example below. [block:image] { "images": [ { "image": [ "https://files.readme.io/1evCSoo4T8sTLsTF0Xc9_Screen%20Shot%202016-01-13%20at%2015.58.35.png", "Screen Shot 2016-01-13 at 15.58.35.png", "1678", "722", "", "" ], "border": true } ] } [/block]