Create a Google Analytics account, which includes a single web property and view.

When an account is created with createAccountTree, it inherits a number a settings from the template account associated with your Google Cloud ID when approved. These settings include:

Note that these setting are copied at account creation time. If the template account settings are changed, these changes will not be reflected in the provisioned account.


HTTP Request

To use the API, make a POST request to this URL:

Request Body

The request body is JSON formatted and contains parameters and configuration for the Analytics account, property, and view:

  "accountName": string,
  "webpropertyName": string,
  "websiteUrl": string,
  "profileName": string,
  "timezone": string,
Field Name Type Optional Description
accountName string The name of the account.
webpropertyName string The name of the web property attached to the Account.
websiteUrl string The web URL associated with the web property.
profileName string The name of the view attached to the web property.
timezone string The timezone associated with the view. Time zones are identified by strings from the TZ database (e.g. America/Los_Angeles).

Additionally, the API accepts all Standard Query Parameters


This request requires authorization with the following scope(s):


Read more about authorization for the Provisioning API


If successful, this method returns a JSON resource containing information about the new Analytics account:

  "kind": "analytics#accountTreeResponse",
  "account": management.accounts Resource,
  "webproperty": management.webproperties Resource,
  "profile": management.profiles Resource,
Field Name Type Description
kind string Resource type for this response.
account Account resource Details of the created account.
webproperty Web property resource Details of the created web property.
profile View Resource Details of the created view.

See also