1<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5  margin: 0;
6  padding: 0;
7  border: 0;
8  font-weight: inherit;
9  font-style: inherit;
10  font-size: 100%;
11  font-family: inherit;
12  vertical-align: baseline;
13}
14
15body {
16  font-size: 13px;
17  padding: 1em;
18}
19
20h1 {
21  font-size: 26px;
22  margin-bottom: 1em;
23}
24
25h2 {
26  font-size: 24px;
27  margin-bottom: 1em;
28}
29
30h3 {
31  font-size: 20px;
32  margin-bottom: 1em;
33  margin-top: 1em;
34}
35
36pre, code {
37  line-height: 1.5;
38  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42  margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46  font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50  border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54  margin-top: 0.5em;
55}
56
57.firstline {
58  margin-left: 2 em;
59}
60
61.method  {
62  margin-top: 1em;
63  border: solid 1px #CCC;
64  padding: 1em;
65  background: #EEE;
66}
67
68.details {
69  font-weight: bold;
70  font-size: 14px;
71}
72
73</style>
74
75<h1><a href="analytics_v3.html">Google Analytics API</a> . <a href="analytics_v3.management.html">management</a> . <a href="analytics_v3.management.goals.html">goals</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
81  <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">
84  <code><a href="#insert">insert(accountId, webPropertyId, profileId, body=None)</a></code></p>
85<p class="firstline">Create a new goal.</p>
86<p class="toc_element">
87  <code><a href="#list">list(accountId, webPropertyId, profileId, max_results=None, start_index=None)</a></code></p>
88<p class="firstline">Lists goals to which the user has access.</p>
89<p class="toc_element">
90  <code><a href="#patch">patch(accountId, webPropertyId, profileId, goalId, body=None)</a></code></p>
91<p class="firstline">Updates an existing goal. This method supports patch semantics.</p>
92<p class="toc_element">
93  <code><a href="#update">update(accountId, webPropertyId, profileId, goalId, body=None)</a></code></p>
94<p class="firstline">Updates an existing goal.</p>
95<h3>Method Details</h3>
96<div class="method">
97    <code class="details" id="close">close()</code>
98  <pre>Close httplib2 connections.</pre>
99</div>
100
101<div class="method">
102    <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.
115  &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.
122        &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
123        &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.
126      },
127    ],
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.
151      },
152    ],
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>
166</div>
167
168<div class="method">
169    <code class="details" id="insert">insert(accountId, webPropertyId, profileId, body=None)</code>
170  <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)
176  body: object, The request body.
177    The object takes the form of:
178
179{ # JSON template for Analytics goal resource.
180  &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}
231
232
233Returns:
234  An object of the form:
235
236    { # JSON template for Analytics goal resource.
237  &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.
244        &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
245        &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.
248      },
249    ],
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.
273      },
274    ],
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>
288</div>
289
290<div class="method">
291    <code class="details" id="list">list(accountId, webPropertyId, profileId, max_results=None, start_index=None)</code>
292  <pre>Lists goals to which the user has access.
293
294Args:
295  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)
298  max_results: integer, The maximum number of goals to include in this response.
299  start_index: integer, An index of the first goal to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
300
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.
305  &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.
314            &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
315            &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.
318          },
319        ],
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.
343          },
344        ],
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>
367</div>
368
369<div class="method">
370    <code class="details" id="patch">patch(accountId, webPropertyId, profileId, goalId, body=None)</code>
371  <pre>Updates an existing goal. This method supports patch semantics.
372
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)
378  body: object, The request body.
379    The object takes the form of:
380
381{ # JSON template for Analytics goal resource.
382  &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}
433
434
435Returns:
436  An object of the form:
437
438    { # JSON template for Analytics goal resource.
439  &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.
446        &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
447        &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.
450      },
451    ],
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.
475      },
476    ],
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>
490</div>
491
492<div class="method">
493    <code class="details" id="update">update(accountId, webPropertyId, profileId, goalId, body=None)</code>
494  <pre>Updates an existing goal.
495
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)
501  body: object, The request body.
502    The object takes the form of:
503
504{ # JSON template for Analytics goal resource.
505  &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}
556
557
558Returns:
559  An object of the form:
560
561    { # JSON template for Analytics goal resource.
562  &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.
569        &quot;comparisonValue&quot;: &quot;A String&quot;, # Value used for this comparison.
570        &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.
573      },
574    ],
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.
598      },
599    ],
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>
613</div>
614
615</body></html>