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