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