• 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="analytics_v3.html">Google Analytics API</a> . <a href="analytics_v3.provisioning.html">provisioning</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#createAccountTicket">createAccountTicket(body)</a></code></p>
79<p class="firstline">Creates an account ticket.</p>
80<p class="toc_element">
81  <code><a href="#createAccountTree">createAccountTree(body)</a></code></p>
82<p class="firstline">Provision account.</p>
83<h3>Method Details</h3>
84<div class="method">
85    <code class="details" id="createAccountTicket">createAccountTicket(body)</code>
86  <pre>Creates an account ticket.
87
88Args:
89  body: object, The request body. (required)
90    The object takes the form of:
91
92{ # JSON template for an Analytics account ticket. The account ticket consists of the ticket ID and the basic information for the account, property and profile.
93    "profile": { # JSON template for an Analytics view (profile). # View (Profile) for the account.
94        "currency": "A String", # The currency type associated with this view (profile), defaults to USD. The supported values are:
95            # USD, JPY, EUR, GBP, AUD, KRW, BRL, CNY, DKK, RUB, SEK, NOK, PLN, TRY, TWD, HKD, THB, IDR, ARS, MXN, VND, PHP, INR, CHF, CAD, CZK, NZD, HUF, BGN, LTL, ZAR, UAH, AED, BOB, CLP, COP, EGP, HRK, ILS, MAD, MYR, PEN, PKR, RON, RSD, SAR, SGD, VEF, LVL
96        "eCommerceTracking": True or False, # Indicates whether ecommerce tracking is enabled for this view (profile).
97        "webPropertyId": "A String", # Web property ID of the form UA-XXXXX-YY to which this view (profile) belongs.
98        "timezone": "A String", # Time zone for which this view (profile) has been configured. Time zones are identified by strings from the TZ database.
99        "id": "A String", # View (Profile) ID.
100        "accountId": "A String", # Account ID to which this view (profile) belongs.
101        "botFilteringEnabled": True or False, # Indicates whether bot filtering is enabled for this view (profile).
102        "stripSiteSearchCategoryParameters": True or False, # Whether or not Analytics will strip search category parameters from the URLs in your reports.
103        "siteSearchCategoryParameters": "A String", # Site search category parameters for this view (profile).
104        "type": "A String", # View (Profile) type. Supported types: WEB or APP.
105        "updated": "A String", # Time this view (profile) was last modified.
106        "excludeQueryParameters": "A String", # The query parameters that are excluded from this view (profile).
107        "internalWebPropertyId": "A String", # Internal ID for the web property to which this view (profile) belongs.
108        "childLink": { # Child link for this view (profile). Points to the list of goals for this view (profile).
109          "href": "A String", # Link to the list of goals for this view (profile).
110          "type": "analytics#goals", # Value is "analytics#goals".
111        },
112        "enhancedECommerceTracking": True or False, # Indicates whether enhanced ecommerce tracking is enabled for this view (profile). This property can only be enabled if ecommerce tracking is enabled.
113        "parentLink": { # Parent link for this view (profile). Points to the web property to which this view (profile) belongs.
114          "href": "A String", # Link to the web property to which this view (profile) belongs.
115          "type": "analytics#webproperty", # Value is "analytics#webproperty".
116        },
117        "permissions": { # Permissions the user has for this view (profile).
118          "effective": [ # All the permissions that the user has for this view (profile). These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions from the parent web property.
119            "A String",
120          ],
121        },
122        "defaultPage": "A String", # Default page for this view (profile).
123        "kind": "analytics#profile", # Resource type for Analytics view (profile).
124        "stripSiteSearchQueryParameters": True or False, # Whether or not Analytics will strip search query parameters from the URLs in your reports.
125        "name": "A String", # Name of this view (profile).
126        "created": "A String", # Time this view (profile) was created.
127        "siteSearchQueryParameters": "A String", # The site search query parameters for this view (profile).
128        "websiteUrl": "A String", # Website URL for this view (profile).
129        "starred": True or False, # Indicates whether this view (profile) is starred or not.
130        "selfLink": "A String", # Link for this view (profile).
131      },
132    "account": { # JSON template for Analytics account entry. # Account for this ticket.
133      "kind": "analytics#account", # Resource type for Analytics account.
134      "name": "A String", # Account name.
135      "created": "A String", # Time the account was created.
136      "updated": "A String", # Time the account was last modified.
137      "childLink": { # Child link for an account entry. Points to the list of web properties for this account.
138        "href": "A String", # Link to the list of web properties for this account.
139        "type": "analytics#webproperties", # Type of the child link. Its value is "analytics#webproperties".
140      },
141      "starred": True or False, # Indicates whether this account is starred or not.
142      "id": "A String", # Account ID.
143      "selfLink": "A String", # Link for this account.
144      "permissions": { # Permissions the user has for this account.
145        "effective": [ # All the permissions that the user has for this account. These include any implied permissions (e.g., EDIT implies VIEW).
146          "A String",
147        ],
148      },
149    },
150    "webproperty": { # JSON template for an Analytics web property. # Web property for the account.
151        "websiteUrl": "A String", # Website url for this web property.
152        "kind": "analytics#webproperty", # Resource type for Analytics WebProperty.
153        "name": "A String", # Name of this web property.
154        "dataRetentionTtl": "A String", # The length of time for which user and event data is retained.
155            # This property cannot be set on insert.
156        "created": "A String", # Time this web property was created.
157        "defaultProfileId": "A String", # Default view (profile) ID.
158        "level": "A String", # Level for this web property. Possible values are STANDARD or PREMIUM.
159        "updated": "A String", # Time this web property was last modified.
160        "profileCount": 42, # View (Profile) count for this web property.
161        "internalWebPropertyId": "A String", # Internal ID for this web property.
162        "childLink": { # Child link for this web property. Points to the list of views (profiles) for this web property.
163          "href": "A String", # Link to the list of views (profiles) for this web property.
164          "type": "analytics#profiles", # Type of the parent link. Its value is "analytics#profiles".
165        },
166        "industryVertical": "A String", # The industry vertical/category selected for this web property.
167        "dataRetentionResetOnNewActivity": True or False, # Set to true to reset the retention period of the user identifier with each new event from that user (thus setting the expiration date to current time plus retention period).
168            # Set to false to delete data associated with the user identifier automatically after the rentention period.
169            # This property cannot be set on insert.
170        "starred": True or False, # Indicates whether this web property is starred or not.
171        "parentLink": { # Parent link for this web property. Points to the account to which this web property belongs.
172          "href": "A String", # Link to the account for this web property.
173          "type": "analytics#account", # Type of the parent link. Its value is "analytics#account".
174        },
175        "permissions": { # Permissions the user has for this web property.
176          "effective": [ # All the permissions that the user has for this web property. These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions from the parent account.
177            "A String",
178          ],
179        },
180        "id": "A String", # Web property ID of the form UA-XXXXX-YY.
181        "selfLink": "A String", # Link for this web property.
182        "accountId": "A String", # Account ID to which this web property belongs.
183      },
184    "kind": "analytics#accountTicket", # Resource type for account ticket.
185    "redirectUri": "A String", # Redirect URI where the user will be sent after accepting Terms of Service. Must be configured in APIs console as a callback URL.
186    "id": "A String", # Account ticket ID used to access the account ticket.
187  }
188
189
190Returns:
191  An object of the form:
192
193    { # JSON template for an Analytics account ticket. The account ticket consists of the ticket ID and the basic information for the account, property and profile.
194      "profile": { # JSON template for an Analytics view (profile). # View (Profile) for the account.
195          "currency": "A String", # The currency type associated with this view (profile), defaults to USD. The supported values are:
196              # USD, JPY, EUR, GBP, AUD, KRW, BRL, CNY, DKK, RUB, SEK, NOK, PLN, TRY, TWD, HKD, THB, IDR, ARS, MXN, VND, PHP, INR, CHF, CAD, CZK, NZD, HUF, BGN, LTL, ZAR, UAH, AED, BOB, CLP, COP, EGP, HRK, ILS, MAD, MYR, PEN, PKR, RON, RSD, SAR, SGD, VEF, LVL
197          "eCommerceTracking": True or False, # Indicates whether ecommerce tracking is enabled for this view (profile).
198          "webPropertyId": "A String", # Web property ID of the form UA-XXXXX-YY to which this view (profile) belongs.
199          "timezone": "A String", # Time zone for which this view (profile) has been configured. Time zones are identified by strings from the TZ database.
200          "id": "A String", # View (Profile) ID.
201          "accountId": "A String", # Account ID to which this view (profile) belongs.
202          "botFilteringEnabled": True or False, # Indicates whether bot filtering is enabled for this view (profile).
203          "stripSiteSearchCategoryParameters": True or False, # Whether or not Analytics will strip search category parameters from the URLs in your reports.
204          "siteSearchCategoryParameters": "A String", # Site search category parameters for this view (profile).
205          "type": "A String", # View (Profile) type. Supported types: WEB or APP.
206          "updated": "A String", # Time this view (profile) was last modified.
207          "excludeQueryParameters": "A String", # The query parameters that are excluded from this view (profile).
208          "internalWebPropertyId": "A String", # Internal ID for the web property to which this view (profile) belongs.
209          "childLink": { # Child link for this view (profile). Points to the list of goals for this view (profile).
210            "href": "A String", # Link to the list of goals for this view (profile).
211            "type": "analytics#goals", # Value is "analytics#goals".
212          },
213          "enhancedECommerceTracking": True or False, # Indicates whether enhanced ecommerce tracking is enabled for this view (profile). This property can only be enabled if ecommerce tracking is enabled.
214          "parentLink": { # Parent link for this view (profile). Points to the web property to which this view (profile) belongs.
215            "href": "A String", # Link to the web property to which this view (profile) belongs.
216            "type": "analytics#webproperty", # Value is "analytics#webproperty".
217          },
218          "permissions": { # Permissions the user has for this view (profile).
219            "effective": [ # All the permissions that the user has for this view (profile). These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions from the parent web property.
220              "A String",
221            ],
222          },
223          "defaultPage": "A String", # Default page for this view (profile).
224          "kind": "analytics#profile", # Resource type for Analytics view (profile).
225          "stripSiteSearchQueryParameters": True or False, # Whether or not Analytics will strip search query parameters from the URLs in your reports.
226          "name": "A String", # Name of this view (profile).
227          "created": "A String", # Time this view (profile) was created.
228          "siteSearchQueryParameters": "A String", # The site search query parameters for this view (profile).
229          "websiteUrl": "A String", # Website URL for this view (profile).
230          "starred": True or False, # Indicates whether this view (profile) is starred or not.
231          "selfLink": "A String", # Link for this view (profile).
232        },
233      "account": { # JSON template for Analytics account entry. # Account for this ticket.
234        "kind": "analytics#account", # Resource type for Analytics account.
235        "name": "A String", # Account name.
236        "created": "A String", # Time the account was created.
237        "updated": "A String", # Time the account was last modified.
238        "childLink": { # Child link for an account entry. Points to the list of web properties for this account.
239          "href": "A String", # Link to the list of web properties for this account.
240          "type": "analytics#webproperties", # Type of the child link. Its value is "analytics#webproperties".
241        },
242        "starred": True or False, # Indicates whether this account is starred or not.
243        "id": "A String", # Account ID.
244        "selfLink": "A String", # Link for this account.
245        "permissions": { # Permissions the user has for this account.
246          "effective": [ # All the permissions that the user has for this account. These include any implied permissions (e.g., EDIT implies VIEW).
247            "A String",
248          ],
249        },
250      },
251      "webproperty": { # JSON template for an Analytics web property. # Web property for the account.
252          "websiteUrl": "A String", # Website url for this web property.
253          "kind": "analytics#webproperty", # Resource type for Analytics WebProperty.
254          "name": "A String", # Name of this web property.
255          "dataRetentionTtl": "A String", # The length of time for which user and event data is retained.
256              # This property cannot be set on insert.
257          "created": "A String", # Time this web property was created.
258          "defaultProfileId": "A String", # Default view (profile) ID.
259          "level": "A String", # Level for this web property. Possible values are STANDARD or PREMIUM.
260          "updated": "A String", # Time this web property was last modified.
261          "profileCount": 42, # View (Profile) count for this web property.
262          "internalWebPropertyId": "A String", # Internal ID for this web property.
263          "childLink": { # Child link for this web property. Points to the list of views (profiles) for this web property.
264            "href": "A String", # Link to the list of views (profiles) for this web property.
265            "type": "analytics#profiles", # Type of the parent link. Its value is "analytics#profiles".
266          },
267          "industryVertical": "A String", # The industry vertical/category selected for this web property.
268          "dataRetentionResetOnNewActivity": True or False, # Set to true to reset the retention period of the user identifier with each new event from that user (thus setting the expiration date to current time plus retention period).
269              # Set to false to delete data associated with the user identifier automatically after the rentention period.
270              # This property cannot be set on insert.
271          "starred": True or False, # Indicates whether this web property is starred or not.
272          "parentLink": { # Parent link for this web property. Points to the account to which this web property belongs.
273            "href": "A String", # Link to the account for this web property.
274            "type": "analytics#account", # Type of the parent link. Its value is "analytics#account".
275          },
276          "permissions": { # Permissions the user has for this web property.
277            "effective": [ # All the permissions that the user has for this web property. These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions from the parent account.
278              "A String",
279            ],
280          },
281          "id": "A String", # Web property ID of the form UA-XXXXX-YY.
282          "selfLink": "A String", # Link for this web property.
283          "accountId": "A String", # Account ID to which this web property belongs.
284        },
285      "kind": "analytics#accountTicket", # Resource type for account ticket.
286      "redirectUri": "A String", # Redirect URI where the user will be sent after accepting Terms of Service. Must be configured in APIs console as a callback URL.
287      "id": "A String", # Account ticket ID used to access the account ticket.
288    }</pre>
289</div>
290
291<div class="method">
292    <code class="details" id="createAccountTree">createAccountTree(body)</code>
293  <pre>Provision account.
294
295Args:
296  body: object, The request body. (required)
297    The object takes the form of:
298
299{ # JSON template for an Analytics account tree requests. The account tree request is used in the provisioning api to create an account, property, and view (profile). It contains the basic information required to make these fields.
300    "kind": "analytics#accountTreeRequest", # Resource type for account ticket.
301    "webpropertyName": "A String",
302    "accountName": "A String",
303    "websiteUrl": "A String",
304    "profileName": "A String",
305    "timezone": "A String",
306  }
307
308
309Returns:
310  An object of the form:
311
312    { # JSON template for an Analytics account tree response. The account tree response is used in the provisioning api to return the result of creating an account, property, and view (profile).
313    "profile": { # JSON template for an Analytics view (profile). # View (Profile) for the account.
314        "currency": "A String", # The currency type associated with this view (profile), defaults to USD. The supported values are:
315            # USD, JPY, EUR, GBP, AUD, KRW, BRL, CNY, DKK, RUB, SEK, NOK, PLN, TRY, TWD, HKD, THB, IDR, ARS, MXN, VND, PHP, INR, CHF, CAD, CZK, NZD, HUF, BGN, LTL, ZAR, UAH, AED, BOB, CLP, COP, EGP, HRK, ILS, MAD, MYR, PEN, PKR, RON, RSD, SAR, SGD, VEF, LVL
316        "eCommerceTracking": True or False, # Indicates whether ecommerce tracking is enabled for this view (profile).
317        "webPropertyId": "A String", # Web property ID of the form UA-XXXXX-YY to which this view (profile) belongs.
318        "timezone": "A String", # Time zone for which this view (profile) has been configured. Time zones are identified by strings from the TZ database.
319        "id": "A String", # View (Profile) ID.
320        "accountId": "A String", # Account ID to which this view (profile) belongs.
321        "botFilteringEnabled": True or False, # Indicates whether bot filtering is enabled for this view (profile).
322        "stripSiteSearchCategoryParameters": True or False, # Whether or not Analytics will strip search category parameters from the URLs in your reports.
323        "siteSearchCategoryParameters": "A String", # Site search category parameters for this view (profile).
324        "type": "A String", # View (Profile) type. Supported types: WEB or APP.
325        "updated": "A String", # Time this view (profile) was last modified.
326        "excludeQueryParameters": "A String", # The query parameters that are excluded from this view (profile).
327        "internalWebPropertyId": "A String", # Internal ID for the web property to which this view (profile) belongs.
328        "childLink": { # Child link for this view (profile). Points to the list of goals for this view (profile).
329          "href": "A String", # Link to the list of goals for this view (profile).
330          "type": "analytics#goals", # Value is "analytics#goals".
331        },
332        "enhancedECommerceTracking": True or False, # Indicates whether enhanced ecommerce tracking is enabled for this view (profile). This property can only be enabled if ecommerce tracking is enabled.
333        "parentLink": { # Parent link for this view (profile). Points to the web property to which this view (profile) belongs.
334          "href": "A String", # Link to the web property to which this view (profile) belongs.
335          "type": "analytics#webproperty", # Value is "analytics#webproperty".
336        },
337        "permissions": { # Permissions the user has for this view (profile).
338          "effective": [ # All the permissions that the user has for this view (profile). These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions from the parent web property.
339            "A String",
340          ],
341        },
342        "defaultPage": "A String", # Default page for this view (profile).
343        "kind": "analytics#profile", # Resource type for Analytics view (profile).
344        "stripSiteSearchQueryParameters": True or False, # Whether or not Analytics will strip search query parameters from the URLs in your reports.
345        "name": "A String", # Name of this view (profile).
346        "created": "A String", # Time this view (profile) was created.
347        "siteSearchQueryParameters": "A String", # The site search query parameters for this view (profile).
348        "websiteUrl": "A String", # Website URL for this view (profile).
349        "starred": True or False, # Indicates whether this view (profile) is starred or not.
350        "selfLink": "A String", # Link for this view (profile).
351      },
352    "account": { # JSON template for Analytics account entry. # The account created.
353      "kind": "analytics#account", # Resource type for Analytics account.
354      "name": "A String", # Account name.
355      "created": "A String", # Time the account was created.
356      "updated": "A String", # Time the account was last modified.
357      "childLink": { # Child link for an account entry. Points to the list of web properties for this account.
358        "href": "A String", # Link to the list of web properties for this account.
359        "type": "analytics#webproperties", # Type of the child link. Its value is "analytics#webproperties".
360      },
361      "starred": True or False, # Indicates whether this account is starred or not.
362      "id": "A String", # Account ID.
363      "selfLink": "A String", # Link for this account.
364      "permissions": { # Permissions the user has for this account.
365        "effective": [ # All the permissions that the user has for this account. These include any implied permissions (e.g., EDIT implies VIEW).
366          "A String",
367        ],
368      },
369    },
370    "webproperty": { # JSON template for an Analytics web property. # Web property for the account.
371        "websiteUrl": "A String", # Website url for this web property.
372        "kind": "analytics#webproperty", # Resource type for Analytics WebProperty.
373        "name": "A String", # Name of this web property.
374        "dataRetentionTtl": "A String", # The length of time for which user and event data is retained.
375            # This property cannot be set on insert.
376        "created": "A String", # Time this web property was created.
377        "defaultProfileId": "A String", # Default view (profile) ID.
378        "level": "A String", # Level for this web property. Possible values are STANDARD or PREMIUM.
379        "updated": "A String", # Time this web property was last modified.
380        "profileCount": 42, # View (Profile) count for this web property.
381        "internalWebPropertyId": "A String", # Internal ID for this web property.
382        "childLink": { # Child link for this web property. Points to the list of views (profiles) for this web property.
383          "href": "A String", # Link to the list of views (profiles) for this web property.
384          "type": "analytics#profiles", # Type of the parent link. Its value is "analytics#profiles".
385        },
386        "industryVertical": "A String", # The industry vertical/category selected for this web property.
387        "dataRetentionResetOnNewActivity": True or False, # Set to true to reset the retention period of the user identifier with each new event from that user (thus setting the expiration date to current time plus retention period).
388            # Set to false to delete data associated with the user identifier automatically after the rentention period.
389            # This property cannot be set on insert.
390        "starred": True or False, # Indicates whether this web property is starred or not.
391        "parentLink": { # Parent link for this web property. Points to the account to which this web property belongs.
392          "href": "A String", # Link to the account for this web property.
393          "type": "analytics#account", # Type of the parent link. Its value is "analytics#account".
394        },
395        "permissions": { # Permissions the user has for this web property.
396          "effective": [ # All the permissions that the user has for this web property. These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions from the parent account.
397            "A String",
398          ],
399        },
400        "id": "A String", # Web property ID of the form UA-XXXXX-YY.
401        "selfLink": "A String", # Link for this web property.
402        "accountId": "A String", # Account ID to which this web property belongs.
403      },
404    "kind": "analytics#accountTreeResponse", # Resource type for account ticket.
405  }</pre>
406</div>
407
408</body></html>