blob: cd1aae10e0e83eaf2711d049d882d03bb3d189dc [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 Bot0bf565c2020-12-09 08:56:03 -080087 <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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800115 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this goal belongs.
116 &quot;active&quot;: True or False, # Determines whether this goal is active.
117 &quot;created&quot;: &quot;A String&quot;, # Time this goal was created.
118 &quot;eventDetails&quot;: { # Details for the goal of the type EVENT.
119 &quot;eventConditions&quot;: [ # List of event conditions.
120 {
121 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800122 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800123 &quot;expression&quot;: &quot;A String&quot;, # Expression used for this match.
124 &quot;matchType&quot;: &quot;A String&quot;, # Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT.
125 &quot;type&quot;: &quot;A String&quot;, # Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800126 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800127 ],
128 &quot;useEventValue&quot;: True or False, # Determines if the event value should be used as the value for this goal.
129 },
130 &quot;id&quot;: &quot;A String&quot;, # Goal ID.
131 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this goal belongs.
132 &quot;kind&quot;: &quot;analytics#goal&quot;, # Resource type for an Analytics goal.
133 &quot;name&quot;: &quot;A String&quot;, # Goal name.
134 &quot;parentLink&quot;: { # Parent link for a goal. Points to the view (profile) to which this goal belongs.
135 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this goal belongs.
136 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;.
137 },
138 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this goal belongs.
139 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this goal.
140 &quot;type&quot;: &quot;A String&quot;, # Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT.
141 &quot;updated&quot;: &quot;A String&quot;, # Time this goal was last modified.
142 &quot;urlDestinationDetails&quot;: { # Details for the goal of the type URL_DESTINATION.
143 &quot;caseSensitive&quot;: True or False, # Determines if the goal URL must exactly match the capitalization of visited URLs.
144 &quot;firstStepRequired&quot;: True or False, # Determines if the first step in this goal is required.
145 &quot;matchType&quot;: &quot;A String&quot;, # Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX.
146 &quot;steps&quot;: [ # List of steps configured for this goal funnel.
147 {
148 &quot;name&quot;: &quot;A String&quot;, # Step name.
149 &quot;number&quot;: 42, # Step number.
150 &quot;url&quot;: &quot;A String&quot;, # URL for this step.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800151 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800152 ],
153 &quot;url&quot;: &quot;A String&quot;, # URL for this goal.
154 },
155 &quot;value&quot;: 3.14, # Goal value.
156 &quot;visitNumPagesDetails&quot;: { # Details for the goal of the type VISIT_NUM_PAGES.
157 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL.
158 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
159 },
160 &quot;visitTimeOnSiteDetails&quot;: { # Details for the goal of the type VISIT_TIME_ON_SITE.
161 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN or GREATER_THAN.
162 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
163 },
164 &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.
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 Botcc94ec82021-01-15 07:10:04 -0800180 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this goal belongs.
181 &quot;active&quot;: True or False, # Determines whether this goal is active.
182 &quot;created&quot;: &quot;A String&quot;, # Time this goal was created.
183 &quot;eventDetails&quot;: { # Details for the goal of the type EVENT.
184 &quot;eventConditions&quot;: [ # List of event conditions.
185 {
186 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL.
187 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
188 &quot;expression&quot;: &quot;A String&quot;, # Expression used for this match.
189 &quot;matchType&quot;: &quot;A String&quot;, # Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT.
190 &quot;type&quot;: &quot;A String&quot;, # Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE.
191 },
192 ],
193 &quot;useEventValue&quot;: True or False, # Determines if the event value should be used as the value for this goal.
194 },
195 &quot;id&quot;: &quot;A String&quot;, # Goal ID.
196 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this goal belongs.
197 &quot;kind&quot;: &quot;analytics#goal&quot;, # Resource type for an Analytics goal.
198 &quot;name&quot;: &quot;A String&quot;, # Goal name.
199 &quot;parentLink&quot;: { # Parent link for a goal. Points to the view (profile) to which this goal belongs.
200 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this goal belongs.
201 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;.
202 },
203 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this goal belongs.
204 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this goal.
205 &quot;type&quot;: &quot;A String&quot;, # Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT.
206 &quot;updated&quot;: &quot;A String&quot;, # Time this goal was last modified.
207 &quot;urlDestinationDetails&quot;: { # Details for the goal of the type URL_DESTINATION.
208 &quot;caseSensitive&quot;: True or False, # Determines if the goal URL must exactly match the capitalization of visited URLs.
209 &quot;firstStepRequired&quot;: True or False, # Determines if the first step in this goal is required.
210 &quot;matchType&quot;: &quot;A String&quot;, # Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX.
211 &quot;steps&quot;: [ # List of steps configured for this goal funnel.
212 {
213 &quot;name&quot;: &quot;A String&quot;, # Step name.
214 &quot;number&quot;: 42, # Step number.
215 &quot;url&quot;: &quot;A String&quot;, # URL for this step.
216 },
217 ],
218 &quot;url&quot;: &quot;A String&quot;, # URL for this goal.
219 },
220 &quot;value&quot;: 3.14, # Goal value.
221 &quot;visitNumPagesDetails&quot;: { # Details for the goal of the type VISIT_NUM_PAGES.
222 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL.
223 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
224 },
225 &quot;visitTimeOnSiteDetails&quot;: { # Details for the goal of the type VISIT_TIME_ON_SITE.
226 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN or GREATER_THAN.
227 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
228 },
229 &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.
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 Botcc94ec82021-01-15 07:10:04 -0800237 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this goal belongs.
238 &quot;active&quot;: True or False, # Determines whether this goal is active.
239 &quot;created&quot;: &quot;A String&quot;, # Time this goal was created.
240 &quot;eventDetails&quot;: { # Details for the goal of the type EVENT.
241 &quot;eventConditions&quot;: [ # List of event conditions.
242 {
243 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800244 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800245 &quot;expression&quot;: &quot;A String&quot;, # Expression used for this match.
246 &quot;matchType&quot;: &quot;A String&quot;, # Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT.
247 &quot;type&quot;: &quot;A String&quot;, # Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800248 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800249 ],
250 &quot;useEventValue&quot;: True or False, # Determines if the event value should be used as the value for this goal.
251 },
252 &quot;id&quot;: &quot;A String&quot;, # Goal ID.
253 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this goal belongs.
254 &quot;kind&quot;: &quot;analytics#goal&quot;, # Resource type for an Analytics goal.
255 &quot;name&quot;: &quot;A String&quot;, # Goal name.
256 &quot;parentLink&quot;: { # Parent link for a goal. Points to the view (profile) to which this goal belongs.
257 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this goal belongs.
258 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;.
259 },
260 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this goal belongs.
261 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this goal.
262 &quot;type&quot;: &quot;A String&quot;, # Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT.
263 &quot;updated&quot;: &quot;A String&quot;, # Time this goal was last modified.
264 &quot;urlDestinationDetails&quot;: { # Details for the goal of the type URL_DESTINATION.
265 &quot;caseSensitive&quot;: True or False, # Determines if the goal URL must exactly match the capitalization of visited URLs.
266 &quot;firstStepRequired&quot;: True or False, # Determines if the first step in this goal is required.
267 &quot;matchType&quot;: &quot;A String&quot;, # Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX.
268 &quot;steps&quot;: [ # List of steps configured for this goal funnel.
269 {
270 &quot;name&quot;: &quot;A String&quot;, # Step name.
271 &quot;number&quot;: 42, # Step number.
272 &quot;url&quot;: &quot;A String&quot;, # URL for this step.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800273 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800274 ],
275 &quot;url&quot;: &quot;A String&quot;, # URL for this goal.
276 },
277 &quot;value&quot;: 3.14, # Goal value.
278 &quot;visitNumPagesDetails&quot;: { # Details for the goal of the type VISIT_NUM_PAGES.
279 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL.
280 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
281 },
282 &quot;visitTimeOnSiteDetails&quot;: { # Details for the goal of the type VISIT_TIME_ON_SITE.
283 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN or GREATER_THAN.
284 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
285 },
286 &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.
287}</pre>
John Asmuth614db982014-04-24 15:46:26 -0400288</div>
289
290<div class="method">
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800291 <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)
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800298 max_results: integer, The maximum number of goals to include in this response.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800299 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800305 &quot;items&quot;: [ # A list of goals.
306 { # JSON template for Analytics goal resource.
307 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this goal belongs.
308 &quot;active&quot;: True or False, # Determines whether this goal is active.
309 &quot;created&quot;: &quot;A String&quot;, # Time this goal was created.
310 &quot;eventDetails&quot;: { # Details for the goal of the type EVENT.
311 &quot;eventConditions&quot;: [ # List of event conditions.
312 {
313 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800314 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800315 &quot;expression&quot;: &quot;A String&quot;, # Expression used for this match.
316 &quot;matchType&quot;: &quot;A String&quot;, # Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT.
317 &quot;type&quot;: &quot;A String&quot;, # Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800318 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800319 ],
320 &quot;useEventValue&quot;: True or False, # Determines if the event value should be used as the value for this goal.
321 },
322 &quot;id&quot;: &quot;A String&quot;, # Goal ID.
323 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this goal belongs.
324 &quot;kind&quot;: &quot;analytics#goal&quot;, # Resource type for an Analytics goal.
325 &quot;name&quot;: &quot;A String&quot;, # Goal name.
326 &quot;parentLink&quot;: { # Parent link for a goal. Points to the view (profile) to which this goal belongs.
327 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this goal belongs.
328 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;.
329 },
330 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this goal belongs.
331 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this goal.
332 &quot;type&quot;: &quot;A String&quot;, # Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT.
333 &quot;updated&quot;: &quot;A String&quot;, # Time this goal was last modified.
334 &quot;urlDestinationDetails&quot;: { # Details for the goal of the type URL_DESTINATION.
335 &quot;caseSensitive&quot;: True or False, # Determines if the goal URL must exactly match the capitalization of visited URLs.
336 &quot;firstStepRequired&quot;: True or False, # Determines if the first step in this goal is required.
337 &quot;matchType&quot;: &quot;A String&quot;, # Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX.
338 &quot;steps&quot;: [ # List of steps configured for this goal funnel.
339 {
340 &quot;name&quot;: &quot;A String&quot;, # Step name.
341 &quot;number&quot;: 42, # Step number.
342 &quot;url&quot;: &quot;A String&quot;, # URL for this step.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800343 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800344 ],
345 &quot;url&quot;: &quot;A String&quot;, # URL for this goal.
346 },
347 &quot;value&quot;: 3.14, # Goal value.
348 &quot;visitNumPagesDetails&quot;: { # Details for the goal of the type VISIT_NUM_PAGES.
349 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL.
350 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
351 },
352 &quot;visitTimeOnSiteDetails&quot;: { # Details for the goal of the type VISIT_TIME_ON_SITE.
353 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN or GREATER_THAN.
354 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
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 },
358 ],
359 &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.
360 &quot;kind&quot;: &quot;analytics#goals&quot;, # Collection type.
361 &quot;nextLink&quot;: &quot;A String&quot;, # Link to next page for this goal collection.
362 &quot;previousLink&quot;: &quot;A String&quot;, # Link to previous page for this goal collection.
363 &quot;startIndex&quot;: 42, # The starting index of the resources, which is 1 by default or otherwise specified by the start-index 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;username&quot;: &quot;A String&quot;, # Email ID of the authenticated user
366}</pre>
John Asmuth614db982014-04-24 15:46:26 -0400367</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 Botcc94ec82021-01-15 07:10:04 -0800382 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this goal belongs.
383 &quot;active&quot;: True or False, # Determines whether this goal is active.
384 &quot;created&quot;: &quot;A String&quot;, # Time this goal was created.
385 &quot;eventDetails&quot;: { # Details for the goal of the type EVENT.
386 &quot;eventConditions&quot;: [ # List of event conditions.
387 {
388 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL.
389 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
390 &quot;expression&quot;: &quot;A String&quot;, # Expression used for this match.
391 &quot;matchType&quot;: &quot;A String&quot;, # Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT.
392 &quot;type&quot;: &quot;A String&quot;, # Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE.
393 },
394 ],
395 &quot;useEventValue&quot;: True or False, # Determines if the event value should be used as the value for this goal.
396 },
397 &quot;id&quot;: &quot;A String&quot;, # Goal ID.
398 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this goal belongs.
399 &quot;kind&quot;: &quot;analytics#goal&quot;, # Resource type for an Analytics goal.
400 &quot;name&quot;: &quot;A String&quot;, # Goal name.
401 &quot;parentLink&quot;: { # Parent link for a goal. Points to the view (profile) to which this goal belongs.
402 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this goal belongs.
403 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;.
404 },
405 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this goal belongs.
406 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this goal.
407 &quot;type&quot;: &quot;A String&quot;, # Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT.
408 &quot;updated&quot;: &quot;A String&quot;, # Time this goal was last modified.
409 &quot;urlDestinationDetails&quot;: { # Details for the goal of the type URL_DESTINATION.
410 &quot;caseSensitive&quot;: True or False, # Determines if the goal URL must exactly match the capitalization of visited URLs.
411 &quot;firstStepRequired&quot;: True or False, # Determines if the first step in this goal is required.
412 &quot;matchType&quot;: &quot;A String&quot;, # Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX.
413 &quot;steps&quot;: [ # List of steps configured for this goal funnel.
414 {
415 &quot;name&quot;: &quot;A String&quot;, # Step name.
416 &quot;number&quot;: 42, # Step number.
417 &quot;url&quot;: &quot;A String&quot;, # URL for this step.
418 },
419 ],
420 &quot;url&quot;: &quot;A String&quot;, # URL for this goal.
421 },
422 &quot;value&quot;: 3.14, # Goal value.
423 &quot;visitNumPagesDetails&quot;: { # Details for the goal of the type VISIT_NUM_PAGES.
424 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL.
425 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
426 },
427 &quot;visitTimeOnSiteDetails&quot;: { # Details for the goal of the type VISIT_TIME_ON_SITE.
428 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN or GREATER_THAN.
429 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
430 },
431 &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.
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 Botcc94ec82021-01-15 07:10:04 -0800439 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this goal belongs.
440 &quot;active&quot;: True or False, # Determines whether this goal is active.
441 &quot;created&quot;: &quot;A String&quot;, # Time this goal was created.
442 &quot;eventDetails&quot;: { # Details for the goal of the type EVENT.
443 &quot;eventConditions&quot;: [ # List of event conditions.
444 {
445 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800446 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800447 &quot;expression&quot;: &quot;A String&quot;, # Expression used for this match.
448 &quot;matchType&quot;: &quot;A String&quot;, # Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT.
449 &quot;type&quot;: &quot;A String&quot;, # Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800450 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800451 ],
452 &quot;useEventValue&quot;: True or False, # Determines if the event value should be used as the value for this goal.
453 },
454 &quot;id&quot;: &quot;A String&quot;, # Goal ID.
455 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this goal belongs.
456 &quot;kind&quot;: &quot;analytics#goal&quot;, # Resource type for an Analytics goal.
457 &quot;name&quot;: &quot;A String&quot;, # Goal name.
458 &quot;parentLink&quot;: { # Parent link for a goal. Points to the view (profile) to which this goal belongs.
459 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this goal belongs.
460 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;.
461 },
462 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this goal belongs.
463 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this goal.
464 &quot;type&quot;: &quot;A String&quot;, # Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT.
465 &quot;updated&quot;: &quot;A String&quot;, # Time this goal was last modified.
466 &quot;urlDestinationDetails&quot;: { # Details for the goal of the type URL_DESTINATION.
467 &quot;caseSensitive&quot;: True or False, # Determines if the goal URL must exactly match the capitalization of visited URLs.
468 &quot;firstStepRequired&quot;: True or False, # Determines if the first step in this goal is required.
469 &quot;matchType&quot;: &quot;A String&quot;, # Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX.
470 &quot;steps&quot;: [ # List of steps configured for this goal funnel.
471 {
472 &quot;name&quot;: &quot;A String&quot;, # Step name.
473 &quot;number&quot;: 42, # Step number.
474 &quot;url&quot;: &quot;A String&quot;, # URL for this step.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800475 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800476 ],
477 &quot;url&quot;: &quot;A String&quot;, # URL for this goal.
478 },
479 &quot;value&quot;: 3.14, # Goal value.
480 &quot;visitNumPagesDetails&quot;: { # Details for the goal of the type VISIT_NUM_PAGES.
481 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL.
482 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
483 },
484 &quot;visitTimeOnSiteDetails&quot;: { # Details for the goal of the type VISIT_TIME_ON_SITE.
485 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN or GREATER_THAN.
486 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
487 },
488 &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.
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 Botcc94ec82021-01-15 07:10:04 -0800505 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this goal belongs.
506 &quot;active&quot;: True or False, # Determines whether this goal is active.
507 &quot;created&quot;: &quot;A String&quot;, # Time this goal was created.
508 &quot;eventDetails&quot;: { # Details for the goal of the type EVENT.
509 &quot;eventConditions&quot;: [ # List of event conditions.
510 {
511 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL.
512 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
513 &quot;expression&quot;: &quot;A String&quot;, # Expression used for this match.
514 &quot;matchType&quot;: &quot;A String&quot;, # Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT.
515 &quot;type&quot;: &quot;A String&quot;, # Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE.
516 },
517 ],
518 &quot;useEventValue&quot;: True or False, # Determines if the event value should be used as the value for this goal.
519 },
520 &quot;id&quot;: &quot;A String&quot;, # Goal ID.
521 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this goal belongs.
522 &quot;kind&quot;: &quot;analytics#goal&quot;, # Resource type for an Analytics goal.
523 &quot;name&quot;: &quot;A String&quot;, # Goal name.
524 &quot;parentLink&quot;: { # Parent link for a goal. Points to the view (profile) to which this goal belongs.
525 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this goal belongs.
526 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;.
527 },
528 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this goal belongs.
529 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this goal.
530 &quot;type&quot;: &quot;A String&quot;, # Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT.
531 &quot;updated&quot;: &quot;A String&quot;, # Time this goal was last modified.
532 &quot;urlDestinationDetails&quot;: { # Details for the goal of the type URL_DESTINATION.
533 &quot;caseSensitive&quot;: True or False, # Determines if the goal URL must exactly match the capitalization of visited URLs.
534 &quot;firstStepRequired&quot;: True or False, # Determines if the first step in this goal is required.
535 &quot;matchType&quot;: &quot;A String&quot;, # Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX.
536 &quot;steps&quot;: [ # List of steps configured for this goal funnel.
537 {
538 &quot;name&quot;: &quot;A String&quot;, # Step name.
539 &quot;number&quot;: 42, # Step number.
540 &quot;url&quot;: &quot;A String&quot;, # URL for this step.
541 },
542 ],
543 &quot;url&quot;: &quot;A String&quot;, # URL for this goal.
544 },
545 &quot;value&quot;: 3.14, # Goal value.
546 &quot;visitNumPagesDetails&quot;: { # Details for the goal of the type VISIT_NUM_PAGES.
547 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL.
548 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
549 },
550 &quot;visitTimeOnSiteDetails&quot;: { # Details for the goal of the type VISIT_TIME_ON_SITE.
551 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN or GREATER_THAN.
552 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
553 },
554 &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.
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 Botcc94ec82021-01-15 07:10:04 -0800562 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this goal belongs.
563 &quot;active&quot;: True or False, # Determines whether this goal is active.
564 &quot;created&quot;: &quot;A String&quot;, # Time this goal was created.
565 &quot;eventDetails&quot;: { # Details for the goal of the type EVENT.
566 &quot;eventConditions&quot;: [ # List of event conditions.
567 {
568 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800569 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800570 &quot;expression&quot;: &quot;A String&quot;, # Expression used for this match.
571 &quot;matchType&quot;: &quot;A String&quot;, # Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT.
572 &quot;type&quot;: &quot;A String&quot;, # Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800573 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800574 ],
575 &quot;useEventValue&quot;: True or False, # Determines if the event value should be used as the value for this goal.
576 },
577 &quot;id&quot;: &quot;A String&quot;, # Goal ID.
578 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this goal belongs.
579 &quot;kind&quot;: &quot;analytics#goal&quot;, # Resource type for an Analytics goal.
580 &quot;name&quot;: &quot;A String&quot;, # Goal name.
581 &quot;parentLink&quot;: { # Parent link for a goal. Points to the view (profile) to which this goal belongs.
582 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this goal belongs.
583 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;.
584 },
585 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this goal belongs.
586 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this goal.
587 &quot;type&quot;: &quot;A String&quot;, # Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT.
588 &quot;updated&quot;: &quot;A String&quot;, # Time this goal was last modified.
589 &quot;urlDestinationDetails&quot;: { # Details for the goal of the type URL_DESTINATION.
590 &quot;caseSensitive&quot;: True or False, # Determines if the goal URL must exactly match the capitalization of visited URLs.
591 &quot;firstStepRequired&quot;: True or False, # Determines if the first step in this goal is required.
592 &quot;matchType&quot;: &quot;A String&quot;, # Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX.
593 &quot;steps&quot;: [ # List of steps configured for this goal funnel.
594 {
595 &quot;name&quot;: &quot;A String&quot;, # Step name.
596 &quot;number&quot;: 42, # Step number.
597 &quot;url&quot;: &quot;A String&quot;, # URL for this step.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800598 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800599 ],
600 &quot;url&quot;: &quot;A String&quot;, # URL for this goal.
601 },
602 &quot;value&quot;: 3.14, # Goal value.
603 &quot;visitNumPagesDetails&quot;: { # Details for the goal of the type VISIT_NUM_PAGES.
604 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL.
605 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
606 },
607 &quot;visitTimeOnSiteDetails&quot;: { # Details for the goal of the type VISIT_TIME_ON_SITE.
608 &quot;comparisonType&quot;: &quot;A String&quot;, # Type of comparison. Possible values are LESS_THAN or GREATER_THAN.
609 &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
610 },
611 &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.
612}</pre>
John Asmuth614db982014-04-24 15:46:26 -0400613</div>
614
615</body></html>