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.webproperties.html">webproperties</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)</a></code></p> 82<p class="firstline">Gets a web property to which the user has access.</p> 83<p class="toc_element"> 84 <code><a href="#insert">insert(accountId, body=None)</a></code></p> 85<p class="firstline">Create a new property if the account has fewer than 20 properties. Web properties are visible in the Google Analytics interface only if they have at least one profile.</p> 86<p class="toc_element"> 87 <code><a href="#list">list(accountId, max_results=None, start_index=None)</a></code></p> 88<p class="firstline">Lists web properties to which the user has access.</p> 89<p class="toc_element"> 90 <code><a href="#patch">patch(accountId, webPropertyId, body=None)</a></code></p> 91<p class="firstline">Updates an existing web property. This method supports patch semantics.</p> 92<p class="toc_element"> 93 <code><a href="#update">update(accountId, webPropertyId, body=None)</a></code></p> 94<p class="firstline">Updates an existing web property.</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)</code> 103 <pre>Gets a web property to which the user has access. 104 105Args: 106 accountId: string, Account ID to retrieve the web property for. (required) 107 webPropertyId: string, ID to retrieve the web property for. (required) 108 109Returns: 110 An object of the form: 111 112 { # JSON template for an Analytics web property. 113 "accountId": "A String", # Account ID to which this web property belongs. 114 "childLink": { # Child link for this web property. Points to the list of views (profiles) for this web property. 115 "href": "A String", # Link to the list of views (profiles) for this web property. 116 "type": "analytics#profiles", # Type of the parent link. Its value is "analytics#profiles". 117 }, 118 "created": "A String", # Time this web property was created. 119 "dataRetentionResetOnNewActivity": True or False, # Set to true to reset the retention period of the user identifier with each new event from that user (thus setting the expiration date to current time plus retention period). 120 # Set to false to delete data associated with the user identifier automatically after the rentention period. 121 # This property cannot be set on insert. 122 "dataRetentionTtl": "A String", # The length of time for which user and event data is retained. 123 # This property cannot be set on insert. 124 "defaultProfileId": "A String", # Default view (profile) ID. 125 "id": "A String", # Web property ID of the form UA-XXXXX-YY. 126 "industryVertical": "A String", # The industry vertical/category selected for this web property. 127 "internalWebPropertyId": "A String", # Internal ID for this web property. 128 "kind": "analytics#webproperty", # Resource type for Analytics WebProperty. 129 "level": "A String", # Level for this web property. Possible values are STANDARD or PREMIUM. 130 "name": "A String", # Name of this web property. 131 "parentLink": { # Parent link for this web property. Points to the account to which this web property belongs. 132 "href": "A String", # Link to the account for this web property. 133 "type": "analytics#account", # Type of the parent link. Its value is "analytics#account". 134 }, 135 "permissions": { # Permissions the user has for this web property. 136 "effective": [ # All the permissions that the user has for this web property. These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions from the parent account. 137 "A String", 138 ], 139 }, 140 "profileCount": 42, # View (Profile) count for this web property. 141 "selfLink": "A String", # Link for this web property. 142 "starred": True or False, # Indicates whether this web property is starred or not. 143 "updated": "A String", # Time this web property was last modified. 144 "websiteUrl": "A String", # Website url for this web property. 145}</pre> 146</div> 147 148<div class="method"> 149 <code class="details" id="insert">insert(accountId, body=None)</code> 150 <pre>Create a new property if the account has fewer than 20 properties. Web properties are visible in the Google Analytics interface only if they have at least one profile. 151 152Args: 153 accountId: string, Account ID to create the web property for. (required) 154 body: object, The request body. 155 The object takes the form of: 156 157{ # JSON template for an Analytics web property. 158 "accountId": "A String", # Account ID to which this web property belongs. 159 "childLink": { # Child link for this web property. Points to the list of views (profiles) for this web property. 160 "href": "A String", # Link to the list of views (profiles) for this web property. 161 "type": "analytics#profiles", # Type of the parent link. Its value is "analytics#profiles". 162 }, 163 "created": "A String", # Time this web property was created. 164 "dataRetentionResetOnNewActivity": True or False, # Set to true to reset the retention period of the user identifier with each new event from that user (thus setting the expiration date to current time plus retention period). 165 # Set to false to delete data associated with the user identifier automatically after the rentention period. 166 # This property cannot be set on insert. 167 "dataRetentionTtl": "A String", # The length of time for which user and event data is retained. 168 # This property cannot be set on insert. 169 "defaultProfileId": "A String", # Default view (profile) ID. 170 "id": "A String", # Web property ID of the form UA-XXXXX-YY. 171 "industryVertical": "A String", # The industry vertical/category selected for this web property. 172 "internalWebPropertyId": "A String", # Internal ID for this web property. 173 "kind": "analytics#webproperty", # Resource type for Analytics WebProperty. 174 "level": "A String", # Level for this web property. Possible values are STANDARD or PREMIUM. 175 "name": "A String", # Name of this web property. 176 "parentLink": { # Parent link for this web property. Points to the account to which this web property belongs. 177 "href": "A String", # Link to the account for this web property. 178 "type": "analytics#account", # Type of the parent link. Its value is "analytics#account". 179 }, 180 "permissions": { # Permissions the user has for this web property. 181 "effective": [ # All the permissions that the user has for this web property. These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions from the parent account. 182 "A String", 183 ], 184 }, 185 "profileCount": 42, # View (Profile) count for this web property. 186 "selfLink": "A String", # Link for this web property. 187 "starred": True or False, # Indicates whether this web property is starred or not. 188 "updated": "A String", # Time this web property was last modified. 189 "websiteUrl": "A String", # Website url for this web property. 190} 191 192 193Returns: 194 An object of the form: 195 196 { # JSON template for an Analytics web property. 197 "accountId": "A String", # Account ID to which this web property belongs. 198 "childLink": { # Child link for this web property. Points to the list of views (profiles) for this web property. 199 "href": "A String", # Link to the list of views (profiles) for this web property. 200 "type": "analytics#profiles", # Type of the parent link. Its value is "analytics#profiles". 201 }, 202 "created": "A String", # Time this web property was created. 203 "dataRetentionResetOnNewActivity": True or False, # Set to true to reset the retention period of the user identifier with each new event from that user (thus setting the expiration date to current time plus retention period). 204 # Set to false to delete data associated with the user identifier automatically after the rentention period. 205 # This property cannot be set on insert. 206 "dataRetentionTtl": "A String", # The length of time for which user and event data is retained. 207 # This property cannot be set on insert. 208 "defaultProfileId": "A String", # Default view (profile) ID. 209 "id": "A String", # Web property ID of the form UA-XXXXX-YY. 210 "industryVertical": "A String", # The industry vertical/category selected for this web property. 211 "internalWebPropertyId": "A String", # Internal ID for this web property. 212 "kind": "analytics#webproperty", # Resource type for Analytics WebProperty. 213 "level": "A String", # Level for this web property. Possible values are STANDARD or PREMIUM. 214 "name": "A String", # Name of this web property. 215 "parentLink": { # Parent link for this web property. Points to the account to which this web property belongs. 216 "href": "A String", # Link to the account for this web property. 217 "type": "analytics#account", # Type of the parent link. Its value is "analytics#account". 218 }, 219 "permissions": { # Permissions the user has for this web property. 220 "effective": [ # All the permissions that the user has for this web property. These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions from the parent account. 221 "A String", 222 ], 223 }, 224 "profileCount": 42, # View (Profile) count for this web property. 225 "selfLink": "A String", # Link for this web property. 226 "starred": True or False, # Indicates whether this web property is starred or not. 227 "updated": "A String", # Time this web property was last modified. 228 "websiteUrl": "A String", # Website url for this web property. 229}</pre> 230</div> 231 232<div class="method"> 233 <code class="details" id="list">list(accountId, max_results=None, start_index=None)</code> 234 <pre>Lists web properties to which the user has access. 235 236Args: 237 accountId: string, Account ID to retrieve web properties for. Can either be a specific account ID or '~all', which refers to all the accounts that user has access to. (required) 238 max_results: integer, The maximum number of web properties to include in this response. 239 start_index: integer, An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. 240 241Returns: 242 An object of the form: 243 244 { # A web property collection lists Analytics web properties to which the user has access. Each resource in the collection corresponds to a single Analytics web property. 245 "items": [ # A list of web properties. 246 { # JSON template for an Analytics web property. 247 "accountId": "A String", # Account ID to which this web property belongs. 248 "childLink": { # Child link for this web property. Points to the list of views (profiles) for this web property. 249 "href": "A String", # Link to the list of views (profiles) for this web property. 250 "type": "analytics#profiles", # Type of the parent link. Its value is "analytics#profiles". 251 }, 252 "created": "A String", # Time this web property was created. 253 "dataRetentionResetOnNewActivity": True or False, # Set to true to reset the retention period of the user identifier with each new event from that user (thus setting the expiration date to current time plus retention period). 254 # Set to false to delete data associated with the user identifier automatically after the rentention period. 255 # This property cannot be set on insert. 256 "dataRetentionTtl": "A String", # The length of time for which user and event data is retained. 257 # This property cannot be set on insert. 258 "defaultProfileId": "A String", # Default view (profile) ID. 259 "id": "A String", # Web property ID of the form UA-XXXXX-YY. 260 "industryVertical": "A String", # The industry vertical/category selected for this web property. 261 "internalWebPropertyId": "A String", # Internal ID for this web property. 262 "kind": "analytics#webproperty", # Resource type for Analytics WebProperty. 263 "level": "A String", # Level for this web property. Possible values are STANDARD or PREMIUM. 264 "name": "A String", # Name of this web property. 265 "parentLink": { # Parent link for this web property. Points to the account to which this web property belongs. 266 "href": "A String", # Link to the account for this web property. 267 "type": "analytics#account", # Type of the parent link. Its value is "analytics#account". 268 }, 269 "permissions": { # Permissions the user has for this web property. 270 "effective": [ # All the permissions that the user has for this web property. These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions from the parent account. 271 "A String", 272 ], 273 }, 274 "profileCount": 42, # View (Profile) count for this web property. 275 "selfLink": "A String", # Link for this web property. 276 "starred": True or False, # Indicates whether this web property is starred or not. 277 "updated": "A String", # Time this web property was last modified. 278 "websiteUrl": "A String", # Website url for this web property. 279 }, 280 ], 281 "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. 282 "kind": "analytics#webproperties", # Collection type. 283 "nextLink": "A String", # Link to next page for this web property collection. 284 "previousLink": "A String", # Link to previous page for this web property collection. 285 "startIndex": 42, # The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. 286 "totalResults": 42, # The total number of results for the query, regardless of the number of results in the response. 287 "username": "A String", # Email ID of the authenticated user 288}</pre> 289</div> 290 291<div class="method"> 292 <code class="details" id="patch">patch(accountId, webPropertyId, body=None)</code> 293 <pre>Updates an existing web property. This method supports patch semantics. 294 295Args: 296 accountId: string, Account ID to which the web property belongs (required) 297 webPropertyId: string, Web property ID (required) 298 body: object, The request body. 299 The object takes the form of: 300 301{ # JSON template for an Analytics web property. 302 "accountId": "A String", # Account ID to which this web property belongs. 303 "childLink": { # Child link for this web property. Points to the list of views (profiles) for this web property. 304 "href": "A String", # Link to the list of views (profiles) for this web property. 305 "type": "analytics#profiles", # Type of the parent link. Its value is "analytics#profiles". 306 }, 307 "created": "A String", # Time this web property was created. 308 "dataRetentionResetOnNewActivity": True or False, # Set to true to reset the retention period of the user identifier with each new event from that user (thus setting the expiration date to current time plus retention period). 309 # Set to false to delete data associated with the user identifier automatically after the rentention period. 310 # This property cannot be set on insert. 311 "dataRetentionTtl": "A String", # The length of time for which user and event data is retained. 312 # This property cannot be set on insert. 313 "defaultProfileId": "A String", # Default view (profile) ID. 314 "id": "A String", # Web property ID of the form UA-XXXXX-YY. 315 "industryVertical": "A String", # The industry vertical/category selected for this web property. 316 "internalWebPropertyId": "A String", # Internal ID for this web property. 317 "kind": "analytics#webproperty", # Resource type for Analytics WebProperty. 318 "level": "A String", # Level for this web property. Possible values are STANDARD or PREMIUM. 319 "name": "A String", # Name of this web property. 320 "parentLink": { # Parent link for this web property. Points to the account to which this web property belongs. 321 "href": "A String", # Link to the account for this web property. 322 "type": "analytics#account", # Type of the parent link. Its value is "analytics#account". 323 }, 324 "permissions": { # Permissions the user has for this web property. 325 "effective": [ # All the permissions that the user has for this web property. These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions from the parent account. 326 "A String", 327 ], 328 }, 329 "profileCount": 42, # View (Profile) count for this web property. 330 "selfLink": "A String", # Link for this web property. 331 "starred": True or False, # Indicates whether this web property is starred or not. 332 "updated": "A String", # Time this web property was last modified. 333 "websiteUrl": "A String", # Website url for this web property. 334} 335 336 337Returns: 338 An object of the form: 339 340 { # JSON template for an Analytics web property. 341 "accountId": "A String", # Account ID to which this web property belongs. 342 "childLink": { # Child link for this web property. Points to the list of views (profiles) for this web property. 343 "href": "A String", # Link to the list of views (profiles) for this web property. 344 "type": "analytics#profiles", # Type of the parent link. Its value is "analytics#profiles". 345 }, 346 "created": "A String", # Time this web property was created. 347 "dataRetentionResetOnNewActivity": True or False, # Set to true to reset the retention period of the user identifier with each new event from that user (thus setting the expiration date to current time plus retention period). 348 # Set to false to delete data associated with the user identifier automatically after the rentention period. 349 # This property cannot be set on insert. 350 "dataRetentionTtl": "A String", # The length of time for which user and event data is retained. 351 # This property cannot be set on insert. 352 "defaultProfileId": "A String", # Default view (profile) ID. 353 "id": "A String", # Web property ID of the form UA-XXXXX-YY. 354 "industryVertical": "A String", # The industry vertical/category selected for this web property. 355 "internalWebPropertyId": "A String", # Internal ID for this web property. 356 "kind": "analytics#webproperty", # Resource type for Analytics WebProperty. 357 "level": "A String", # Level for this web property. Possible values are STANDARD or PREMIUM. 358 "name": "A String", # Name of this web property. 359 "parentLink": { # Parent link for this web property. Points to the account to which this web property belongs. 360 "href": "A String", # Link to the account for this web property. 361 "type": "analytics#account", # Type of the parent link. Its value is "analytics#account". 362 }, 363 "permissions": { # Permissions the user has for this web property. 364 "effective": [ # All the permissions that the user has for this web property. These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions from the parent account. 365 "A String", 366 ], 367 }, 368 "profileCount": 42, # View (Profile) count for this web property. 369 "selfLink": "A String", # Link for this web property. 370 "starred": True or False, # Indicates whether this web property is starred or not. 371 "updated": "A String", # Time this web property was last modified. 372 "websiteUrl": "A String", # Website url for this web property. 373}</pre> 374</div> 375 376<div class="method"> 377 <code class="details" id="update">update(accountId, webPropertyId, body=None)</code> 378 <pre>Updates an existing web property. 379 380Args: 381 accountId: string, Account ID to which the web property belongs (required) 382 webPropertyId: string, Web property ID (required) 383 body: object, The request body. 384 The object takes the form of: 385 386{ # JSON template for an Analytics web property. 387 "accountId": "A String", # Account ID to which this web property belongs. 388 "childLink": { # Child link for this web property. Points to the list of views (profiles) for this web property. 389 "href": "A String", # Link to the list of views (profiles) for this web property. 390 "type": "analytics#profiles", # Type of the parent link. Its value is "analytics#profiles". 391 }, 392 "created": "A String", # Time this web property was created. 393 "dataRetentionResetOnNewActivity": True or False, # Set to true to reset the retention period of the user identifier with each new event from that user (thus setting the expiration date to current time plus retention period). 394 # Set to false to delete data associated with the user identifier automatically after the rentention period. 395 # This property cannot be set on insert. 396 "dataRetentionTtl": "A String", # The length of time for which user and event data is retained. 397 # This property cannot be set on insert. 398 "defaultProfileId": "A String", # Default view (profile) ID. 399 "id": "A String", # Web property ID of the form UA-XXXXX-YY. 400 "industryVertical": "A String", # The industry vertical/category selected for this web property. 401 "internalWebPropertyId": "A String", # Internal ID for this web property. 402 "kind": "analytics#webproperty", # Resource type for Analytics WebProperty. 403 "level": "A String", # Level for this web property. Possible values are STANDARD or PREMIUM. 404 "name": "A String", # Name of this web property. 405 "parentLink": { # Parent link for this web property. Points to the account to which this web property belongs. 406 "href": "A String", # Link to the account for this web property. 407 "type": "analytics#account", # Type of the parent link. Its value is "analytics#account". 408 }, 409 "permissions": { # Permissions the user has for this web property. 410 "effective": [ # All the permissions that the user has for this web property. These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions from the parent account. 411 "A String", 412 ], 413 }, 414 "profileCount": 42, # View (Profile) count for this web property. 415 "selfLink": "A String", # Link for this web property. 416 "starred": True or False, # Indicates whether this web property is starred or not. 417 "updated": "A String", # Time this web property was last modified. 418 "websiteUrl": "A String", # Website url for this web property. 419} 420 421 422Returns: 423 An object of the form: 424 425 { # JSON template for an Analytics web property. 426 "accountId": "A String", # Account ID to which this web property belongs. 427 "childLink": { # Child link for this web property. Points to the list of views (profiles) for this web property. 428 "href": "A String", # Link to the list of views (profiles) for this web property. 429 "type": "analytics#profiles", # Type of the parent link. Its value is "analytics#profiles". 430 }, 431 "created": "A String", # Time this web property was created. 432 "dataRetentionResetOnNewActivity": True or False, # Set to true to reset the retention period of the user identifier with each new event from that user (thus setting the expiration date to current time plus retention period). 433 # Set to false to delete data associated with the user identifier automatically after the rentention period. 434 # This property cannot be set on insert. 435 "dataRetentionTtl": "A String", # The length of time for which user and event data is retained. 436 # This property cannot be set on insert. 437 "defaultProfileId": "A String", # Default view (profile) ID. 438 "id": "A String", # Web property ID of the form UA-XXXXX-YY. 439 "industryVertical": "A String", # The industry vertical/category selected for this web property. 440 "internalWebPropertyId": "A String", # Internal ID for this web property. 441 "kind": "analytics#webproperty", # Resource type for Analytics WebProperty. 442 "level": "A String", # Level for this web property. Possible values are STANDARD or PREMIUM. 443 "name": "A String", # Name of this web property. 444 "parentLink": { # Parent link for this web property. Points to the account to which this web property belongs. 445 "href": "A String", # Link to the account for this web property. 446 "type": "analytics#account", # Type of the parent link. Its value is "analytics#account". 447 }, 448 "permissions": { # Permissions the user has for this web property. 449 "effective": [ # All the permissions that the user has for this web property. These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions from the parent account. 450 "A String", 451 ], 452 }, 453 "profileCount": 42, # View (Profile) count for this web property. 454 "selfLink": "A String", # Link for this web property. 455 "starred": True or False, # Indicates whether this web property is starred or not. 456 "updated": "A String", # Time this web property was last modified. 457 "websiteUrl": "A String", # Website url for this web property. 458}</pre> 459</div> 460 461</body></html>