The code snippets below illustrate the dynamic_fields
property in both the metadata
section (1st tab) and results
array (2nd tab). (The 3rd tab shows the custom audience rule that gave rise to the custom conversion columns.)
Note the following:
- There are
metadata
definitions for each of the 4 metric types (Conversions, CVR, CAP and Value). - For each of the 4 metric types, there are actually 3 metadata definitions - overall, clicks and views. (Thus, in total, there are 12 definitions.)
- The
id
defined in themetadata
section (1st tab) is referenced by the rows in theresults
array (2nd tab). In theresults
array, each row (object) contains a custom columnid
andvalue
.
{
// Additional fields omitted...
"recordCount": 8,
"metadata": {
"total": 8,
"count": 8,
"dynamic_fields": [
{
"id": "747539550",
"format": "d",
"data_type": "NUMERIC",
"caption": "single ring page: Conversions"
},
{
"id": "747539551",
"format": "d",
"data_type": "NUMERIC",
"caption": "single ring page: Conversions (Clicks)"
},
{
"id": "747539552",
"format": "d",
"data_type": "NUMERIC",
"caption": "single ring page: Conversions (Views)"
},
{
"id": "747539553",
"format": ".2f",
"data_type": "PERCENT",
"caption": "single ring page: CVR"
},
{
"id": "747539554",
"format": ".2f",
"data_type": "PERCENT",
"caption": "single ring page: CVR (Clicks)"
},
{
"id": "747539555",
"format": ".2f",
"data_type": "PERCENT",
"caption": "single ring page: CVR (Views)"
},
{
"id": "747539556",
"format": ".3f",
"data_type": "MONEY",
"caption": "single ring page: CPA"
},
{
"id": "747539557",
"format": ".3f",
"data_type": "MONEY",
"caption": "single ring page: CPA (Clicks)"
},
{
"id": "747539558",
"format": ".3f",
"data_type": "MONEY",
"caption": "single ring page: CPA (Views)"
},
{
"id": "747539559",
"format": ".2f",
"data_type": "MONEY",
"caption": "single ring page: Value"
},
{
"id": "747539560",
"format": ".2f",
"data_type": "MONEY",
"caption": "single ring page: Value (Clicks)"
},
{
"id": "747539561",
"format": ".2f",
"data_type": "MONEY",
"caption": "single ring page: Value (Views)"
}
// Additional custom column definitions omitted...
]
}
}
{
"last-used-rawdata-update-time": "2019-12-18 09:00:00.0",
"last-used-rawdata-update-time-gmt-millisec": 1576677600000,
"timezone": "EST",
"results": [
{
"date": "2019-12-18 00:00:00.0",
"clicks": 1,
"impressions": 60,
// Additional fields for this row omitted...
"dynamic_fields": [
{
"id": "747539550",
"value": 1
},
{
"id": "747539551",
"value": 1
},
{
"id": "747539552",
"value": 1
},
{
"id": "747539553",
"value": 100
},
{
"id": "747539554",
"value": 100
},
{
"id": "747539555",
"value": 100
},
{
"id": "747539556",
"value": 0.073
},
{
"id": "747539557",
"value": 0.073
},
{
"id": "747539558",
"value": 0.073
},
{
"id": "747539559",
"value": 0
},
{
"id": "747539560",
"value": 0
},
{
"id": "747539561",
"value": 0
}
// Additional custom columns for this row omitted...
]
}
// Additional rows (objects) omitted...
]
}
{
"id": 6789,
"display_name": "single ring page",
"look_back_window": 30,
"category": "VIEW_CONTENT",
"status": "ACTIVE",
"type": "BASIC",
"event_name": "page_view",
"condition": {
"property": "URL",
"predicate": "CONTAINS",
"value": "-detail",
"children": []
},
"effects": [],
"include_in_total_conversions": true,
"exclude_from_campaigns": false,
"description": null,
"advertiser_id": "demo-account",
"last_modified_by": "[email protected]",
"last_modified_at": "2019-11-27"
}
For the precise schema definitions, see: