1<html><body> 2<style> 3 4body, h1, h2, h3, div, span, p, pre, a { 5 margin: 0; 6 padding: 0; 7 border: 0; 8 font-weight: inherit; 9 font-style: inherit; 10 font-size: 100%; 11 font-family: inherit; 12 vertical-align: baseline; 13} 14 15body { 16 font-size: 13px; 17 padding: 1em; 18} 19 20h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23} 24 25h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28} 29 30h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34} 35 36pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39} 40 41pre { 42 margin-top: 0.5em; 43} 44 45h1, h2, h3, p { 46 font-family: Arial, sans serif; 47} 48 49h1, h2, h3 { 50 border-bottom: solid #CCC 1px; 51} 52 53.toc_element { 54 margin-top: 0.5em; 55} 56 57.firstline { 58 margin-left: 2 em; 59} 60 61.method { 62 margin-top: 1em; 63 border: solid 1px #CCC; 64 padding: 1em; 65 background: #EEE; 66} 67 68.details { 69 font-weight: bold; 70 font-size: 14px; 71} 72 73</style> 74 75<h1><a href="dfareporting_v3_2.html">DCM/DFA Reporting And Trafficking API</a> . <a href="dfareporting_v3_2.conversions.html">conversions</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#batchinsert">batchinsert(profileId, body)</a></code></p> 79<p class="firstline">Inserts conversions.</p> 80<p class="toc_element"> 81 <code><a href="#batchupdate">batchupdate(profileId, body)</a></code></p> 82<p class="firstline">Updates existing conversions.</p> 83<h3>Method Details</h3> 84<div class="method"> 85 <code class="details" id="batchinsert">batchinsert(profileId, body)</code> 86 <pre>Inserts conversions. 87 88Args: 89 profileId: string, User profile ID associated with this request. (required) 90 body: object, The request body. (required) 91 The object takes the form of: 92 93{ # Insert Conversions Request. 94 "conversions": [ # The set of conversions to insert. 95 { # A Conversion represents when a user successfully performs a desired action after seeing an ad. 96 "ordinal": "A String", # The ordinal of the conversion. Use this field to control how conversions of the same user and day are de-duplicated. This is a required field. 97 "timestampMicros": "A String", # The timestamp of conversion, in Unix epoch micros. This is a required field. 98 "kind": "dfareporting#conversion", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#conversion". 99 "childDirectedTreatment": True or False, # Whether this particular request may come from a user under the age of 13, under COPPA compliance. 100 "encryptedUserId": "A String", # The alphanumeric encrypted user ID. When set, encryptionInfo should also be specified. This field is mutually exclusive with encryptedUserIdCandidates[], mobileDeviceId and gclid. This or encryptedUserIdCandidates[] or mobileDeviceId or gclid is a required field. 101 "treatmentForUnderage": True or False, # Whether this particular request may come from a user under the age of 16 (may differ by country), under compliance with the European Union's General Data Protection Regulation (GDPR). 102 "gclid": "A String", # The Google click ID. This field is mutually exclusive with encryptedUserId, encryptedUserIdCandidates[] and mobileDeviceId. This or encryptedUserId or encryptedUserIdCandidates[] or mobileDeviceId is a required field. 103 "customVariables": [ # Custom floodlight variables. 104 { # A custom floodlight variable. 105 "kind": "dfareporting#customFloodlightVariable", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#customFloodlightVariable". 106 "type": "A String", # The type of custom floodlight variable to supply a value for. These map to the "u[1-20]=" in the tags. 107 "value": "A String", # The value of the custom floodlight variable. The length of string must not exceed 50 characters. 108 }, 109 ], 110 "floodlightConfigurationId": "A String", # Floodlight Configuration ID of this conversion. This is a required field. 111 "mobileDeviceId": "A String", # The mobile device ID. This field is mutually exclusive with encryptedUserId, encryptedUserIdCandidates[] and gclid. This or encryptedUserId or encryptedUserIdCandidates[] or gclid is a required field. 112 "value": 3.14, # The value of the conversion. 113 "nonPersonalizedAd": True or False, # Whether the conversion was for a non personalized ad. 114 "limitAdTracking": True or False, # Whether Limit Ad Tracking is enabled. When set to true, the conversion will be used for reporting but not targeting. This will prevent remarketing. 115 "quantity": "A String", # The quantity of the conversion. 116 "floodlightActivityId": "A String", # Floodlight Activity ID of this conversion. This is a required field. 117 "encryptedUserIdCandidates": [ # A list of the alphanumeric encrypted user IDs. Any user ID with exposure prior to the conversion timestamp will be used in the inserted conversion. If no such user ID is found then the conversion will be rejected with NO_COOKIE_MATCH_FOUND error. When set, encryptionInfo should also be specified. This field may only be used when calling batchinsert; it is not supported by batchupdate. This field is mutually exclusive with encryptedUserId, mobileDeviceId and gclid. This or encryptedUserId or mobileDeviceId or gclid is a required field. 118 "A String", 119 ], 120 }, 121 ], 122 "kind": "dfareporting#conversionsBatchInsertRequest", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#conversionsBatchInsertRequest". 123 "encryptionInfo": { # A description of how user IDs are encrypted. # Describes how encryptedUserId or encryptedUserIdCandidates[] is encrypted. This is a required field if encryptedUserId or encryptedUserIdCandidates[] is used. 124 "kind": "dfareporting#encryptionInfo", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#encryptionInfo". 125 "encryptionEntityId": "A String", # The encryption entity ID. This should match the encryption configuration for ad serving or Data Transfer. 126 "encryptionSource": "A String", # Describes whether the encrypted cookie was received from ad serving (the %m macro) or from Data Transfer. 127 "encryptionEntityType": "A String", # The encryption entity type. This should match the encryption configuration for ad serving or Data Transfer. 128 }, 129 } 130 131 132Returns: 133 An object of the form: 134 135 { # Insert Conversions Response. 136 "status": [ # The insert status of each conversion. Statuses are returned in the same order that conversions are inserted. 137 { # The original conversion that was inserted or updated and whether there were any errors. 138 "conversion": { # A Conversion represents when a user successfully performs a desired action after seeing an ad. # The original conversion that was inserted or updated. 139 "ordinal": "A String", # The ordinal of the conversion. Use this field to control how conversions of the same user and day are de-duplicated. This is a required field. 140 "timestampMicros": "A String", # The timestamp of conversion, in Unix epoch micros. This is a required field. 141 "kind": "dfareporting#conversion", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#conversion". 142 "childDirectedTreatment": True or False, # Whether this particular request may come from a user under the age of 13, under COPPA compliance. 143 "encryptedUserId": "A String", # The alphanumeric encrypted user ID. When set, encryptionInfo should also be specified. This field is mutually exclusive with encryptedUserIdCandidates[], mobileDeviceId and gclid. This or encryptedUserIdCandidates[] or mobileDeviceId or gclid is a required field. 144 "treatmentForUnderage": True or False, # Whether this particular request may come from a user under the age of 16 (may differ by country), under compliance with the European Union's General Data Protection Regulation (GDPR). 145 "gclid": "A String", # The Google click ID. This field is mutually exclusive with encryptedUserId, encryptedUserIdCandidates[] and mobileDeviceId. This or encryptedUserId or encryptedUserIdCandidates[] or mobileDeviceId is a required field. 146 "customVariables": [ # Custom floodlight variables. 147 { # A custom floodlight variable. 148 "kind": "dfareporting#customFloodlightVariable", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#customFloodlightVariable". 149 "type": "A String", # The type of custom floodlight variable to supply a value for. These map to the "u[1-20]=" in the tags. 150 "value": "A String", # The value of the custom floodlight variable. The length of string must not exceed 50 characters. 151 }, 152 ], 153 "floodlightConfigurationId": "A String", # Floodlight Configuration ID of this conversion. This is a required field. 154 "mobileDeviceId": "A String", # The mobile device ID. This field is mutually exclusive with encryptedUserId, encryptedUserIdCandidates[] and gclid. This or encryptedUserId or encryptedUserIdCandidates[] or gclid is a required field. 155 "value": 3.14, # The value of the conversion. 156 "nonPersonalizedAd": True or False, # Whether the conversion was for a non personalized ad. 157 "limitAdTracking": True or False, # Whether Limit Ad Tracking is enabled. When set to true, the conversion will be used for reporting but not targeting. This will prevent remarketing. 158 "quantity": "A String", # The quantity of the conversion. 159 "floodlightActivityId": "A String", # Floodlight Activity ID of this conversion. This is a required field. 160 "encryptedUserIdCandidates": [ # A list of the alphanumeric encrypted user IDs. Any user ID with exposure prior to the conversion timestamp will be used in the inserted conversion. If no such user ID is found then the conversion will be rejected with NO_COOKIE_MATCH_FOUND error. When set, encryptionInfo should also be specified. This field may only be used when calling batchinsert; it is not supported by batchupdate. This field is mutually exclusive with encryptedUserId, mobileDeviceId and gclid. This or encryptedUserId or mobileDeviceId or gclid is a required field. 161 "A String", 162 ], 163 }, 164 "errors": [ # A list of errors related to this conversion. 165 { # The error code and description for a conversion that failed to insert or update. 166 "kind": "dfareporting#conversionError", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#conversionError". 167 "code": "A String", # The error code. 168 "message": "A String", # A description of the error. 169 }, 170 ], 171 "kind": "dfareporting#conversionStatus", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#conversionStatus". 172 }, 173 ], 174 "hasFailures": True or False, # Indicates that some or all conversions failed to insert. 175 "kind": "dfareporting#conversionsBatchInsertResponse", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#conversionsBatchInsertResponse". 176 }</pre> 177</div> 178 179<div class="method"> 180 <code class="details" id="batchupdate">batchupdate(profileId, body)</code> 181 <pre>Updates existing conversions. 182 183Args: 184 profileId: string, User profile ID associated with this request. (required) 185 body: object, The request body. (required) 186 The object takes the form of: 187 188{ # Update Conversions Request. 189 "conversions": [ # The set of conversions to update. 190 { # A Conversion represents when a user successfully performs a desired action after seeing an ad. 191 "ordinal": "A String", # The ordinal of the conversion. Use this field to control how conversions of the same user and day are de-duplicated. This is a required field. 192 "timestampMicros": "A String", # The timestamp of conversion, in Unix epoch micros. This is a required field. 193 "kind": "dfareporting#conversion", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#conversion". 194 "childDirectedTreatment": True or False, # Whether this particular request may come from a user under the age of 13, under COPPA compliance. 195 "encryptedUserId": "A String", # The alphanumeric encrypted user ID. When set, encryptionInfo should also be specified. This field is mutually exclusive with encryptedUserIdCandidates[], mobileDeviceId and gclid. This or encryptedUserIdCandidates[] or mobileDeviceId or gclid is a required field. 196 "treatmentForUnderage": True or False, # Whether this particular request may come from a user under the age of 16 (may differ by country), under compliance with the European Union's General Data Protection Regulation (GDPR). 197 "gclid": "A String", # The Google click ID. This field is mutually exclusive with encryptedUserId, encryptedUserIdCandidates[] and mobileDeviceId. This or encryptedUserId or encryptedUserIdCandidates[] or mobileDeviceId is a required field. 198 "customVariables": [ # Custom floodlight variables. 199 { # A custom floodlight variable. 200 "kind": "dfareporting#customFloodlightVariable", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#customFloodlightVariable". 201 "type": "A String", # The type of custom floodlight variable to supply a value for. These map to the "u[1-20]=" in the tags. 202 "value": "A String", # The value of the custom floodlight variable. The length of string must not exceed 50 characters. 203 }, 204 ], 205 "floodlightConfigurationId": "A String", # Floodlight Configuration ID of this conversion. This is a required field. 206 "mobileDeviceId": "A String", # The mobile device ID. This field is mutually exclusive with encryptedUserId, encryptedUserIdCandidates[] and gclid. This or encryptedUserId or encryptedUserIdCandidates[] or gclid is a required field. 207 "value": 3.14, # The value of the conversion. 208 "nonPersonalizedAd": True or False, # Whether the conversion was for a non personalized ad. 209 "limitAdTracking": True or False, # Whether Limit Ad Tracking is enabled. When set to true, the conversion will be used for reporting but not targeting. This will prevent remarketing. 210 "quantity": "A String", # The quantity of the conversion. 211 "floodlightActivityId": "A String", # Floodlight Activity ID of this conversion. This is a required field. 212 "encryptedUserIdCandidates": [ # A list of the alphanumeric encrypted user IDs. Any user ID with exposure prior to the conversion timestamp will be used in the inserted conversion. If no such user ID is found then the conversion will be rejected with NO_COOKIE_MATCH_FOUND error. When set, encryptionInfo should also be specified. This field may only be used when calling batchinsert; it is not supported by batchupdate. This field is mutually exclusive with encryptedUserId, mobileDeviceId and gclid. This or encryptedUserId or mobileDeviceId or gclid is a required field. 213 "A String", 214 ], 215 }, 216 ], 217 "kind": "dfareporting#conversionsBatchUpdateRequest", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#conversionsBatchUpdateRequest". 218 "encryptionInfo": { # A description of how user IDs are encrypted. # Describes how encryptedUserId is encrypted. This is a required field if encryptedUserId is used. 219 "kind": "dfareporting#encryptionInfo", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#encryptionInfo". 220 "encryptionEntityId": "A String", # The encryption entity ID. This should match the encryption configuration for ad serving or Data Transfer. 221 "encryptionSource": "A String", # Describes whether the encrypted cookie was received from ad serving (the %m macro) or from Data Transfer. 222 "encryptionEntityType": "A String", # The encryption entity type. This should match the encryption configuration for ad serving or Data Transfer. 223 }, 224 } 225 226 227Returns: 228 An object of the form: 229 230 { # Update Conversions Response. 231 "status": [ # The update status of each conversion. Statuses are returned in the same order that conversions are updated. 232 { # The original conversion that was inserted or updated and whether there were any errors. 233 "conversion": { # A Conversion represents when a user successfully performs a desired action after seeing an ad. # The original conversion that was inserted or updated. 234 "ordinal": "A String", # The ordinal of the conversion. Use this field to control how conversions of the same user and day are de-duplicated. This is a required field. 235 "timestampMicros": "A String", # The timestamp of conversion, in Unix epoch micros. This is a required field. 236 "kind": "dfareporting#conversion", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#conversion". 237 "childDirectedTreatment": True or False, # Whether this particular request may come from a user under the age of 13, under COPPA compliance. 238 "encryptedUserId": "A String", # The alphanumeric encrypted user ID. When set, encryptionInfo should also be specified. This field is mutually exclusive with encryptedUserIdCandidates[], mobileDeviceId and gclid. This or encryptedUserIdCandidates[] or mobileDeviceId or gclid is a required field. 239 "treatmentForUnderage": True or False, # Whether this particular request may come from a user under the age of 16 (may differ by country), under compliance with the European Union's General Data Protection Regulation (GDPR). 240 "gclid": "A String", # The Google click ID. This field is mutually exclusive with encryptedUserId, encryptedUserIdCandidates[] and mobileDeviceId. This or encryptedUserId or encryptedUserIdCandidates[] or mobileDeviceId is a required field. 241 "customVariables": [ # Custom floodlight variables. 242 { # A custom floodlight variable. 243 "kind": "dfareporting#customFloodlightVariable", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#customFloodlightVariable". 244 "type": "A String", # The type of custom floodlight variable to supply a value for. These map to the "u[1-20]=" in the tags. 245 "value": "A String", # The value of the custom floodlight variable. The length of string must not exceed 50 characters. 246 }, 247 ], 248 "floodlightConfigurationId": "A String", # Floodlight Configuration ID of this conversion. This is a required field. 249 "mobileDeviceId": "A String", # The mobile device ID. This field is mutually exclusive with encryptedUserId, encryptedUserIdCandidates[] and gclid. This or encryptedUserId or encryptedUserIdCandidates[] or gclid is a required field. 250 "value": 3.14, # The value of the conversion. 251 "nonPersonalizedAd": True or False, # Whether the conversion was for a non personalized ad. 252 "limitAdTracking": True or False, # Whether Limit Ad Tracking is enabled. When set to true, the conversion will be used for reporting but not targeting. This will prevent remarketing. 253 "quantity": "A String", # The quantity of the conversion. 254 "floodlightActivityId": "A String", # Floodlight Activity ID of this conversion. This is a required field. 255 "encryptedUserIdCandidates": [ # A list of the alphanumeric encrypted user IDs. Any user ID with exposure prior to the conversion timestamp will be used in the inserted conversion. If no such user ID is found then the conversion will be rejected with NO_COOKIE_MATCH_FOUND error. When set, encryptionInfo should also be specified. This field may only be used when calling batchinsert; it is not supported by batchupdate. This field is mutually exclusive with encryptedUserId, mobileDeviceId and gclid. This or encryptedUserId or mobileDeviceId or gclid is a required field. 256 "A String", 257 ], 258 }, 259 "errors": [ # A list of errors related to this conversion. 260 { # The error code and description for a conversion that failed to insert or update. 261 "kind": "dfareporting#conversionError", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#conversionError". 262 "code": "A String", # The error code. 263 "message": "A String", # A description of the error. 264 }, 265 ], 266 "kind": "dfareporting#conversionStatus", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#conversionStatus". 267 }, 268 ], 269 "hasFailures": True or False, # Indicates that some or all conversions failed to update. 270 "kind": "dfareporting#conversionsBatchUpdateResponse", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#conversionsBatchUpdateResponse". 271 }</pre> 272</div> 273 274</body></html>