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_v2_8.html">DCM/DFA Reporting And Trafficking API</a> . <a href="dfareporting_v2_8.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 the conversion was directed toward children. 100 "encryptedUserId": "A String", # The alphanumeric encrypted user ID. When set, encryptionInfo should also be specified. This field is mutually exclusive with encryptedUserIdCandidates[] and mobileDeviceId. This or encryptedUserIdCandidates[] or mobileDeviceId is a required field. 101 "customVariables": [ # Custom floodlight variables. 102 { # A custom floodlight variable. 103 "kind": "dfareporting#customFloodlightVariable", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#customFloodlightVariable". 104 "type": "A String", # The type of custom floodlight variable to supply a value for. These map to the "u[1-20]=" in the tags. 105 "value": "A String", # The value of the custom floodlight variable. The length of string must not exceed 50 characters. 106 }, 107 ], 108 "floodlightConfigurationId": "A String", # Floodlight Configuration ID of this conversion. This is a required field. 109 "mobileDeviceId": "A String", # The mobile device ID. This field is mutually exclusive with encryptedUserId and encryptedUserIdCandidates[]. This or encryptedUserId or encryptedUserIdCandidates[] is a required field. 110 "value": 3.14, # The value of the conversion. 111 "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. 112 "quantity": "A String", # The quantity of the conversion. 113 "floodlightActivityId": "A String", # Floodlight Activity ID of this conversion. This is a required field. 114 "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 and mobileDeviceId. This or encryptedUserId or mobileDeviceId is a required field. 115 "A String", 116 ], 117 }, 118 ], 119 "kind": "dfareporting#conversionsBatchInsertRequest", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#conversionsBatchInsertRequest". 120 "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. 121 "kind": "dfareporting#encryptionInfo", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#encryptionInfo". 122 "encryptionEntityId": "A String", # The encryption entity ID. This should match the encryption configuration for ad serving or Data Transfer. 123 "encryptionSource": "A String", # Describes whether the encrypted cookie was received from ad serving (the %m macro) or from Data Transfer. 124 "encryptionEntityType": "A String", # The encryption entity type. This should match the encryption configuration for ad serving or Data Transfer. 125 }, 126 } 127 128 129Returns: 130 An object of the form: 131 132 { # Insert Conversions Response. 133 "status": [ # The insert status of each conversion. Statuses are returned in the same order that conversions are inserted. 134 { # The original conversion that was inserted or updated and whether there were any errors. 135 "conversion": { # A Conversion represents when a user successfully performs a desired action after seeing an ad. # The original conversion that was inserted or updated. 136 "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. 137 "timestampMicros": "A String", # The timestamp of conversion, in Unix epoch micros. This is a required field. 138 "kind": "dfareporting#conversion", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#conversion". 139 "childDirectedTreatment": True or False, # Whether the conversion was directed toward children. 140 "encryptedUserId": "A String", # The alphanumeric encrypted user ID. When set, encryptionInfo should also be specified. This field is mutually exclusive with encryptedUserIdCandidates[] and mobileDeviceId. This or encryptedUserIdCandidates[] or mobileDeviceId is a required field. 141 "customVariables": [ # Custom floodlight variables. 142 { # A custom floodlight variable. 143 "kind": "dfareporting#customFloodlightVariable", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#customFloodlightVariable". 144 "type": "A String", # The type of custom floodlight variable to supply a value for. These map to the "u[1-20]=" in the tags. 145 "value": "A String", # The value of the custom floodlight variable. The length of string must not exceed 50 characters. 146 }, 147 ], 148 "floodlightConfigurationId": "A String", # Floodlight Configuration ID of this conversion. This is a required field. 149 "mobileDeviceId": "A String", # The mobile device ID. This field is mutually exclusive with encryptedUserId and encryptedUserIdCandidates[]. This or encryptedUserId or encryptedUserIdCandidates[] is a required field. 150 "value": 3.14, # The value of the conversion. 151 "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. 152 "quantity": "A String", # The quantity of the conversion. 153 "floodlightActivityId": "A String", # Floodlight Activity ID of this conversion. This is a required field. 154 "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 and mobileDeviceId. This or encryptedUserId or mobileDeviceId is a required field. 155 "A String", 156 ], 157 }, 158 "errors": [ # A list of errors related to this conversion. 159 { # The error code and description for a conversion that failed to insert or update. 160 "kind": "dfareporting#conversionError", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#conversionError". 161 "code": "A String", # The error code. 162 "message": "A String", # A description of the error. 163 }, 164 ], 165 "kind": "dfareporting#conversionStatus", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#conversionStatus". 166 }, 167 ], 168 "hasFailures": True or False, # Indicates that some or all conversions failed to insert. 169 "kind": "dfareporting#conversionsBatchInsertResponse", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#conversionsBatchInsertResponse". 170 }</pre> 171</div> 172 173<div class="method"> 174 <code class="details" id="batchupdate">batchupdate(profileId, body)</code> 175 <pre>Updates existing conversions. 176 177Args: 178 profileId: string, User profile ID associated with this request. (required) 179 body: object, The request body. (required) 180 The object takes the form of: 181 182{ # Update Conversions Request. 183 "conversions": [ # The set of conversions to update. 184 { # A Conversion represents when a user successfully performs a desired action after seeing an ad. 185 "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. 186 "timestampMicros": "A String", # The timestamp of conversion, in Unix epoch micros. This is a required field. 187 "kind": "dfareporting#conversion", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#conversion". 188 "childDirectedTreatment": True or False, # Whether the conversion was directed toward children. 189 "encryptedUserId": "A String", # The alphanumeric encrypted user ID. When set, encryptionInfo should also be specified. This field is mutually exclusive with encryptedUserIdCandidates[] and mobileDeviceId. This or encryptedUserIdCandidates[] or mobileDeviceId is a required field. 190 "customVariables": [ # Custom floodlight variables. 191 { # A custom floodlight variable. 192 "kind": "dfareporting#customFloodlightVariable", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#customFloodlightVariable". 193 "type": "A String", # The type of custom floodlight variable to supply a value for. These map to the "u[1-20]=" in the tags. 194 "value": "A String", # The value of the custom floodlight variable. The length of string must not exceed 50 characters. 195 }, 196 ], 197 "floodlightConfigurationId": "A String", # Floodlight Configuration ID of this conversion. This is a required field. 198 "mobileDeviceId": "A String", # The mobile device ID. This field is mutually exclusive with encryptedUserId and encryptedUserIdCandidates[]. This or encryptedUserId or encryptedUserIdCandidates[] is a required field. 199 "value": 3.14, # The value of the conversion. 200 "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. 201 "quantity": "A String", # The quantity of the conversion. 202 "floodlightActivityId": "A String", # Floodlight Activity ID of this conversion. This is a required field. 203 "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 and mobileDeviceId. This or encryptedUserId or mobileDeviceId is a required field. 204 "A String", 205 ], 206 }, 207 ], 208 "kind": "dfareporting#conversionsBatchUpdateRequest", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#conversionsBatchUpdateRequest". 209 "encryptionInfo": { # A description of how user IDs are encrypted. # Describes how encryptedUserId is encrypted. This is a required field if encryptedUserId is used. 210 "kind": "dfareporting#encryptionInfo", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#encryptionInfo". 211 "encryptionEntityId": "A String", # The encryption entity ID. This should match the encryption configuration for ad serving or Data Transfer. 212 "encryptionSource": "A String", # Describes whether the encrypted cookie was received from ad serving (the %m macro) or from Data Transfer. 213 "encryptionEntityType": "A String", # The encryption entity type. This should match the encryption configuration for ad serving or Data Transfer. 214 }, 215 } 216 217 218Returns: 219 An object of the form: 220 221 { # Update Conversions Response. 222 "status": [ # The update status of each conversion. Statuses are returned in the same order that conversions are updated. 223 { # The original conversion that was inserted or updated and whether there were any errors. 224 "conversion": { # A Conversion represents when a user successfully performs a desired action after seeing an ad. # The original conversion that was inserted or updated. 225 "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. 226 "timestampMicros": "A String", # The timestamp of conversion, in Unix epoch micros. This is a required field. 227 "kind": "dfareporting#conversion", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#conversion". 228 "childDirectedTreatment": True or False, # Whether the conversion was directed toward children. 229 "encryptedUserId": "A String", # The alphanumeric encrypted user ID. When set, encryptionInfo should also be specified. This field is mutually exclusive with encryptedUserIdCandidates[] and mobileDeviceId. This or encryptedUserIdCandidates[] or mobileDeviceId is a required field. 230 "customVariables": [ # Custom floodlight variables. 231 { # A custom floodlight variable. 232 "kind": "dfareporting#customFloodlightVariable", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#customFloodlightVariable". 233 "type": "A String", # The type of custom floodlight variable to supply a value for. These map to the "u[1-20]=" in the tags. 234 "value": "A String", # The value of the custom floodlight variable. The length of string must not exceed 50 characters. 235 }, 236 ], 237 "floodlightConfigurationId": "A String", # Floodlight Configuration ID of this conversion. This is a required field. 238 "mobileDeviceId": "A String", # The mobile device ID. This field is mutually exclusive with encryptedUserId and encryptedUserIdCandidates[]. This or encryptedUserId or encryptedUserIdCandidates[] is a required field. 239 "value": 3.14, # The value of the conversion. 240 "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. 241 "quantity": "A String", # The quantity of the conversion. 242 "floodlightActivityId": "A String", # Floodlight Activity ID of this conversion. This is a required field. 243 "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 and mobileDeviceId. This or encryptedUserId or mobileDeviceId is a required field. 244 "A String", 245 ], 246 }, 247 "errors": [ # A list of errors related to this conversion. 248 { # The error code and description for a conversion that failed to insert or update. 249 "kind": "dfareporting#conversionError", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#conversionError". 250 "code": "A String", # The error code. 251 "message": "A String", # A description of the error. 252 }, 253 ], 254 "kind": "dfareporting#conversionStatus", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#conversionStatus". 255 }, 256 ], 257 "hasFailures": True or False, # Indicates that some or all conversions failed to update. 258 "kind": "dfareporting#conversionsBatchUpdateResponse", # Identifies what kind of resource this is. Value: the fixed string "dfareporting#conversionsBatchUpdateResponse". 259 }</pre> 260</div> 261 262</body></html>