blob: 8ce7844fb08040069f431dee3903a2d29a594e25 [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">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
John Asmuth614db982014-04-24 15:46:26 -040081 <code><a href="#get">get(accountId, webPropertyId, profileId, goalId)</a></code></p>
82<p class="firstline">Gets a goal to which the user has access.</p>
83<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070084 <code><a href="#insert">insert(accountId, webPropertyId, profileId, body=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040085<p class="firstline">Create a new goal.</p>
86<p class="toc_element">
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -080087 <code><a href="#list">list(accountId, webPropertyId, profileId, start_index=None, max_results=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040088<p class="firstline">Lists goals to which the user has access.</p>
89<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#patch">patch(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. This method supports patch semantics.</p>
John Asmuth614db982014-04-24 15:46:26 -040092<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#update">update(accountId, webPropertyId, profileId, goalId, body=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070094<p class="firstline">Updates an existing goal.</p>
John Asmuth614db982014-04-24 15:46:26 -040095<h3>Method Details</h3>
96<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070097 <code class="details" id="close">close()</code>
98 <pre>Close httplib2 connections.</pre>
99</div>
100
101<div class="method">
John Asmuth614db982014-04-24 15:46:26 -0400102 <code class="details" id="get">get(accountId, webPropertyId, profileId, goalId)</code>
103 <pre>Gets a goal to which the user has access.
104
105Args:
106 accountId: string, Account ID to retrieve the goal for. (required)
107 webPropertyId: string, Web property ID to retrieve the goal for. (required)
108 profileId: string, View (Profile) ID to retrieve the goal for. (required)
109 goalId: string, Goal ID to retrieve the goal for. (required)
110
111Returns:
112 An object of the form:
113
114 { # JSON template for Analytics goal resource.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800115 &quot;visitTimeOnSiteDetails&quot;: { # Details for the goal of the type VISIT_TIME_ON_SITE.
116 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
117 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN or GREATER_THAN.
118 },
119 &quot;active&quot;: True or False, # Determines whether this goal is active.
120 &quot;urlDestinationDetails&quot;: { # Details for the goal of the type URL_DESTINATION.
121 &quot;matchType&quot;: &quot;A String&quot;, # Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX.
122 &quot;steps&quot;: [ # List of steps configured for this goal funnel.
123 {
124 &quot;name&quot;: &quot;A String&quot;, # Step name.
125 &quot;url&quot;: &quot;A String&quot;, # URL for this step.
126 &quot;number&quot;: 42, # Step number.
127 },
128 ],
129 &quot;url&quot;: &quot;A String&quot;, # URL for this goal.
130 &quot;firstStepRequired&quot;: True or False, # Determines if the first step in this goal is required.
131 &quot;caseSensitive&quot;: True or False, # Determines if the goal URL must exactly match the capitalization of visited URLs.
132 },
133 &quot;kind&quot;: &quot;analytics#goal&quot;, # Resource type for an Analytics goal.
134 &quot;eventDetails&quot;: { # Details for the goal of the type EVENT.
135 &quot;eventConditions&quot;: [ # List of event conditions.
136 {
137 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL.
138 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
139 &quot;matchType&quot;: &quot;A String&quot;, # Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT.
140 &quot;expression&quot;: &quot;A String&quot;, # Expression used for this match.
141 &quot;type&quot;: &quot;A String&quot;, # Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE.
142 },
143 ],
144 &quot;useEventValue&quot;: True or False, # Determines if the event value should be used as the value for this goal.
145 },
146 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this goal.
147 &quot;type&quot;: &quot;A String&quot;, # Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT.
148 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this goal belongs.
149 &quot;updated&quot;: &quot;A String&quot;, # Time this goal was last modified.
150 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this goal belongs.
151 &quot;created&quot;: &quot;A String&quot;, # Time this goal was created.
152 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this goal belongs.
153 &quot;id&quot;: &quot;A String&quot;, # Goal ID.
154 &quot;name&quot;: &quot;A String&quot;, # Goal name.
155 &quot;parentLink&quot;: { # Parent link for a goal. Points to the view (profile) to which this goal belongs.
156 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this goal belongs.
157 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;.
158 },
159 &quot;visitNumPagesDetails&quot;: { # Details for the goal of the type VISIT_NUM_PAGES.
160 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
161 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL.
162 },
163 &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.
164 &quot;value&quot;: 3.14, # Goal value.
165 }</pre>
John Asmuth614db982014-04-24 15:46:26 -0400166</div>
167
168<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700169 <code class="details" id="insert">insert(accountId, webPropertyId, profileId, body=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400170 <pre>Create a new goal.
171
172Args:
173 accountId: string, Account ID to create the goal for. (required)
174 webPropertyId: string, Web property ID to create the goal for. (required)
175 profileId: string, View (Profile) ID to create the goal for. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700176 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400177 The object takes the form of:
178
179{ # JSON template for Analytics goal resource.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800180 &quot;visitTimeOnSiteDetails&quot;: { # Details for the goal of the type VISIT_TIME_ON_SITE.
181 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
182 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN or GREATER_THAN.
183 },
184 &quot;active&quot;: True or False, # Determines whether this goal is active.
185 &quot;urlDestinationDetails&quot;: { # Details for the goal of the type URL_DESTINATION.
186 &quot;matchType&quot;: &quot;A String&quot;, # Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX.
187 &quot;steps&quot;: [ # List of steps configured for this goal funnel.
188 {
189 &quot;name&quot;: &quot;A String&quot;, # Step name.
190 &quot;url&quot;: &quot;A String&quot;, # URL for this step.
191 &quot;number&quot;: 42, # Step number.
192 },
193 ],
194 &quot;url&quot;: &quot;A String&quot;, # URL for this goal.
195 &quot;firstStepRequired&quot;: True or False, # Determines if the first step in this goal is required.
196 &quot;caseSensitive&quot;: True or False, # Determines if the goal URL must exactly match the capitalization of visited URLs.
197 },
198 &quot;kind&quot;: &quot;analytics#goal&quot;, # Resource type for an Analytics goal.
199 &quot;eventDetails&quot;: { # Details for the goal of the type EVENT.
200 &quot;eventConditions&quot;: [ # List of event conditions.
201 {
202 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL.
203 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
204 &quot;matchType&quot;: &quot;A String&quot;, # Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT.
205 &quot;expression&quot;: &quot;A String&quot;, # Expression used for this match.
206 &quot;type&quot;: &quot;A String&quot;, # Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE.
207 },
208 ],
209 &quot;useEventValue&quot;: True or False, # Determines if the event value should be used as the value for this goal.
210 },
211 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this goal.
212 &quot;type&quot;: &quot;A String&quot;, # Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT.
213 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this goal belongs.
214 &quot;updated&quot;: &quot;A String&quot;, # Time this goal was last modified.
215 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this goal belongs.
216 &quot;created&quot;: &quot;A String&quot;, # Time this goal was created.
217 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this goal belongs.
218 &quot;id&quot;: &quot;A String&quot;, # Goal ID.
219 &quot;name&quot;: &quot;A String&quot;, # Goal name.
220 &quot;parentLink&quot;: { # Parent link for a goal. Points to the view (profile) to which this goal belongs.
221 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this goal belongs.
222 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;.
223 },
224 &quot;visitNumPagesDetails&quot;: { # Details for the goal of the type VISIT_NUM_PAGES.
225 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
226 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL.
227 },
228 &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.
229 &quot;value&quot;: 3.14, # Goal value.
230 }
John Asmuth614db982014-04-24 15:46:26 -0400231
232
233Returns:
234 An object of the form:
235
236 { # JSON template for Analytics goal resource.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800237 &quot;visitTimeOnSiteDetails&quot;: { # Details for the goal of the type VISIT_TIME_ON_SITE.
238 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
239 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN or GREATER_THAN.
240 },
241 &quot;active&quot;: True or False, # Determines whether this goal is active.
242 &quot;urlDestinationDetails&quot;: { # Details for the goal of the type URL_DESTINATION.
243 &quot;matchType&quot;: &quot;A String&quot;, # Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX.
244 &quot;steps&quot;: [ # List of steps configured for this goal funnel.
245 {
246 &quot;name&quot;: &quot;A String&quot;, # Step name.
247 &quot;url&quot;: &quot;A String&quot;, # URL for this step.
248 &quot;number&quot;: 42, # Step number.
249 },
250 ],
251 &quot;url&quot;: &quot;A String&quot;, # URL for this goal.
252 &quot;firstStepRequired&quot;: True or False, # Determines if the first step in this goal is required.
253 &quot;caseSensitive&quot;: True or False, # Determines if the goal URL must exactly match the capitalization of visited URLs.
254 },
255 &quot;kind&quot;: &quot;analytics#goal&quot;, # Resource type for an Analytics goal.
256 &quot;eventDetails&quot;: { # Details for the goal of the type EVENT.
257 &quot;eventConditions&quot;: [ # List of event conditions.
258 {
259 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL.
260 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
261 &quot;matchType&quot;: &quot;A String&quot;, # Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT.
262 &quot;expression&quot;: &quot;A String&quot;, # Expression used for this match.
263 &quot;type&quot;: &quot;A String&quot;, # Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE.
264 },
265 ],
266 &quot;useEventValue&quot;: True or False, # Determines if the event value should be used as the value for this goal.
267 },
268 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this goal.
269 &quot;type&quot;: &quot;A String&quot;, # Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT.
270 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this goal belongs.
271 &quot;updated&quot;: &quot;A String&quot;, # Time this goal was last modified.
272 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this goal belongs.
273 &quot;created&quot;: &quot;A String&quot;, # Time this goal was created.
274 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this goal belongs.
275 &quot;id&quot;: &quot;A String&quot;, # Goal ID.
276 &quot;name&quot;: &quot;A String&quot;, # Goal name.
277 &quot;parentLink&quot;: { # Parent link for a goal. Points to the view (profile) to which this goal belongs.
278 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this goal belongs.
279 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;.
280 },
281 &quot;visitNumPagesDetails&quot;: { # Details for the goal of the type VISIT_NUM_PAGES.
282 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
283 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL.
284 },
285 &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.
286 &quot;value&quot;: 3.14, # Goal value.
287 }</pre>
John Asmuth614db982014-04-24 15:46:26 -0400288</div>
289
290<div class="method">
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800291 <code class="details" id="list">list(accountId, webPropertyId, profileId, start_index=None, max_results=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400292 <pre>Lists goals to which the user has access.
293
294Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700295 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)
296 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)
297 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)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700298 start_index: integer, An index of the first goal to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800299 max_results: integer, The maximum number of goals to include in this response.
John Asmuth614db982014-04-24 15:46:26 -0400300
301Returns:
302 An object of the form:
303
304 { # 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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800305 &quot;previousLink&quot;: &quot;A String&quot;, # Link to previous page for this goal collection.
Bu Sun Kim65020912020-05-20 12:08:20 -0700306 &quot;items&quot;: [ # A list of goals.
John Asmuth614db982014-04-24 15:46:26 -0400307 { # JSON template for Analytics goal resource.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800308 &quot;visitTimeOnSiteDetails&quot;: { # Details for the goal of the type VISIT_TIME_ON_SITE.
309 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
310 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN or GREATER_THAN.
311 },
312 &quot;active&quot;: True or False, # Determines whether this goal is active.
313 &quot;urlDestinationDetails&quot;: { # Details for the goal of the type URL_DESTINATION.
314 &quot;matchType&quot;: &quot;A String&quot;, # Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX.
315 &quot;steps&quot;: [ # List of steps configured for this goal funnel.
316 {
317 &quot;name&quot;: &quot;A String&quot;, # Step name.
318 &quot;url&quot;: &quot;A String&quot;, # URL for this step.
319 &quot;number&quot;: 42, # Step number.
320 },
321 ],
322 &quot;url&quot;: &quot;A String&quot;, # URL for this goal.
323 &quot;firstStepRequired&quot;: True or False, # Determines if the first step in this goal is required.
324 &quot;caseSensitive&quot;: True or False, # Determines if the goal URL must exactly match the capitalization of visited URLs.
325 },
326 &quot;kind&quot;: &quot;analytics#goal&quot;, # Resource type for an Analytics goal.
327 &quot;eventDetails&quot;: { # Details for the goal of the type EVENT.
328 &quot;eventConditions&quot;: [ # List of event conditions.
329 {
330 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL.
331 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
332 &quot;matchType&quot;: &quot;A String&quot;, # Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT.
333 &quot;expression&quot;: &quot;A String&quot;, # Expression used for this match.
334 &quot;type&quot;: &quot;A String&quot;, # Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE.
335 },
336 ],
337 &quot;useEventValue&quot;: True or False, # Determines if the event value should be used as the value for this goal.
338 },
339 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this goal.
340 &quot;type&quot;: &quot;A String&quot;, # Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT.
341 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this goal belongs.
342 &quot;updated&quot;: &quot;A String&quot;, # Time this goal was last modified.
343 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this goal belongs.
344 &quot;created&quot;: &quot;A String&quot;, # Time this goal was created.
345 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this goal belongs.
346 &quot;id&quot;: &quot;A String&quot;, # Goal ID.
347 &quot;name&quot;: &quot;A String&quot;, # Goal name.
348 &quot;parentLink&quot;: { # Parent link for a goal. Points to the view (profile) to which this goal belongs.
349 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this goal belongs.
350 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;.
351 },
352 &quot;visitNumPagesDetails&quot;: { # Details for the goal of the type VISIT_NUM_PAGES.
353 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
354 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL.
355 },
356 &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.
357 &quot;value&quot;: 3.14, # Goal value.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700358 },
John Asmuth614db982014-04-24 15:46:26 -0400359 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800360 &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.
361 &quot;nextLink&quot;: &quot;A String&quot;, # Link to next page for this goal collection.
362 &quot;startIndex&quot;: 42, # The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter.
363 &quot;username&quot;: &quot;A String&quot;, # Email ID of the authenticated user
364 &quot;kind&quot;: &quot;analytics#goals&quot;, # Collection type.
365 &quot;totalResults&quot;: 42, # The total number of results for the query, regardless of the number of resources in the result.
John Asmuth614db982014-04-24 15:46:26 -0400366 }</pre>
367</div>
368
369<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700370 <code class="details" id="patch">patch(accountId, webPropertyId, profileId, goalId, body=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700371 <pre>Updates an existing goal. This method supports patch semantics.
John Asmuth614db982014-04-24 15:46:26 -0400372
373Args:
374 accountId: string, Account ID to update the goal. (required)
375 webPropertyId: string, Web property ID to update the goal. (required)
376 profileId: string, View (Profile) ID to update the goal. (required)
377 goalId: string, Index of the goal to be updated. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700378 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400379 The object takes the form of:
380
381{ # JSON template for Analytics goal resource.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800382 &quot;visitTimeOnSiteDetails&quot;: { # Details for the goal of the type VISIT_TIME_ON_SITE.
383 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
384 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN or GREATER_THAN.
385 },
386 &quot;active&quot;: True or False, # Determines whether this goal is active.
387 &quot;urlDestinationDetails&quot;: { # Details for the goal of the type URL_DESTINATION.
388 &quot;matchType&quot;: &quot;A String&quot;, # Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX.
389 &quot;steps&quot;: [ # List of steps configured for this goal funnel.
390 {
391 &quot;name&quot;: &quot;A String&quot;, # Step name.
392 &quot;url&quot;: &quot;A String&quot;, # URL for this step.
393 &quot;number&quot;: 42, # Step number.
394 },
395 ],
396 &quot;url&quot;: &quot;A String&quot;, # URL for this goal.
397 &quot;firstStepRequired&quot;: True or False, # Determines if the first step in this goal is required.
398 &quot;caseSensitive&quot;: True or False, # Determines if the goal URL must exactly match the capitalization of visited URLs.
399 },
400 &quot;kind&quot;: &quot;analytics#goal&quot;, # Resource type for an Analytics goal.
401 &quot;eventDetails&quot;: { # Details for the goal of the type EVENT.
402 &quot;eventConditions&quot;: [ # List of event conditions.
403 {
404 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL.
405 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
406 &quot;matchType&quot;: &quot;A String&quot;, # Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT.
407 &quot;expression&quot;: &quot;A String&quot;, # Expression used for this match.
408 &quot;type&quot;: &quot;A String&quot;, # Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE.
409 },
410 ],
411 &quot;useEventValue&quot;: True or False, # Determines if the event value should be used as the value for this goal.
412 },
413 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this goal.
414 &quot;type&quot;: &quot;A String&quot;, # Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT.
415 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this goal belongs.
416 &quot;updated&quot;: &quot;A String&quot;, # Time this goal was last modified.
417 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this goal belongs.
418 &quot;created&quot;: &quot;A String&quot;, # Time this goal was created.
419 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this goal belongs.
420 &quot;id&quot;: &quot;A String&quot;, # Goal ID.
421 &quot;name&quot;: &quot;A String&quot;, # Goal name.
422 &quot;parentLink&quot;: { # Parent link for a goal. Points to the view (profile) to which this goal belongs.
423 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this goal belongs.
424 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;.
425 },
426 &quot;visitNumPagesDetails&quot;: { # Details for the goal of the type VISIT_NUM_PAGES.
427 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
428 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL.
429 },
430 &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.
431 &quot;value&quot;: 3.14, # Goal value.
432 }
John Asmuth614db982014-04-24 15:46:26 -0400433
434
435Returns:
436 An object of the form:
437
438 { # JSON template for Analytics goal resource.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800439 &quot;visitTimeOnSiteDetails&quot;: { # Details for the goal of the type VISIT_TIME_ON_SITE.
440 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
441 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN or GREATER_THAN.
442 },
443 &quot;active&quot;: True or False, # Determines whether this goal is active.
444 &quot;urlDestinationDetails&quot;: { # Details for the goal of the type URL_DESTINATION.
445 &quot;matchType&quot;: &quot;A String&quot;, # Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX.
446 &quot;steps&quot;: [ # List of steps configured for this goal funnel.
447 {
448 &quot;name&quot;: &quot;A String&quot;, # Step name.
449 &quot;url&quot;: &quot;A String&quot;, # URL for this step.
450 &quot;number&quot;: 42, # Step number.
451 },
452 ],
453 &quot;url&quot;: &quot;A String&quot;, # URL for this goal.
454 &quot;firstStepRequired&quot;: True or False, # Determines if the first step in this goal is required.
455 &quot;caseSensitive&quot;: True or False, # Determines if the goal URL must exactly match the capitalization of visited URLs.
456 },
457 &quot;kind&quot;: &quot;analytics#goal&quot;, # Resource type for an Analytics goal.
458 &quot;eventDetails&quot;: { # Details for the goal of the type EVENT.
459 &quot;eventConditions&quot;: [ # List of event conditions.
460 {
461 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL.
462 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
463 &quot;matchType&quot;: &quot;A String&quot;, # Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT.
464 &quot;expression&quot;: &quot;A String&quot;, # Expression used for this match.
465 &quot;type&quot;: &quot;A String&quot;, # Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE.
466 },
467 ],
468 &quot;useEventValue&quot;: True or False, # Determines if the event value should be used as the value for this goal.
469 },
470 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this goal.
471 &quot;type&quot;: &quot;A String&quot;, # Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT.
472 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this goal belongs.
473 &quot;updated&quot;: &quot;A String&quot;, # Time this goal was last modified.
474 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this goal belongs.
475 &quot;created&quot;: &quot;A String&quot;, # Time this goal was created.
476 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this goal belongs.
477 &quot;id&quot;: &quot;A String&quot;, # Goal ID.
478 &quot;name&quot;: &quot;A String&quot;, # Goal name.
479 &quot;parentLink&quot;: { # Parent link for a goal. Points to the view (profile) to which this goal belongs.
480 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this goal belongs.
481 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;.
482 },
483 &quot;visitNumPagesDetails&quot;: { # Details for the goal of the type VISIT_NUM_PAGES.
484 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
485 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL.
486 },
487 &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.
488 &quot;value&quot;: 3.14, # Goal value.
489 }</pre>
John Asmuth614db982014-04-24 15:46:26 -0400490</div>
491
492<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700493 <code class="details" id="update">update(accountId, webPropertyId, profileId, goalId, body=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700494 <pre>Updates an existing goal.
John Asmuth614db982014-04-24 15:46:26 -0400495
496Args:
497 accountId: string, Account ID to update the goal. (required)
498 webPropertyId: string, Web property ID to update the goal. (required)
499 profileId: string, View (Profile) ID to update the goal. (required)
500 goalId: string, Index of the goal to be updated. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700501 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400502 The object takes the form of:
503
504{ # JSON template for Analytics goal resource.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800505 &quot;visitTimeOnSiteDetails&quot;: { # Details for the goal of the type VISIT_TIME_ON_SITE.
506 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
507 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN or GREATER_THAN.
508 },
509 &quot;active&quot;: True or False, # Determines whether this goal is active.
510 &quot;urlDestinationDetails&quot;: { # Details for the goal of the type URL_DESTINATION.
511 &quot;matchType&quot;: &quot;A String&quot;, # Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX.
512 &quot;steps&quot;: [ # List of steps configured for this goal funnel.
513 {
514 &quot;name&quot;: &quot;A String&quot;, # Step name.
515 &quot;url&quot;: &quot;A String&quot;, # URL for this step.
516 &quot;number&quot;: 42, # Step number.
517 },
518 ],
519 &quot;url&quot;: &quot;A String&quot;, # URL for this goal.
520 &quot;firstStepRequired&quot;: True or False, # Determines if the first step in this goal is required.
521 &quot;caseSensitive&quot;: True or False, # Determines if the goal URL must exactly match the capitalization of visited URLs.
522 },
523 &quot;kind&quot;: &quot;analytics#goal&quot;, # Resource type for an Analytics goal.
524 &quot;eventDetails&quot;: { # Details for the goal of the type EVENT.
525 &quot;eventConditions&quot;: [ # List of event conditions.
526 {
527 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL.
528 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
529 &quot;matchType&quot;: &quot;A String&quot;, # Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT.
530 &quot;expression&quot;: &quot;A String&quot;, # Expression used for this match.
531 &quot;type&quot;: &quot;A String&quot;, # Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE.
532 },
533 ],
534 &quot;useEventValue&quot;: True or False, # Determines if the event value should be used as the value for this goal.
535 },
536 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this goal.
537 &quot;type&quot;: &quot;A String&quot;, # Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT.
538 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this goal belongs.
539 &quot;updated&quot;: &quot;A String&quot;, # Time this goal was last modified.
540 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this goal belongs.
541 &quot;created&quot;: &quot;A String&quot;, # Time this goal was created.
542 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this goal belongs.
543 &quot;id&quot;: &quot;A String&quot;, # Goal ID.
544 &quot;name&quot;: &quot;A String&quot;, # Goal name.
545 &quot;parentLink&quot;: { # Parent link for a goal. Points to the view (profile) to which this goal belongs.
546 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this goal belongs.
547 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;.
548 },
549 &quot;visitNumPagesDetails&quot;: { # Details for the goal of the type VISIT_NUM_PAGES.
550 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
551 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL.
552 },
553 &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.
554 &quot;value&quot;: 3.14, # Goal value.
555 }
John Asmuth614db982014-04-24 15:46:26 -0400556
557
558Returns:
559 An object of the form:
560
561 { # JSON template for Analytics goal resource.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800562 &quot;visitTimeOnSiteDetails&quot;: { # Details for the goal of the type VISIT_TIME_ON_SITE.
563 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
564 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN or GREATER_THAN.
565 },
566 &quot;active&quot;: True or False, # Determines whether this goal is active.
567 &quot;urlDestinationDetails&quot;: { # Details for the goal of the type URL_DESTINATION.
568 &quot;matchType&quot;: &quot;A String&quot;, # Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX.
569 &quot;steps&quot;: [ # List of steps configured for this goal funnel.
570 {
571 &quot;name&quot;: &quot;A String&quot;, # Step name.
572 &quot;url&quot;: &quot;A String&quot;, # URL for this step.
573 &quot;number&quot;: 42, # Step number.
574 },
575 ],
576 &quot;url&quot;: &quot;A String&quot;, # URL for this goal.
577 &quot;firstStepRequired&quot;: True or False, # Determines if the first step in this goal is required.
578 &quot;caseSensitive&quot;: True or False, # Determines if the goal URL must exactly match the capitalization of visited URLs.
579 },
580 &quot;kind&quot;: &quot;analytics#goal&quot;, # Resource type for an Analytics goal.
581 &quot;eventDetails&quot;: { # Details for the goal of the type EVENT.
582 &quot;eventConditions&quot;: [ # List of event conditions.
583 {
584 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL.
585 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
586 &quot;matchType&quot;: &quot;A String&quot;, # Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT.
587 &quot;expression&quot;: &quot;A String&quot;, # Expression used for this match.
588 &quot;type&quot;: &quot;A String&quot;, # Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE.
589 },
590 ],
591 &quot;useEventValue&quot;: True or False, # Determines if the event value should be used as the value for this goal.
592 },
593 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this goal.
594 &quot;type&quot;: &quot;A String&quot;, # Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT.
595 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this goal belongs.
596 &quot;updated&quot;: &quot;A String&quot;, # Time this goal was last modified.
597 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this goal belongs.
598 &quot;created&quot;: &quot;A String&quot;, # Time this goal was created.
599 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this goal belongs.
600 &quot;id&quot;: &quot;A String&quot;, # Goal ID.
601 &quot;name&quot;: &quot;A String&quot;, # Goal name.
602 &quot;parentLink&quot;: { # Parent link for a goal. Points to the view (profile) to which this goal belongs.
603 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this goal belongs.
604 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;.
605 },
606 &quot;visitNumPagesDetails&quot;: { # Details for the goal of the type VISIT_NUM_PAGES.
607 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
608 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL.
609 },
610 &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.
611 &quot;value&quot;: 3.14, # Goal value.
612 }</pre>
John Asmuth614db982014-04-24 15:46:26 -0400613</div>
614
615</body></html>