John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame^] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, 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 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, 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="#get">get(accountId, webPropertyId)</a></code></p> |
| 79 | <p class="firstline">Gets a web property to which the user has access.</p> |
| 80 | <p class="toc_element"> |
| 81 | <code><a href="#insert">insert(accountId, body)</a></code></p> |
| 82 | <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> |
| 83 | <p class="toc_element"> |
| 84 | <code><a href="#list">list(accountId, max_results=None, start_index=None)</a></code></p> |
| 85 | <p class="firstline">Lists web properties to which the user has access.</p> |
| 86 | <p class="toc_element"> |
| 87 | <code><a href="#patch">patch(accountId, webPropertyId, body)</a></code></p> |
| 88 | <p class="firstline">Updates an existing web property. This method supports patch semantics.</p> |
| 89 | <p class="toc_element"> |
| 90 | <code><a href="#update">update(accountId, webPropertyId, body)</a></code></p> |
| 91 | <p class="firstline">Updates an existing web property.</p> |
| 92 | <h3>Method Details</h3> |
| 93 | <div class="method"> |
| 94 | <code class="details" id="get">get(accountId, webPropertyId)</code> |
| 95 | <pre>Gets a web property to which the user has access. |
| 96 | |
| 97 | Args: |
| 98 | accountId: string, Account ID to retrieve the web property for. (required) |
| 99 | webPropertyId: string, ID to retrieve the web property for. (required) |
| 100 | |
| 101 | Returns: |
| 102 | An object of the form: |
| 103 | |
| 104 | { # JSON template for an Analytics web property. |
| 105 | "websiteUrl": "A String", # Website url for this web property. |
| 106 | "kind": "analytics#webproperty", # Resource type for Analytics WebProperty. |
| 107 | "name": "A String", # Name of this web property. |
| 108 | "created": "A String", # Time this web property was created. |
| 109 | "defaultProfileId": "A String", # Default view (profile) ID. |
| 110 | "level": "A String", # Level for this web property. Possible values are STANDARD or PREMIUM. |
| 111 | "updated": "A String", # Time this web property was last modified. |
| 112 | "profileCount": 42, # View (Profile) count for this web property. |
| 113 | "internalWebPropertyId": "A String", # Internal ID for this web property. |
| 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 | "industryVertical": "A String", # The industry vertical/category selected for this web property. |
| 119 | "parentLink": { # Parent link for this web property. Points to the account to which this web property belongs. |
| 120 | "href": "A String", # Link to the account for this web property. |
| 121 | "type": "analytics#account", # Type of the parent link. Its value is "analytics#account". |
| 122 | }, |
| 123 | "permissions": { # Permissions the user has for this web property. |
| 124 | "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. |
| 125 | "A String", |
| 126 | ], |
| 127 | }, |
| 128 | "id": "A String", # Web property ID of the form UA-XXXXX-YY. |
| 129 | "selfLink": "A String", # Link for this web property. |
| 130 | "accountId": "A String", # Account ID to which this web property belongs. |
| 131 | }</pre> |
| 132 | </div> |
| 133 | |
| 134 | <div class="method"> |
| 135 | <code class="details" id="insert">insert(accountId, body)</code> |
| 136 | <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. |
| 137 | |
| 138 | Args: |
| 139 | accountId: string, Account ID to create the web property for. (required) |
| 140 | body: object, The request body. (required) |
| 141 | The object takes the form of: |
| 142 | |
| 143 | { # JSON template for an Analytics web property. |
| 144 | "websiteUrl": "A String", # Website url for this web property. |
| 145 | "kind": "analytics#webproperty", # Resource type for Analytics WebProperty. |
| 146 | "name": "A String", # Name of this web property. |
| 147 | "created": "A String", # Time this web property was created. |
| 148 | "defaultProfileId": "A String", # Default view (profile) ID. |
| 149 | "level": "A String", # Level for this web property. Possible values are STANDARD or PREMIUM. |
| 150 | "updated": "A String", # Time this web property was last modified. |
| 151 | "profileCount": 42, # View (Profile) count for this web property. |
| 152 | "internalWebPropertyId": "A String", # Internal ID for this web property. |
| 153 | "childLink": { # Child link for this web property. Points to the list of views (profiles) for this web property. |
| 154 | "href": "A String", # Link to the list of views (profiles) for this web property. |
| 155 | "type": "analytics#profiles", # Type of the parent link. Its value is "analytics#profiles". |
| 156 | }, |
| 157 | "industryVertical": "A String", # The industry vertical/category selected for this web property. |
| 158 | "parentLink": { # Parent link for this web property. Points to the account to which this web property belongs. |
| 159 | "href": "A String", # Link to the account for this web property. |
| 160 | "type": "analytics#account", # Type of the parent link. Its value is "analytics#account". |
| 161 | }, |
| 162 | "permissions": { # Permissions the user has for this web property. |
| 163 | "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. |
| 164 | "A String", |
| 165 | ], |
| 166 | }, |
| 167 | "id": "A String", # Web property ID of the form UA-XXXXX-YY. |
| 168 | "selfLink": "A String", # Link for this web property. |
| 169 | "accountId": "A String", # Account ID to which this web property belongs. |
| 170 | } |
| 171 | |
| 172 | |
| 173 | Returns: |
| 174 | An object of the form: |
| 175 | |
| 176 | { # JSON template for an Analytics web property. |
| 177 | "websiteUrl": "A String", # Website url for this web property. |
| 178 | "kind": "analytics#webproperty", # Resource type for Analytics WebProperty. |
| 179 | "name": "A String", # Name of this web property. |
| 180 | "created": "A String", # Time this web property was created. |
| 181 | "defaultProfileId": "A String", # Default view (profile) ID. |
| 182 | "level": "A String", # Level for this web property. Possible values are STANDARD or PREMIUM. |
| 183 | "updated": "A String", # Time this web property was last modified. |
| 184 | "profileCount": 42, # View (Profile) count for this web property. |
| 185 | "internalWebPropertyId": "A String", # Internal ID for this web property. |
| 186 | "childLink": { # Child link for this web property. Points to the list of views (profiles) for this web property. |
| 187 | "href": "A String", # Link to the list of views (profiles) for this web property. |
| 188 | "type": "analytics#profiles", # Type of the parent link. Its value is "analytics#profiles". |
| 189 | }, |
| 190 | "industryVertical": "A String", # The industry vertical/category selected for this web property. |
| 191 | "parentLink": { # Parent link for this web property. Points to the account to which this web property belongs. |
| 192 | "href": "A String", # Link to the account for this web property. |
| 193 | "type": "analytics#account", # Type of the parent link. Its value is "analytics#account". |
| 194 | }, |
| 195 | "permissions": { # Permissions the user has for this web property. |
| 196 | "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. |
| 197 | "A String", |
| 198 | ], |
| 199 | }, |
| 200 | "id": "A String", # Web property ID of the form UA-XXXXX-YY. |
| 201 | "selfLink": "A String", # Link for this web property. |
| 202 | "accountId": "A String", # Account ID to which this web property belongs. |
| 203 | }</pre> |
| 204 | </div> |
| 205 | |
| 206 | <div class="method"> |
| 207 | <code class="details" id="list">list(accountId, max_results=None, start_index=None)</code> |
| 208 | <pre>Lists web properties to which the user has access. |
| 209 | |
| 210 | Args: |
| 211 | 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) |
| 212 | max_results: integer, The maximum number of web properties to include in this response. |
| 213 | start_index: integer, An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. |
| 214 | |
| 215 | Returns: |
| 216 | An object of the form: |
| 217 | |
| 218 | { # 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. |
| 219 | "username": "A String", # Email ID of the authenticated user |
| 220 | "kind": "analytics#webproperties", # Collection type. |
| 221 | "items": [ # A list of web properties. |
| 222 | { # JSON template for an Analytics web property. |
| 223 | "websiteUrl": "A String", # Website url for this web property. |
| 224 | "kind": "analytics#webproperty", # Resource type for Analytics WebProperty. |
| 225 | "name": "A String", # Name of this web property. |
| 226 | "created": "A String", # Time this web property was created. |
| 227 | "defaultProfileId": "A String", # Default view (profile) ID. |
| 228 | "level": "A String", # Level for this web property. Possible values are STANDARD or PREMIUM. |
| 229 | "updated": "A String", # Time this web property was last modified. |
| 230 | "profileCount": 42, # View (Profile) count for this web property. |
| 231 | "internalWebPropertyId": "A String", # Internal ID for this web property. |
| 232 | "childLink": { # Child link for this web property. Points to the list of views (profiles) for this web property. |
| 233 | "href": "A String", # Link to the list of views (profiles) for this web property. |
| 234 | "type": "analytics#profiles", # Type of the parent link. Its value is "analytics#profiles". |
| 235 | }, |
| 236 | "industryVertical": "A String", # The industry vertical/category selected for this web property. |
| 237 | "parentLink": { # Parent link for this web property. Points to the account to which this web property belongs. |
| 238 | "href": "A String", # Link to the account for this web property. |
| 239 | "type": "analytics#account", # Type of the parent link. Its value is "analytics#account". |
| 240 | }, |
| 241 | "permissions": { # Permissions the user has for this web property. |
| 242 | "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. |
| 243 | "A String", |
| 244 | ], |
| 245 | }, |
| 246 | "id": "A String", # Web property ID of the form UA-XXXXX-YY. |
| 247 | "selfLink": "A String", # Link for this web property. |
| 248 | "accountId": "A String", # Account ID to which this web property belongs. |
| 249 | }, |
| 250 | ], |
| 251 | "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. |
| 252 | "previousLink": "A String", # Link to previous page for this web property collection. |
| 253 | "startIndex": 42, # The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. |
| 254 | "nextLink": "A String", # Link to next page for this web property collection. |
| 255 | "totalResults": 42, # The total number of results for the query, regardless of the number of results in the response. |
| 256 | }</pre> |
| 257 | </div> |
| 258 | |
| 259 | <div class="method"> |
| 260 | <code class="details" id="patch">patch(accountId, webPropertyId, body)</code> |
| 261 | <pre>Updates an existing web property. This method supports patch semantics. |
| 262 | |
| 263 | Args: |
| 264 | accountId: string, Account ID to which the web property belongs (required) |
| 265 | webPropertyId: string, Web property ID (required) |
| 266 | body: object, The request body. (required) |
| 267 | The object takes the form of: |
| 268 | |
| 269 | { # JSON template for an Analytics web property. |
| 270 | "websiteUrl": "A String", # Website url for this web property. |
| 271 | "kind": "analytics#webproperty", # Resource type for Analytics WebProperty. |
| 272 | "name": "A String", # Name of this web property. |
| 273 | "created": "A String", # Time this web property was created. |
| 274 | "defaultProfileId": "A String", # Default view (profile) ID. |
| 275 | "level": "A String", # Level for this web property. Possible values are STANDARD or PREMIUM. |
| 276 | "updated": "A String", # Time this web property was last modified. |
| 277 | "profileCount": 42, # View (Profile) count for this web property. |
| 278 | "internalWebPropertyId": "A String", # Internal ID for this web property. |
| 279 | "childLink": { # Child link for this web property. Points to the list of views (profiles) for this web property. |
| 280 | "href": "A String", # Link to the list of views (profiles) for this web property. |
| 281 | "type": "analytics#profiles", # Type of the parent link. Its value is "analytics#profiles". |
| 282 | }, |
| 283 | "industryVertical": "A String", # The industry vertical/category selected for this web property. |
| 284 | "parentLink": { # Parent link for this web property. Points to the account to which this web property belongs. |
| 285 | "href": "A String", # Link to the account for this web property. |
| 286 | "type": "analytics#account", # Type of the parent link. Its value is "analytics#account". |
| 287 | }, |
| 288 | "permissions": { # Permissions the user has for this web property. |
| 289 | "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. |
| 290 | "A String", |
| 291 | ], |
| 292 | }, |
| 293 | "id": "A String", # Web property ID of the form UA-XXXXX-YY. |
| 294 | "selfLink": "A String", # Link for this web property. |
| 295 | "accountId": "A String", # Account ID to which this web property belongs. |
| 296 | } |
| 297 | |
| 298 | |
| 299 | Returns: |
| 300 | An object of the form: |
| 301 | |
| 302 | { # JSON template for an Analytics web property. |
| 303 | "websiteUrl": "A String", # Website url for this web property. |
| 304 | "kind": "analytics#webproperty", # Resource type for Analytics WebProperty. |
| 305 | "name": "A String", # Name of this web property. |
| 306 | "created": "A String", # Time this web property was created. |
| 307 | "defaultProfileId": "A String", # Default view (profile) ID. |
| 308 | "level": "A String", # Level for this web property. Possible values are STANDARD or PREMIUM. |
| 309 | "updated": "A String", # Time this web property was last modified. |
| 310 | "profileCount": 42, # View (Profile) count for this web property. |
| 311 | "internalWebPropertyId": "A String", # Internal ID for this web property. |
| 312 | "childLink": { # Child link for this web property. Points to the list of views (profiles) for this web property. |
| 313 | "href": "A String", # Link to the list of views (profiles) for this web property. |
| 314 | "type": "analytics#profiles", # Type of the parent link. Its value is "analytics#profiles". |
| 315 | }, |
| 316 | "industryVertical": "A String", # The industry vertical/category selected for this web property. |
| 317 | "parentLink": { # Parent link for this web property. Points to the account to which this web property belongs. |
| 318 | "href": "A String", # Link to the account for this web property. |
| 319 | "type": "analytics#account", # Type of the parent link. Its value is "analytics#account". |
| 320 | }, |
| 321 | "permissions": { # Permissions the user has for this web property. |
| 322 | "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. |
| 323 | "A String", |
| 324 | ], |
| 325 | }, |
| 326 | "id": "A String", # Web property ID of the form UA-XXXXX-YY. |
| 327 | "selfLink": "A String", # Link for this web property. |
| 328 | "accountId": "A String", # Account ID to which this web property belongs. |
| 329 | }</pre> |
| 330 | </div> |
| 331 | |
| 332 | <div class="method"> |
| 333 | <code class="details" id="update">update(accountId, webPropertyId, body)</code> |
| 334 | <pre>Updates an existing web property. |
| 335 | |
| 336 | Args: |
| 337 | accountId: string, Account ID to which the web property belongs (required) |
| 338 | webPropertyId: string, Web property ID (required) |
| 339 | body: object, The request body. (required) |
| 340 | The object takes the form of: |
| 341 | |
| 342 | { # JSON template for an Analytics web property. |
| 343 | "websiteUrl": "A String", # Website url for this web property. |
| 344 | "kind": "analytics#webproperty", # Resource type for Analytics WebProperty. |
| 345 | "name": "A String", # Name of this web property. |
| 346 | "created": "A String", # Time this web property was created. |
| 347 | "defaultProfileId": "A String", # Default view (profile) ID. |
| 348 | "level": "A String", # Level for this web property. Possible values are STANDARD or PREMIUM. |
| 349 | "updated": "A String", # Time this web property was last modified. |
| 350 | "profileCount": 42, # View (Profile) count for this web property. |
| 351 | "internalWebPropertyId": "A String", # Internal ID for this web property. |
| 352 | "childLink": { # Child link for this web property. Points to the list of views (profiles) for this web property. |
| 353 | "href": "A String", # Link to the list of views (profiles) for this web property. |
| 354 | "type": "analytics#profiles", # Type of the parent link. Its value is "analytics#profiles". |
| 355 | }, |
| 356 | "industryVertical": "A String", # The industry vertical/category selected for this web property. |
| 357 | "parentLink": { # Parent link for this web property. Points to the account to which this web property belongs. |
| 358 | "href": "A String", # Link to the account for this web property. |
| 359 | "type": "analytics#account", # Type of the parent link. Its value is "analytics#account". |
| 360 | }, |
| 361 | "permissions": { # Permissions the user has for this web property. |
| 362 | "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. |
| 363 | "A String", |
| 364 | ], |
| 365 | }, |
| 366 | "id": "A String", # Web property ID of the form UA-XXXXX-YY. |
| 367 | "selfLink": "A String", # Link for this web property. |
| 368 | "accountId": "A String", # Account ID to which this web property belongs. |
| 369 | } |
| 370 | |
| 371 | |
| 372 | Returns: |
| 373 | An object of the form: |
| 374 | |
| 375 | { # JSON template for an Analytics web property. |
| 376 | "websiteUrl": "A String", # Website url for this web property. |
| 377 | "kind": "analytics#webproperty", # Resource type for Analytics WebProperty. |
| 378 | "name": "A String", # Name of this web property. |
| 379 | "created": "A String", # Time this web property was created. |
| 380 | "defaultProfileId": "A String", # Default view (profile) ID. |
| 381 | "level": "A String", # Level for this web property. Possible values are STANDARD or PREMIUM. |
| 382 | "updated": "A String", # Time this web property was last modified. |
| 383 | "profileCount": 42, # View (Profile) count for this web property. |
| 384 | "internalWebPropertyId": "A String", # Internal ID for this web property. |
| 385 | "childLink": { # Child link for this web property. Points to the list of views (profiles) for this web property. |
| 386 | "href": "A String", # Link to the list of views (profiles) for this web property. |
| 387 | "type": "analytics#profiles", # Type of the parent link. Its value is "analytics#profiles". |
| 388 | }, |
| 389 | "industryVertical": "A String", # The industry vertical/category selected for this web property. |
| 390 | "parentLink": { # Parent link for this web property. Points to the account to which this web property belongs. |
| 391 | "href": "A String", # Link to the account for this web property. |
| 392 | "type": "analytics#account", # Type of the parent link. Its value is "analytics#account". |
| 393 | }, |
| 394 | "permissions": { # Permissions the user has for this web property. |
| 395 | "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. |
| 396 | "A String", |
| 397 | ], |
| 398 | }, |
| 399 | "id": "A String", # Web property ID of the form UA-XXXXX-YY. |
| 400 | "selfLink": "A String", # Link for this web property. |
| 401 | "accountId": "A String", # Account ID to which this web property belongs. |
| 402 | }</pre> |
| 403 | </div> |
| 404 | |
| 405 | </body></html> |