blob: fec72462a4b9380c0e240538b4f83a403d8db86d [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">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070087 <code><a href="#list">list(accountId, webPropertyId, profileId, max_results=None, start_index=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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700115 &quot;eventDetails&quot;: { # Details for the goal of the type EVENT.
116 &quot;useEventValue&quot;: True or False, # Determines if the event value should be used as the value for this goal.
117 &quot;eventConditions&quot;: [ # List of event conditions.
118 {
119 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL.
120 &quot;type&quot;: &quot;A String&quot;, # Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE.
121 &quot;expression&quot;: &quot;A String&quot;, # Expression used for this match.
122 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
123 &quot;matchType&quot;: &quot;A String&quot;, # Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT.
124 },
125 ],
126 },
127 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this goal belongs.
128 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this goal.
129 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this goal belongs.
130 &quot;visitTimeOnSiteDetails&quot;: { # Details for the goal of the type VISIT_TIME_ON_SITE.
131 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN or GREATER_THAN.
132 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
133 },
134 &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.
135 &quot;name&quot;: &quot;A String&quot;, # Goal name.
136 &quot;parentLink&quot;: { # Parent link for a goal. Points to the view (profile) to which this goal belongs.
137 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this goal belongs.
138 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;.
139 },
140 &quot;id&quot;: &quot;A String&quot;, # Goal ID.
141 &quot;active&quot;: True or False, # Determines whether this goal is active.
142 &quot;visitNumPagesDetails&quot;: { # Details for the goal of the type VISIT_NUM_PAGES.
143 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
144 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL.
145 },
146 &quot;kind&quot;: &quot;analytics#goal&quot;, # Resource type for an Analytics goal.
147 &quot;updated&quot;: &quot;A String&quot;, # Time this goal was last modified.
148 &quot;type&quot;: &quot;A String&quot;, # Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT.
149 &quot;created&quot;: &quot;A String&quot;, # Time this goal was created.
150 &quot;urlDestinationDetails&quot;: { # Details for the goal of the type URL_DESTINATION.
151 &quot;steps&quot;: [ # List of steps configured for this goal funnel.
152 {
153 &quot;url&quot;: &quot;A String&quot;, # URL for this step.
154 &quot;number&quot;: 42, # Step number.
155 &quot;name&quot;: &quot;A String&quot;, # Step name.
156 },
157 ],
158 &quot;caseSensitive&quot;: True or False, # Determines if the goal URL must exactly match the capitalization of visited URLs.
159 &quot;url&quot;: &quot;A String&quot;, # URL for this goal.
160 &quot;matchType&quot;: &quot;A String&quot;, # Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX.
161 &quot;firstStepRequired&quot;: True or False, # Determines if the first step in this goal is required.
162 },
163 &quot;value&quot;: 3.14, # Goal value.
164 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this goal belongs.
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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700180 &quot;eventDetails&quot;: { # Details for the goal of the type EVENT.
181 &quot;useEventValue&quot;: True or False, # Determines if the event value should be used as the value for this goal.
182 &quot;eventConditions&quot;: [ # List of event conditions.
183 {
184 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL.
185 &quot;type&quot;: &quot;A String&quot;, # Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE.
186 &quot;expression&quot;: &quot;A String&quot;, # Expression used for this match.
187 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
188 &quot;matchType&quot;: &quot;A String&quot;, # Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT.
189 },
190 ],
191 },
192 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this goal belongs.
193 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this goal.
194 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this goal belongs.
195 &quot;visitTimeOnSiteDetails&quot;: { # Details for the goal of the type VISIT_TIME_ON_SITE.
196 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN or GREATER_THAN.
197 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
198 },
199 &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.
200 &quot;name&quot;: &quot;A String&quot;, # Goal name.
201 &quot;parentLink&quot;: { # Parent link for a goal. Points to the view (profile) to which this goal belongs.
202 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this goal belongs.
203 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;.
204 },
205 &quot;id&quot;: &quot;A String&quot;, # Goal ID.
206 &quot;active&quot;: True or False, # Determines whether this goal is active.
207 &quot;visitNumPagesDetails&quot;: { # Details for the goal of the type VISIT_NUM_PAGES.
208 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
209 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL.
210 },
211 &quot;kind&quot;: &quot;analytics#goal&quot;, # Resource type for an Analytics goal.
212 &quot;updated&quot;: &quot;A String&quot;, # Time this goal was last modified.
213 &quot;type&quot;: &quot;A String&quot;, # Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT.
214 &quot;created&quot;: &quot;A String&quot;, # Time this goal was created.
215 &quot;urlDestinationDetails&quot;: { # Details for the goal of the type URL_DESTINATION.
216 &quot;steps&quot;: [ # List of steps configured for this goal funnel.
217 {
218 &quot;url&quot;: &quot;A String&quot;, # URL for this step.
219 &quot;number&quot;: 42, # Step number.
220 &quot;name&quot;: &quot;A String&quot;, # Step name.
221 },
222 ],
223 &quot;caseSensitive&quot;: True or False, # Determines if the goal URL must exactly match the capitalization of visited URLs.
224 &quot;url&quot;: &quot;A String&quot;, # URL for this goal.
225 &quot;matchType&quot;: &quot;A String&quot;, # Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX.
226 &quot;firstStepRequired&quot;: True or False, # Determines if the first step in this goal is required.
227 },
228 &quot;value&quot;: 3.14, # Goal value.
229 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this goal belongs.
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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700237 &quot;eventDetails&quot;: { # Details for the goal of the type EVENT.
238 &quot;useEventValue&quot;: True or False, # Determines if the event value should be used as the value for this goal.
239 &quot;eventConditions&quot;: [ # List of event conditions.
240 {
241 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL.
242 &quot;type&quot;: &quot;A String&quot;, # Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE.
243 &quot;expression&quot;: &quot;A String&quot;, # Expression used for this match.
244 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
245 &quot;matchType&quot;: &quot;A String&quot;, # Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT.
246 },
247 ],
248 },
249 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this goal belongs.
250 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this goal.
251 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this goal belongs.
252 &quot;visitTimeOnSiteDetails&quot;: { # Details for the goal of the type VISIT_TIME_ON_SITE.
253 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN or GREATER_THAN.
254 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
255 },
256 &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.
257 &quot;name&quot;: &quot;A String&quot;, # Goal name.
258 &quot;parentLink&quot;: { # Parent link for a goal. Points to the view (profile) to which this goal belongs.
259 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this goal belongs.
260 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;.
261 },
262 &quot;id&quot;: &quot;A String&quot;, # Goal ID.
263 &quot;active&quot;: True or False, # Determines whether this goal is active.
264 &quot;visitNumPagesDetails&quot;: { # Details for the goal of the type VISIT_NUM_PAGES.
265 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
266 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL.
267 },
268 &quot;kind&quot;: &quot;analytics#goal&quot;, # Resource type for an Analytics goal.
269 &quot;updated&quot;: &quot;A String&quot;, # Time this goal was last modified.
270 &quot;type&quot;: &quot;A String&quot;, # Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT.
271 &quot;created&quot;: &quot;A String&quot;, # Time this goal was created.
272 &quot;urlDestinationDetails&quot;: { # Details for the goal of the type URL_DESTINATION.
273 &quot;steps&quot;: [ # List of steps configured for this goal funnel.
274 {
275 &quot;url&quot;: &quot;A String&quot;, # URL for this step.
276 &quot;number&quot;: 42, # Step number.
277 &quot;name&quot;: &quot;A String&quot;, # Step name.
278 },
279 ],
280 &quot;caseSensitive&quot;: True or False, # Determines if the goal URL must exactly match the capitalization of visited URLs.
281 &quot;url&quot;: &quot;A String&quot;, # URL for this goal.
282 &quot;matchType&quot;: &quot;A String&quot;, # Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX.
283 &quot;firstStepRequired&quot;: True or False, # Determines if the first step in this goal is required.
284 },
285 &quot;value&quot;: 3.14, # Goal value.
286 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this goal belongs.
287 }</pre>
John Asmuth614db982014-04-24 15:46:26 -0400288</div>
289
290<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700291 <code class="details" id="list">list(accountId, webPropertyId, profileId, max_results=None, start_index=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)
Bu Sun Kim65020912020-05-20 12:08:20 -0700298 max_results: integer, The maximum number of goals to include in this response.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700299 start_index: integer, An index of the first goal to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700305 &quot;items&quot;: [ # A list of goals.
John Asmuth614db982014-04-24 15:46:26 -0400306 { # JSON template for Analytics goal resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700307 &quot;eventDetails&quot;: { # Details for the goal of the type EVENT.
308 &quot;useEventValue&quot;: True or False, # Determines if the event value should be used as the value for this goal.
309 &quot;eventConditions&quot;: [ # List of event conditions.
310 {
311 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL.
312 &quot;type&quot;: &quot;A String&quot;, # Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE.
313 &quot;expression&quot;: &quot;A String&quot;, # Expression used for this match.
314 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
315 &quot;matchType&quot;: &quot;A String&quot;, # Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT.
316 },
317 ],
318 },
319 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this goal belongs.
320 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this goal.
321 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this goal belongs.
322 &quot;visitTimeOnSiteDetails&quot;: { # Details for the goal of the type VISIT_TIME_ON_SITE.
323 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN or GREATER_THAN.
324 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
325 },
326 &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.
327 &quot;name&quot;: &quot;A String&quot;, # Goal name.
328 &quot;parentLink&quot;: { # Parent link for a goal. Points to the view (profile) to which this goal belongs.
329 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this goal belongs.
330 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;.
331 },
332 &quot;id&quot;: &quot;A String&quot;, # Goal ID.
333 &quot;active&quot;: True or False, # Determines whether this goal is active.
334 &quot;visitNumPagesDetails&quot;: { # Details for the goal of the type VISIT_NUM_PAGES.
335 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
336 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL.
337 },
338 &quot;kind&quot;: &quot;analytics#goal&quot;, # Resource type for an Analytics goal.
339 &quot;updated&quot;: &quot;A String&quot;, # Time this goal was last modified.
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;created&quot;: &quot;A String&quot;, # Time this goal was created.
342 &quot;urlDestinationDetails&quot;: { # Details for the goal of the type URL_DESTINATION.
343 &quot;steps&quot;: [ # List of steps configured for this goal funnel.
344 {
345 &quot;url&quot;: &quot;A String&quot;, # URL for this step.
346 &quot;number&quot;: 42, # Step number.
347 &quot;name&quot;: &quot;A String&quot;, # Step name.
348 },
349 ],
350 &quot;caseSensitive&quot;: True or False, # Determines if the goal URL must exactly match the capitalization of visited URLs.
351 &quot;url&quot;: &quot;A String&quot;, # URL for this goal.
352 &quot;matchType&quot;: &quot;A String&quot;, # Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX.
353 &quot;firstStepRequired&quot;: True or False, # Determines if the first step in this goal is required.
354 },
355 &quot;value&quot;: 3.14, # Goal value.
356 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this goal belongs.
John Asmuth614db982014-04-24 15:46:26 -0400357 },
358 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700359 &quot;username&quot;: &quot;A String&quot;, # Email ID of the authenticated user
360 &quot;startIndex&quot;: 42, # The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700361 &quot;nextLink&quot;: &quot;A String&quot;, # Link to next page for this goal collection.
362 &quot;kind&quot;: &quot;analytics#goals&quot;, # Collection type.
363 &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.
364 &quot;totalResults&quot;: 42, # The total number of results for the query, regardless of the number of resources in the result.
365 &quot;previousLink&quot;: &quot;A String&quot;, # Link to previous page for this goal collection.
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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700382 &quot;eventDetails&quot;: { # Details for the goal of the type EVENT.
383 &quot;useEventValue&quot;: True or False, # Determines if the event value should be used as the value for this goal.
384 &quot;eventConditions&quot;: [ # List of event conditions.
385 {
386 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL.
387 &quot;type&quot;: &quot;A String&quot;, # Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE.
388 &quot;expression&quot;: &quot;A String&quot;, # Expression used for this match.
389 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
390 &quot;matchType&quot;: &quot;A String&quot;, # Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT.
391 },
392 ],
393 },
394 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this goal belongs.
395 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this goal.
396 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this goal belongs.
397 &quot;visitTimeOnSiteDetails&quot;: { # Details for the goal of the type VISIT_TIME_ON_SITE.
398 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN or GREATER_THAN.
399 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
400 },
401 &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.
402 &quot;name&quot;: &quot;A String&quot;, # Goal name.
403 &quot;parentLink&quot;: { # Parent link for a goal. Points to the view (profile) to which this goal belongs.
404 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this goal belongs.
405 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;.
406 },
407 &quot;id&quot;: &quot;A String&quot;, # Goal ID.
408 &quot;active&quot;: True or False, # Determines whether this goal is active.
409 &quot;visitNumPagesDetails&quot;: { # Details for the goal of the type VISIT_NUM_PAGES.
410 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
411 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL.
412 },
413 &quot;kind&quot;: &quot;analytics#goal&quot;, # Resource type for an Analytics goal.
414 &quot;updated&quot;: &quot;A String&quot;, # Time this goal was last modified.
415 &quot;type&quot;: &quot;A String&quot;, # Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT.
416 &quot;created&quot;: &quot;A String&quot;, # Time this goal was created.
417 &quot;urlDestinationDetails&quot;: { # Details for the goal of the type URL_DESTINATION.
418 &quot;steps&quot;: [ # List of steps configured for this goal funnel.
419 {
420 &quot;url&quot;: &quot;A String&quot;, # URL for this step.
421 &quot;number&quot;: 42, # Step number.
422 &quot;name&quot;: &quot;A String&quot;, # Step name.
423 },
424 ],
425 &quot;caseSensitive&quot;: True or False, # Determines if the goal URL must exactly match the capitalization of visited URLs.
426 &quot;url&quot;: &quot;A String&quot;, # URL for this goal.
427 &quot;matchType&quot;: &quot;A String&quot;, # Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX.
428 &quot;firstStepRequired&quot;: True or False, # Determines if the first step in this goal is required.
429 },
430 &quot;value&quot;: 3.14, # Goal value.
431 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this goal belongs.
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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700439 &quot;eventDetails&quot;: { # Details for the goal of the type EVENT.
440 &quot;useEventValue&quot;: True or False, # Determines if the event value should be used as the value for this goal.
441 &quot;eventConditions&quot;: [ # List of event conditions.
442 {
443 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL.
444 &quot;type&quot;: &quot;A String&quot;, # Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE.
445 &quot;expression&quot;: &quot;A String&quot;, # Expression used for this match.
446 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
447 &quot;matchType&quot;: &quot;A String&quot;, # Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT.
448 },
449 ],
450 },
451 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this goal belongs.
452 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this goal.
453 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this goal belongs.
454 &quot;visitTimeOnSiteDetails&quot;: { # Details for the goal of the type VISIT_TIME_ON_SITE.
455 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN or GREATER_THAN.
456 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
457 },
458 &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.
459 &quot;name&quot;: &quot;A String&quot;, # Goal name.
460 &quot;parentLink&quot;: { # Parent link for a goal. Points to the view (profile) to which this goal belongs.
461 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this goal belongs.
462 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;.
463 },
464 &quot;id&quot;: &quot;A String&quot;, # Goal ID.
465 &quot;active&quot;: True or False, # Determines whether this goal is active.
466 &quot;visitNumPagesDetails&quot;: { # Details for the goal of the type VISIT_NUM_PAGES.
467 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
468 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL.
469 },
470 &quot;kind&quot;: &quot;analytics#goal&quot;, # Resource type for an Analytics goal.
471 &quot;updated&quot;: &quot;A String&quot;, # Time this goal was last modified.
472 &quot;type&quot;: &quot;A String&quot;, # Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT.
473 &quot;created&quot;: &quot;A String&quot;, # Time this goal was created.
474 &quot;urlDestinationDetails&quot;: { # Details for the goal of the type URL_DESTINATION.
475 &quot;steps&quot;: [ # List of steps configured for this goal funnel.
476 {
477 &quot;url&quot;: &quot;A String&quot;, # URL for this step.
478 &quot;number&quot;: 42, # Step number.
479 &quot;name&quot;: &quot;A String&quot;, # Step name.
480 },
481 ],
482 &quot;caseSensitive&quot;: True or False, # Determines if the goal URL must exactly match the capitalization of visited URLs.
483 &quot;url&quot;: &quot;A String&quot;, # URL for this goal.
484 &quot;matchType&quot;: &quot;A String&quot;, # Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX.
485 &quot;firstStepRequired&quot;: True or False, # Determines if the first step in this goal is required.
486 },
487 &quot;value&quot;: 3.14, # Goal value.
488 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this goal belongs.
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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700505 &quot;eventDetails&quot;: { # Details for the goal of the type EVENT.
506 &quot;useEventValue&quot;: True or False, # Determines if the event value should be used as the value for this goal.
507 &quot;eventConditions&quot;: [ # List of event conditions.
508 {
509 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL.
510 &quot;type&quot;: &quot;A String&quot;, # Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE.
511 &quot;expression&quot;: &quot;A String&quot;, # Expression used for this match.
512 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
513 &quot;matchType&quot;: &quot;A String&quot;, # Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT.
514 },
515 ],
516 },
517 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this goal belongs.
518 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this goal.
519 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this goal belongs.
520 &quot;visitTimeOnSiteDetails&quot;: { # Details for the goal of the type VISIT_TIME_ON_SITE.
521 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN or GREATER_THAN.
522 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
523 },
524 &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.
525 &quot;name&quot;: &quot;A String&quot;, # Goal name.
526 &quot;parentLink&quot;: { # Parent link for a goal. Points to the view (profile) to which this goal belongs.
527 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this goal belongs.
528 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;.
529 },
530 &quot;id&quot;: &quot;A String&quot;, # Goal ID.
531 &quot;active&quot;: True or False, # Determines whether this goal is active.
532 &quot;visitNumPagesDetails&quot;: { # Details for the goal of the type VISIT_NUM_PAGES.
533 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
534 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL.
535 },
536 &quot;kind&quot;: &quot;analytics#goal&quot;, # Resource type for an Analytics goal.
537 &quot;updated&quot;: &quot;A String&quot;, # Time this goal was last modified.
538 &quot;type&quot;: &quot;A String&quot;, # Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT.
539 &quot;created&quot;: &quot;A String&quot;, # Time this goal was created.
540 &quot;urlDestinationDetails&quot;: { # Details for the goal of the type URL_DESTINATION.
541 &quot;steps&quot;: [ # List of steps configured for this goal funnel.
542 {
543 &quot;url&quot;: &quot;A String&quot;, # URL for this step.
544 &quot;number&quot;: 42, # Step number.
545 &quot;name&quot;: &quot;A String&quot;, # Step name.
546 },
547 ],
548 &quot;caseSensitive&quot;: True or False, # Determines if the goal URL must exactly match the capitalization of visited URLs.
549 &quot;url&quot;: &quot;A String&quot;, # URL for this goal.
550 &quot;matchType&quot;: &quot;A String&quot;, # Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX.
551 &quot;firstStepRequired&quot;: True or False, # Determines if the first step in this goal is required.
552 },
553 &quot;value&quot;: 3.14, # Goal value.
554 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this goal belongs.
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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700562 &quot;eventDetails&quot;: { # Details for the goal of the type EVENT.
563 &quot;useEventValue&quot;: True or False, # Determines if the event value should be used as the value for this goal.
564 &quot;eventConditions&quot;: [ # List of event conditions.
565 {
566 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL.
567 &quot;type&quot;: &quot;A String&quot;, # Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE.
568 &quot;expression&quot;: &quot;A String&quot;, # Expression used for this match.
569 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
570 &quot;matchType&quot;: &quot;A String&quot;, # Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT.
571 },
572 ],
573 },
574 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this goal belongs.
575 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this goal.
576 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this goal belongs.
577 &quot;visitTimeOnSiteDetails&quot;: { # Details for the goal of the type VISIT_TIME_ON_SITE.
578 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN or GREATER_THAN.
579 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
580 },
581 &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.
582 &quot;name&quot;: &quot;A String&quot;, # Goal name.
583 &quot;parentLink&quot;: { # Parent link for a goal. Points to the view (profile) to which this goal belongs.
584 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this goal belongs.
585 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;.
586 },
587 &quot;id&quot;: &quot;A String&quot;, # Goal ID.
588 &quot;active&quot;: True or False, # Determines whether this goal is active.
589 &quot;visitNumPagesDetails&quot;: { # Details for the goal of the type VISIT_NUM_PAGES.
590 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
591 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL.
592 },
593 &quot;kind&quot;: &quot;analytics#goal&quot;, # Resource type for an Analytics goal.
594 &quot;updated&quot;: &quot;A String&quot;, # Time this goal was last modified.
595 &quot;type&quot;: &quot;A String&quot;, # Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT.
596 &quot;created&quot;: &quot;A String&quot;, # Time this goal was created.
597 &quot;urlDestinationDetails&quot;: { # Details for the goal of the type URL_DESTINATION.
598 &quot;steps&quot;: [ # List of steps configured for this goal funnel.
599 {
600 &quot;url&quot;: &quot;A String&quot;, # URL for this step.
601 &quot;number&quot;: 42, # Step number.
602 &quot;name&quot;: &quot;A String&quot;, # Step name.
603 },
604 ],
605 &quot;caseSensitive&quot;: True or False, # Determines if the goal URL must exactly match the capitalization of visited URLs.
606 &quot;url&quot;: &quot;A String&quot;, # URL for this goal.
607 &quot;matchType&quot;: &quot;A String&quot;, # Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX.
608 &quot;firstStepRequired&quot;: True or False, # Determines if the first step in this goal is required.
609 },
610 &quot;value&quot;: 3.14, # Goal value.
611 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this goal belongs.
612 }</pre>
John Asmuth614db982014-04-24 15:46:26 -0400613</div>
614
615</body></html>