blob: a09c05bef55978d7c978fbe06e1224bddc513ec9 [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<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.management.html">management</a> . <a href="analytics_v3.management.goals.html">goals</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#get">get(accountId, webPropertyId, profileId, goalId)</a></code></p>
79<p class="firstline">Gets a goal to which the user has access.</p>
80<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#insert">insert(accountId, webPropertyId, profileId, body=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040082<p class="firstline">Create a new goal.</p>
83<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070084 <code><a href="#list">list(accountId, webPropertyId, profileId, start_index=None, max_results=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040085<p class="firstline">Lists goals to which the user has access.</p>
86<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#patch">patch(accountId, webPropertyId, profileId, goalId, body=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070088<p class="firstline">Updates an existing goal. This method supports patch semantics.</p>
John Asmuth614db982014-04-24 15:46:26 -040089<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#update">update(accountId, webPropertyId, profileId, goalId, body=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070091<p class="firstline">Updates an existing goal.</p>
John Asmuth614db982014-04-24 15:46:26 -040092<h3>Method Details</h3>
93<div class="method">
94 <code class="details" id="get">get(accountId, webPropertyId, profileId, goalId)</code>
95 <pre>Gets a goal to which the user has access.
96
97Args:
98 accountId: string, Account ID to retrieve the goal for. (required)
99 webPropertyId: string, Web property ID to retrieve the goal for. (required)
100 profileId: string, View (Profile) ID to retrieve the goal for. (required)
101 goalId: string, Goal ID to retrieve the goal for. (required)
102
103Returns:
104 An object of the form:
105
106 { # JSON template for Analytics goal resource.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700107 &quot;id&quot;: &quot;A String&quot;, # Goal ID.
108 &quot;active&quot;: True or False, # Determines whether this goal is active.
109 &quot;updated&quot;: &quot;A String&quot;, # Time this goal was last modified.
110 &quot;visitNumPagesDetails&quot;: { # Details for the goal of the type VISIT_NUM_PAGES.
111 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
112 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL.
113 },
114 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this goal belongs.
115 &quot;webPropertyId&quot;: &quot;A String&quot;, # Web property ID to which this goal belongs. The web property ID is of the form UA-XXXXX-YY.
116 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this goal.
117 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this goal belongs.
118 &quot;created&quot;: &quot;A String&quot;, # Time this goal was created.
119 &quot;value&quot;: 3.14, # Goal value.
120 &quot;kind&quot;: &quot;analytics#goal&quot;, # Resource type for an Analytics goal.
121 &quot;type&quot;: &quot;A String&quot;, # Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT.
122 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this goal belongs.
123 &quot;parentLink&quot;: { # Parent link for a goal. Points to the view (profile) to which this goal belongs.
124 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;.
125 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this goal belongs.
126 },
127 &quot;urlDestinationDetails&quot;: { # Details for the goal of the type URL_DESTINATION.
128 &quot;steps&quot;: [ # List of steps configured for this goal funnel.
129 {
130 &quot;number&quot;: 42, # Step number.
131 &quot;url&quot;: &quot;A String&quot;, # URL for this step.
132 &quot;name&quot;: &quot;A String&quot;, # Step name.
133 },
134 ],
135 &quot;caseSensitive&quot;: True or False, # Determines if the goal URL must exactly match the capitalization of visited URLs.
136 &quot;matchType&quot;: &quot;A String&quot;, # Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX.
137 &quot;url&quot;: &quot;A String&quot;, # URL for this goal.
138 &quot;firstStepRequired&quot;: True or False, # Determines if the first step in this goal is required.
139 },
140 &quot;name&quot;: &quot;A String&quot;, # Goal name.
141 &quot;visitTimeOnSiteDetails&quot;: { # Details for the goal of the type VISIT_TIME_ON_SITE.
142 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN or GREATER_THAN.
143 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
144 },
145 &quot;eventDetails&quot;: { # Details for the goal of the type EVENT.
146 &quot;useEventValue&quot;: True or False, # Determines if the event value should be used as the value for this goal.
147 &quot;eventConditions&quot;: [ # List of event conditions.
148 {
149 &quot;expression&quot;: &quot;A String&quot;, # Expression used for this match.
150 &quot;type&quot;: &quot;A String&quot;, # Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE.
151 &quot;matchType&quot;: &quot;A String&quot;, # Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT.
152 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL.
153 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
154 },
155 ],
156 },
157 }</pre>
John Asmuth614db982014-04-24 15:46:26 -0400158</div>
159
160<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700161 <code class="details" id="insert">insert(accountId, webPropertyId, profileId, body=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400162 <pre>Create a new goal.
163
164Args:
165 accountId: string, Account ID to create the goal for. (required)
166 webPropertyId: string, Web property ID to create the goal for. (required)
167 profileId: string, View (Profile) ID to create the goal for. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700168 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400169 The object takes the form of:
170
171{ # JSON template for Analytics goal resource.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700172 &quot;id&quot;: &quot;A String&quot;, # Goal ID.
173 &quot;active&quot;: True or False, # Determines whether this goal is active.
174 &quot;updated&quot;: &quot;A String&quot;, # Time this goal was last modified.
175 &quot;visitNumPagesDetails&quot;: { # Details for the goal of the type VISIT_NUM_PAGES.
176 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
177 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL.
178 },
179 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this goal belongs.
180 &quot;webPropertyId&quot;: &quot;A String&quot;, # Web property ID to which this goal belongs. The web property ID is of the form UA-XXXXX-YY.
181 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this goal.
182 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this goal belongs.
183 &quot;created&quot;: &quot;A String&quot;, # Time this goal was created.
184 &quot;value&quot;: 3.14, # Goal value.
185 &quot;kind&quot;: &quot;analytics#goal&quot;, # Resource type for an Analytics goal.
186 &quot;type&quot;: &quot;A String&quot;, # Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT.
187 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this goal belongs.
188 &quot;parentLink&quot;: { # Parent link for a goal. Points to the view (profile) to which this goal belongs.
189 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;.
190 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this goal belongs.
191 },
192 &quot;urlDestinationDetails&quot;: { # Details for the goal of the type URL_DESTINATION.
193 &quot;steps&quot;: [ # List of steps configured for this goal funnel.
194 {
195 &quot;number&quot;: 42, # Step number.
196 &quot;url&quot;: &quot;A String&quot;, # URL for this step.
197 &quot;name&quot;: &quot;A String&quot;, # Step name.
198 },
199 ],
200 &quot;caseSensitive&quot;: True or False, # Determines if the goal URL must exactly match the capitalization of visited URLs.
201 &quot;matchType&quot;: &quot;A String&quot;, # Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX.
202 &quot;url&quot;: &quot;A String&quot;, # URL for this goal.
203 &quot;firstStepRequired&quot;: True or False, # Determines if the first step in this goal is required.
204 },
205 &quot;name&quot;: &quot;A String&quot;, # Goal name.
206 &quot;visitTimeOnSiteDetails&quot;: { # Details for the goal of the type VISIT_TIME_ON_SITE.
207 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN or GREATER_THAN.
208 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
209 },
210 &quot;eventDetails&quot;: { # Details for the goal of the type EVENT.
211 &quot;useEventValue&quot;: True or False, # Determines if the event value should be used as the value for this goal.
212 &quot;eventConditions&quot;: [ # List of event conditions.
213 {
214 &quot;expression&quot;: &quot;A String&quot;, # Expression used for this match.
215 &quot;type&quot;: &quot;A String&quot;, # Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE.
216 &quot;matchType&quot;: &quot;A String&quot;, # Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT.
217 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL.
218 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
219 },
220 ],
221 },
222}
John Asmuth614db982014-04-24 15:46:26 -0400223
224
225Returns:
226 An object of the form:
227
228 { # JSON template for Analytics goal resource.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700229 &quot;id&quot;: &quot;A String&quot;, # Goal ID.
230 &quot;active&quot;: True or False, # Determines whether this goal is active.
231 &quot;updated&quot;: &quot;A String&quot;, # Time this goal was last modified.
232 &quot;visitNumPagesDetails&quot;: { # Details for the goal of the type VISIT_NUM_PAGES.
233 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
234 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL.
235 },
236 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this goal belongs.
237 &quot;webPropertyId&quot;: &quot;A String&quot;, # Web property ID to which this goal belongs. The web property ID is of the form UA-XXXXX-YY.
238 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this goal.
239 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this goal belongs.
240 &quot;created&quot;: &quot;A String&quot;, # Time this goal was created.
241 &quot;value&quot;: 3.14, # Goal value.
242 &quot;kind&quot;: &quot;analytics#goal&quot;, # Resource type for an Analytics goal.
243 &quot;type&quot;: &quot;A String&quot;, # Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT.
244 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this goal belongs.
245 &quot;parentLink&quot;: { # Parent link for a goal. Points to the view (profile) to which this goal belongs.
246 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;.
247 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this goal belongs.
248 },
249 &quot;urlDestinationDetails&quot;: { # Details for the goal of the type URL_DESTINATION.
250 &quot;steps&quot;: [ # List of steps configured for this goal funnel.
251 {
252 &quot;number&quot;: 42, # Step number.
253 &quot;url&quot;: &quot;A String&quot;, # URL for this step.
254 &quot;name&quot;: &quot;A String&quot;, # Step name.
255 },
256 ],
257 &quot;caseSensitive&quot;: True or False, # Determines if the goal URL must exactly match the capitalization of visited URLs.
258 &quot;matchType&quot;: &quot;A String&quot;, # Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX.
259 &quot;url&quot;: &quot;A String&quot;, # URL for this goal.
260 &quot;firstStepRequired&quot;: True or False, # Determines if the first step in this goal is required.
261 },
262 &quot;name&quot;: &quot;A String&quot;, # Goal name.
263 &quot;visitTimeOnSiteDetails&quot;: { # Details for the goal of the type VISIT_TIME_ON_SITE.
264 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN or GREATER_THAN.
265 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
266 },
267 &quot;eventDetails&quot;: { # Details for the goal of the type EVENT.
268 &quot;useEventValue&quot;: True or False, # Determines if the event value should be used as the value for this goal.
269 &quot;eventConditions&quot;: [ # List of event conditions.
270 {
271 &quot;expression&quot;: &quot;A String&quot;, # Expression used for this match.
272 &quot;type&quot;: &quot;A String&quot;, # Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE.
273 &quot;matchType&quot;: &quot;A String&quot;, # Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT.
274 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL.
275 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
276 },
277 ],
278 },
279 }</pre>
John Asmuth614db982014-04-24 15:46:26 -0400280</div>
281
282<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700283 <code class="details" id="list">list(accountId, webPropertyId, profileId, start_index=None, max_results=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400284 <pre>Lists goals to which the user has access.
285
286Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700287 accountId: string, Account ID to retrieve goals for. Can either be a specific account ID or &#x27;~all&#x27;, which refers to all the accounts that user has access to. (required)
288 webPropertyId: string, Web property ID to retrieve goals for. Can either be a specific web property ID or &#x27;~all&#x27;, which refers to all the web properties that user has access to. (required)
289 profileId: string, View (Profile) ID to retrieve goals for. Can either be a specific view (profile) ID or &#x27;~all&#x27;, which refers to all the views (profiles) that user has access to. (required)
John Asmuth614db982014-04-24 15:46:26 -0400290 start_index: integer, An index of the first goal to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
Bu Sun Kim65020912020-05-20 12:08:20 -0700291 max_results: integer, The maximum number of goals to include in this response.
John Asmuth614db982014-04-24 15:46:26 -0400292
293Returns:
294 An object of the form:
295
296 { # A goal collection lists Analytics goals to which the user has access. Each view (profile) can have a set of goals. Each resource in the Goal collection corresponds to a single Analytics goal.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700297 &quot;itemsPerPage&quot;: 42, # The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter.
Bu Sun Kim65020912020-05-20 12:08:20 -0700298 &quot;nextLink&quot;: &quot;A String&quot;, # Link to next page for this goal collection.
299 &quot;previousLink&quot;: &quot;A String&quot;, # Link to previous page for this goal collection.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700300 &quot;kind&quot;: &quot;analytics#goals&quot;, # Collection type.
Bu Sun Kim65020912020-05-20 12:08:20 -0700301 &quot;items&quot;: [ # A list of goals.
John Asmuth614db982014-04-24 15:46:26 -0400302 { # JSON template for Analytics goal resource.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700303 &quot;id&quot;: &quot;A String&quot;, # Goal ID.
304 &quot;active&quot;: True or False, # Determines whether this goal is active.
305 &quot;updated&quot;: &quot;A String&quot;, # Time this goal was last modified.
306 &quot;visitNumPagesDetails&quot;: { # Details for the goal of the type VISIT_NUM_PAGES.
307 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
308 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL.
John Asmuth614db982014-04-24 15:46:26 -0400309 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700310 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this goal belongs.
311 &quot;webPropertyId&quot;: &quot;A String&quot;, # Web property ID to which this goal belongs. The web property ID is of the form UA-XXXXX-YY.
312 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this goal.
313 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this goal belongs.
314 &quot;created&quot;: &quot;A String&quot;, # Time this goal was created.
315 &quot;value&quot;: 3.14, # Goal value.
316 &quot;kind&quot;: &quot;analytics#goal&quot;, # Resource type for an Analytics goal.
317 &quot;type&quot;: &quot;A String&quot;, # Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT.
318 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this goal belongs.
319 &quot;parentLink&quot;: { # Parent link for a goal. Points to the view (profile) to which this goal belongs.
320 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;.
321 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this goal belongs.
322 },
323 &quot;urlDestinationDetails&quot;: { # Details for the goal of the type URL_DESTINATION.
324 &quot;steps&quot;: [ # List of steps configured for this goal funnel.
325 {
326 &quot;number&quot;: 42, # Step number.
327 &quot;url&quot;: &quot;A String&quot;, # URL for this step.
328 &quot;name&quot;: &quot;A String&quot;, # Step name.
329 },
330 ],
331 &quot;caseSensitive&quot;: True or False, # Determines if the goal URL must exactly match the capitalization of visited URLs.
332 &quot;matchType&quot;: &quot;A String&quot;, # Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX.
333 &quot;url&quot;: &quot;A String&quot;, # URL for this goal.
334 &quot;firstStepRequired&quot;: True or False, # Determines if the first step in this goal is required.
335 },
336 &quot;name&quot;: &quot;A String&quot;, # Goal name.
337 &quot;visitTimeOnSiteDetails&quot;: { # Details for the goal of the type VISIT_TIME_ON_SITE.
338 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN or GREATER_THAN.
339 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
340 },
341 &quot;eventDetails&quot;: { # Details for the goal of the type EVENT.
342 &quot;useEventValue&quot;: True or False, # Determines if the event value should be used as the value for this goal.
343 &quot;eventConditions&quot;: [ # List of event conditions.
344 {
345 &quot;expression&quot;: &quot;A String&quot;, # Expression used for this match.
346 &quot;type&quot;: &quot;A String&quot;, # Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE.
347 &quot;matchType&quot;: &quot;A String&quot;, # Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT.
348 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL.
349 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
350 },
351 ],
352 },
353 },
John Asmuth614db982014-04-24 15:46:26 -0400354 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700355 &quot;totalResults&quot;: 42, # The total number of results for the query, regardless of the number of resources in the result.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700356 &quot;username&quot;: &quot;A String&quot;, # Email ID of the authenticated user
357 &quot;startIndex&quot;: 42, # The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter.
John Asmuth614db982014-04-24 15:46:26 -0400358 }</pre>
359</div>
360
361<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700362 <code class="details" id="patch">patch(accountId, webPropertyId, profileId, goalId, body=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700363 <pre>Updates an existing goal. This method supports patch semantics.
John Asmuth614db982014-04-24 15:46:26 -0400364
365Args:
366 accountId: string, Account ID to update the goal. (required)
367 webPropertyId: string, Web property ID to update the goal. (required)
368 profileId: string, View (Profile) ID to update the goal. (required)
369 goalId: string, Index of the goal to be updated. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700370 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400371 The object takes the form of:
372
373{ # JSON template for Analytics goal resource.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700374 &quot;id&quot;: &quot;A String&quot;, # Goal ID.
375 &quot;active&quot;: True or False, # Determines whether this goal is active.
376 &quot;updated&quot;: &quot;A String&quot;, # Time this goal was last modified.
377 &quot;visitNumPagesDetails&quot;: { # Details for the goal of the type VISIT_NUM_PAGES.
378 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
379 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL.
380 },
381 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this goal belongs.
382 &quot;webPropertyId&quot;: &quot;A String&quot;, # Web property ID to which this goal belongs. The web property ID is of the form UA-XXXXX-YY.
383 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this goal.
384 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this goal belongs.
385 &quot;created&quot;: &quot;A String&quot;, # Time this goal was created.
386 &quot;value&quot;: 3.14, # Goal value.
387 &quot;kind&quot;: &quot;analytics#goal&quot;, # Resource type for an Analytics goal.
388 &quot;type&quot;: &quot;A String&quot;, # Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT.
389 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this goal belongs.
390 &quot;parentLink&quot;: { # Parent link for a goal. Points to the view (profile) to which this goal belongs.
391 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;.
392 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this goal belongs.
393 },
394 &quot;urlDestinationDetails&quot;: { # Details for the goal of the type URL_DESTINATION.
395 &quot;steps&quot;: [ # List of steps configured for this goal funnel.
396 {
397 &quot;number&quot;: 42, # Step number.
398 &quot;url&quot;: &quot;A String&quot;, # URL for this step.
399 &quot;name&quot;: &quot;A String&quot;, # Step name.
400 },
401 ],
402 &quot;caseSensitive&quot;: True or False, # Determines if the goal URL must exactly match the capitalization of visited URLs.
403 &quot;matchType&quot;: &quot;A String&quot;, # Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX.
404 &quot;url&quot;: &quot;A String&quot;, # URL for this goal.
405 &quot;firstStepRequired&quot;: True or False, # Determines if the first step in this goal is required.
406 },
407 &quot;name&quot;: &quot;A String&quot;, # Goal name.
408 &quot;visitTimeOnSiteDetails&quot;: { # Details for the goal of the type VISIT_TIME_ON_SITE.
409 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN or GREATER_THAN.
410 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
411 },
412 &quot;eventDetails&quot;: { # Details for the goal of the type EVENT.
413 &quot;useEventValue&quot;: True or False, # Determines if the event value should be used as the value for this goal.
414 &quot;eventConditions&quot;: [ # List of event conditions.
415 {
416 &quot;expression&quot;: &quot;A String&quot;, # Expression used for this match.
417 &quot;type&quot;: &quot;A String&quot;, # Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE.
418 &quot;matchType&quot;: &quot;A String&quot;, # Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT.
419 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL.
420 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
421 },
422 ],
423 },
424}
John Asmuth614db982014-04-24 15:46:26 -0400425
426
427Returns:
428 An object of the form:
429
430 { # JSON template for Analytics goal resource.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700431 &quot;id&quot;: &quot;A String&quot;, # Goal ID.
432 &quot;active&quot;: True or False, # Determines whether this goal is active.
433 &quot;updated&quot;: &quot;A String&quot;, # Time this goal was last modified.
434 &quot;visitNumPagesDetails&quot;: { # Details for the goal of the type VISIT_NUM_PAGES.
435 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
436 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL.
437 },
438 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this goal belongs.
439 &quot;webPropertyId&quot;: &quot;A String&quot;, # Web property ID to which this goal belongs. The web property ID is of the form UA-XXXXX-YY.
440 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this goal.
441 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this goal belongs.
442 &quot;created&quot;: &quot;A String&quot;, # Time this goal was created.
443 &quot;value&quot;: 3.14, # Goal value.
444 &quot;kind&quot;: &quot;analytics#goal&quot;, # Resource type for an Analytics goal.
445 &quot;type&quot;: &quot;A String&quot;, # Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT.
446 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this goal belongs.
447 &quot;parentLink&quot;: { # Parent link for a goal. Points to the view (profile) to which this goal belongs.
448 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;.
449 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this goal belongs.
450 },
451 &quot;urlDestinationDetails&quot;: { # Details for the goal of the type URL_DESTINATION.
452 &quot;steps&quot;: [ # List of steps configured for this goal funnel.
453 {
454 &quot;number&quot;: 42, # Step number.
455 &quot;url&quot;: &quot;A String&quot;, # URL for this step.
456 &quot;name&quot;: &quot;A String&quot;, # Step name.
457 },
458 ],
459 &quot;caseSensitive&quot;: True or False, # Determines if the goal URL must exactly match the capitalization of visited URLs.
460 &quot;matchType&quot;: &quot;A String&quot;, # Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX.
461 &quot;url&quot;: &quot;A String&quot;, # URL for this goal.
462 &quot;firstStepRequired&quot;: True or False, # Determines if the first step in this goal is required.
463 },
464 &quot;name&quot;: &quot;A String&quot;, # Goal name.
465 &quot;visitTimeOnSiteDetails&quot;: { # Details for the goal of the type VISIT_TIME_ON_SITE.
466 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN or GREATER_THAN.
467 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
468 },
469 &quot;eventDetails&quot;: { # Details for the goal of the type EVENT.
470 &quot;useEventValue&quot;: True or False, # Determines if the event value should be used as the value for this goal.
471 &quot;eventConditions&quot;: [ # List of event conditions.
472 {
473 &quot;expression&quot;: &quot;A String&quot;, # Expression used for this match.
474 &quot;type&quot;: &quot;A String&quot;, # Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE.
475 &quot;matchType&quot;: &quot;A String&quot;, # Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT.
476 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL.
477 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
478 },
479 ],
480 },
481 }</pre>
John Asmuth614db982014-04-24 15:46:26 -0400482</div>
483
484<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700485 <code class="details" id="update">update(accountId, webPropertyId, profileId, goalId, body=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700486 <pre>Updates an existing goal.
John Asmuth614db982014-04-24 15:46:26 -0400487
488Args:
489 accountId: string, Account ID to update the goal. (required)
490 webPropertyId: string, Web property ID to update the goal. (required)
491 profileId: string, View (Profile) ID to update the goal. (required)
492 goalId: string, Index of the goal to be updated. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700493 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400494 The object takes the form of:
495
496{ # JSON template for Analytics goal resource.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700497 &quot;id&quot;: &quot;A String&quot;, # Goal ID.
498 &quot;active&quot;: True or False, # Determines whether this goal is active.
499 &quot;updated&quot;: &quot;A String&quot;, # Time this goal was last modified.
500 &quot;visitNumPagesDetails&quot;: { # Details for the goal of the type VISIT_NUM_PAGES.
501 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
502 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL.
503 },
504 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this goal belongs.
505 &quot;webPropertyId&quot;: &quot;A String&quot;, # Web property ID to which this goal belongs. The web property ID is of the form UA-XXXXX-YY.
506 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this goal.
507 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this goal belongs.
508 &quot;created&quot;: &quot;A String&quot;, # Time this goal was created.
509 &quot;value&quot;: 3.14, # Goal value.
510 &quot;kind&quot;: &quot;analytics#goal&quot;, # Resource type for an Analytics goal.
511 &quot;type&quot;: &quot;A String&quot;, # Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT.
512 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this goal belongs.
513 &quot;parentLink&quot;: { # Parent link for a goal. Points to the view (profile) to which this goal belongs.
514 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;.
515 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this goal belongs.
516 },
517 &quot;urlDestinationDetails&quot;: { # Details for the goal of the type URL_DESTINATION.
518 &quot;steps&quot;: [ # List of steps configured for this goal funnel.
519 {
520 &quot;number&quot;: 42, # Step number.
521 &quot;url&quot;: &quot;A String&quot;, # URL for this step.
522 &quot;name&quot;: &quot;A String&quot;, # Step name.
523 },
524 ],
525 &quot;caseSensitive&quot;: True or False, # Determines if the goal URL must exactly match the capitalization of visited URLs.
526 &quot;matchType&quot;: &quot;A String&quot;, # Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX.
527 &quot;url&quot;: &quot;A String&quot;, # URL for this goal.
528 &quot;firstStepRequired&quot;: True or False, # Determines if the first step in this goal is required.
529 },
530 &quot;name&quot;: &quot;A String&quot;, # Goal name.
531 &quot;visitTimeOnSiteDetails&quot;: { # Details for the goal of the type VISIT_TIME_ON_SITE.
532 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN or GREATER_THAN.
533 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
534 },
535 &quot;eventDetails&quot;: { # Details for the goal of the type EVENT.
536 &quot;useEventValue&quot;: True or False, # Determines if the event value should be used as the value for this goal.
537 &quot;eventConditions&quot;: [ # List of event conditions.
538 {
539 &quot;expression&quot;: &quot;A String&quot;, # Expression used for this match.
540 &quot;type&quot;: &quot;A String&quot;, # Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE.
541 &quot;matchType&quot;: &quot;A String&quot;, # Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT.
542 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL.
543 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
544 },
545 ],
546 },
547}
John Asmuth614db982014-04-24 15:46:26 -0400548
549
550Returns:
551 An object of the form:
552
553 { # JSON template for Analytics goal resource.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700554 &quot;id&quot;: &quot;A String&quot;, # Goal ID.
555 &quot;active&quot;: True or False, # Determines whether this goal is active.
556 &quot;updated&quot;: &quot;A String&quot;, # Time this goal was last modified.
557 &quot;visitNumPagesDetails&quot;: { # Details for the goal of the type VISIT_NUM_PAGES.
558 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
559 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL.
560 },
561 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this goal belongs.
562 &quot;webPropertyId&quot;: &quot;A String&quot;, # Web property ID to which this goal belongs. The web property ID is of the form UA-XXXXX-YY.
563 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this goal.
564 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this goal belongs.
565 &quot;created&quot;: &quot;A String&quot;, # Time this goal was created.
566 &quot;value&quot;: 3.14, # Goal value.
567 &quot;kind&quot;: &quot;analytics#goal&quot;, # Resource type for an Analytics goal.
568 &quot;type&quot;: &quot;A String&quot;, # Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT.
569 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this goal belongs.
570 &quot;parentLink&quot;: { # Parent link for a goal. Points to the view (profile) to which this goal belongs.
571 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;.
572 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this goal belongs.
573 },
574 &quot;urlDestinationDetails&quot;: { # Details for the goal of the type URL_DESTINATION.
575 &quot;steps&quot;: [ # List of steps configured for this goal funnel.
576 {
577 &quot;number&quot;: 42, # Step number.
578 &quot;url&quot;: &quot;A String&quot;, # URL for this step.
579 &quot;name&quot;: &quot;A String&quot;, # Step name.
580 },
581 ],
582 &quot;caseSensitive&quot;: True or False, # Determines if the goal URL must exactly match the capitalization of visited URLs.
583 &quot;matchType&quot;: &quot;A String&quot;, # Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX.
584 &quot;url&quot;: &quot;A String&quot;, # URL for this goal.
585 &quot;firstStepRequired&quot;: True or False, # Determines if the first step in this goal is required.
586 },
587 &quot;name&quot;: &quot;A String&quot;, # Goal name.
588 &quot;visitTimeOnSiteDetails&quot;: { # Details for the goal of the type VISIT_TIME_ON_SITE.
589 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN or GREATER_THAN.
590 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
591 },
592 &quot;eventDetails&quot;: { # Details for the goal of the type EVENT.
593 &quot;useEventValue&quot;: True or False, # Determines if the event value should be used as the value for this goal.
594 &quot;eventConditions&quot;: [ # List of event conditions.
595 {
596 &quot;expression&quot;: &quot;A String&quot;, # Expression used for this match.
597 &quot;type&quot;: &quot;A String&quot;, # Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE.
598 &quot;matchType&quot;: &quot;A String&quot;, # Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT.
599 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL.
600 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
601 },
602 ],
603 },
604 }</pre>
John Asmuth614db982014-04-24 15:46:26 -0400605</div>
606
607</body></html>