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