Google Analytics API
  1. provisioning
Google Analytics API
  • data
    • /data/ga
      GET
    • /data/mcf
      GET
    • /data/realtime
      GET
  • management
    • /management/accountSummaries
      GET
    • /management/accounts
      GET
    • /management/accounts/{accountId}/entityUserLinks
      GET
    • /management/accounts/{accountId}/entityUserLinks
      POST
    • /management/accounts/{accountId}/entityUserLinks/{linkId}
      DELETE
    • /management/accounts/{accountId}/entityUserLinks/{linkId}
      PUT
    • /management/accounts/{accountId}/filters
      GET
    • /management/accounts/{accountId}/filters
      POST
    • /management/accounts/{accountId}/filters/{filterId}
      DELETE
    • /management/accounts/{accountId}/filters/{filterId}
      GET
    • /management/accounts/{accountId}/filters/{filterId}
      PATCH
    • /management/accounts/{accountId}/filters/{filterId}
      PUT
    • /management/accounts/{accountId}/webproperties
      GET
    • /management/accounts/{accountId}/webproperties
      POST
    • /management/accounts/{accountId}/webproperties/{webPropertyId}
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}
      PATCH
    • /management/accounts/{accountId}/webproperties/{webPropertyId}
      PUT
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/deleteUploadData
      POST
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads
      POST
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads/{uploadId}
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions
      POST
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}
      PATCH
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}
      PUT
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics
      POST
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}
      PATCH
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}
      PUT
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks
      POST
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}
      DELETE
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}
      PATCH
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}
      PUT
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks
      POST
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}
      DELETE
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}
      PUT
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles
      POST
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}
      DELETE
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}
      PATCH
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}
      PUT
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks
      POST
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}
      DELETE
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}
      PUT
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments
      POST
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}
      DELETE
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}
      PATCH
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}
      PUT
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals
      POST
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}
      PATCH
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}
      PUT
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks
      POST
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}
      DELETE
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}
      PATCH
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}
      PUT
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports
      POST
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports/{unsampledReportId}
      DELETE
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports/{unsampledReportId}
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences
      POST
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}
      DELETE
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}
      GET
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}
      PATCH
    • /management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}
      PUT
    • /management/clientId:hashClientId
      POST
    • /management/segments
      GET
  • metadata
    • /metadata/{reportType}/columns
  • provisioning
    • /provisioning/createAccountTicket
      POST
    • /provisioning/createAccountTree
      POST
  • userDeletion
    • /userDeletion/userDeletionRequests:upsert
  1. provisioning

/provisioning/createAccountTree

POST
/provisioning/createAccountTree
provisioning
Provision account.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://analytics.googleapis.com/analytics/v3/provisioning/createAccountTree' \
--header 'Content-Type: application/json' \
--data-raw '{
    "accountName": "string",
    "kind": "analytics#accountTreeRequest",
    "profileName": "string",
    "timezone": "string",
    "webpropertyName": "string",
    "websiteUrl": "string"
}'
Response Response Example
{
  "account": {
    "childLink": {
      "href": "string",
      "type": "analytics#webproperties"
    },
    "created": "2019-08-24T14:15:22Z",
    "id": "string",
    "kind": "analytics#account",
    "name": "string",
    "permissions": {
      "effective": [
        "string"
      ]
    },
    "selfLink": "string",
    "starred": true,
    "updated": "2019-08-24T14:15:22Z"
  },
  "kind": "analytics#accountTreeResponse",
  "profile": {
    "accountId": "string",
    "botFilteringEnabled": true,
    "childLink": {
      "href": "string",
      "type": "analytics#goals"
    },
    "created": "2019-08-24T14:15:22Z",
    "currency": "string",
    "defaultPage": "string",
    "eCommerceTracking": true,
    "enhancedECommerceTracking": true,
    "excludeQueryParameters": "string",
    "id": "string",
    "internalWebPropertyId": "string",
    "kind": "analytics#profile",
    "name": "string",
    "parentLink": {
      "href": "string",
      "type": "analytics#webproperty"
    },
    "permissions": {
      "effective": [
        "string"
      ]
    },
    "selfLink": "string",
    "siteSearchCategoryParameters": "string",
    "siteSearchQueryParameters": "string",
    "starred": true,
    "stripSiteSearchCategoryParameters": true,
    "stripSiteSearchQueryParameters": true,
    "timezone": "string",
    "type": "string",
    "updated": "2019-08-24T14:15:22Z",
    "webPropertyId": "string",
    "websiteUrl": "string"
  },
  "webproperty": {
    "accountId": "string",
    "childLink": {
      "href": "string",
      "type": "analytics#profiles"
    },
    "created": "2019-08-24T14:15:22Z",
    "dataRetentionResetOnNewActivity": true,
    "dataRetentionTtl": "string",
    "defaultProfileId": "string",
    "id": "string",
    "industryVertical": "string",
    "internalWebPropertyId": "string",
    "kind": "analytics#webproperty",
    "level": "string",
    "name": "string",
    "parentLink": {
      "href": "string",
      "type": "analytics#account"
    },
    "permissions": {
      "effective": [
        "string"
      ]
    },
    "profileCount": 0,
    "selfLink": "string",
    "starred": true,
    "updated": "2019-08-24T14:15:22Z",
    "websiteUrl": "string"
  }
}

Request

Body Params application/json
JSON template for an Analytics account tree requests. The account tree request is used in the provisioning api to create an account, property, and view (profile). It contains the basic information required to make these fields.
accountName
string 
optional
kind
string 
optional
Resource type for account ticket.
Default:
analytics#accountTreeRequest
profileName
string 
optional
timezone
string 
optional
webpropertyName
string 
optional
websiteUrl
string 
optional
Examples

Responses

🟢200Successful response
application/json
Body
JSON template for an Analytics account tree response. The account tree response is used in the provisioning api to return the result of creating an account, property, and view (profile).
account
object (Account) 
optional
The account created.
childLink
object 
optional
Child link for an account entry. Points to the list of web properties for this account.
created
string <date-time>
optional
Time the account was created.
id
string 
optional
Account ID.
kind
string 
optional
Resource type for Analytics account.
Default:
analytics#account
name
string 
optional
Account name.
permissions
object 
optional
Permissions the user has for this account.
selfLink
string 
optional
Link for this account.
starred
boolean 
optional
Indicates whether this account is starred or not.
updated
string <date-time>
optional
Time the account was last modified.
kind
string 
optional
Resource type for account ticket.
Default:
analytics#accountTreeResponse
profile
object (Profile) 
optional
View (Profile) for the account.
accountId
string 
optional
Account ID to which this view (profile) belongs.
botFilteringEnabled
boolean 
optional
Indicates whether bot filtering is enabled for this view (profile).
childLink
object 
optional
Child link for this view (profile). Points to the list of goals for this view (profile).
created
string <date-time>
read-onlyoptional
Time this view (profile) was created.
currency
string 
optional
The currency type associated with this view (profile), defaults to USD. The supported values are:
USD, JPY, EUR, GBP, AUD, KRW, BRL, CNY, DKK, RUB, SEK, NOK, PLN, TRY, TWD, HKD, THB, IDR, ARS, MXN, VND, PHP, INR, CHF, CAD, CZK, NZD, HUF, BGN, LTL, ZAR, UAH, AED, BOB, CLP, COP, EGP, HRK, ILS, MAD, MYR, PEN, PKR, RON, RSD, SAR, SGD, VEF, LVL
defaultPage
string 
optional
Default page for this view (profile).
eCommerceTracking
boolean 
optional
Indicates whether ecommerce tracking is enabled for this view (profile).
enhancedECommerceTracking
boolean 
optional
Indicates whether enhanced ecommerce tracking is enabled for this view (profile). This property can only be enabled if ecommerce tracking is enabled.
excludeQueryParameters
string 
optional
The query parameters that are excluded from this view (profile).
id
string 
optional
View (Profile) ID.
internalWebPropertyId
string 
read-onlyoptional
Internal ID for the web property to which this view (profile) belongs.
kind
string 
read-onlyoptional
Resource type for Analytics view (profile).
Default:
analytics#profile
name
string 
optional
Name of this view (profile).
parentLink
object 
optional
Parent link for this view (profile). Points to the web property to which this view (profile) belongs.
permissions
object 
optional
Permissions the user has for this view (profile).
selfLink
string 
read-onlyoptional
Link for this view (profile).
siteSearchCategoryParameters
string 
optional
Site search category parameters for this view (profile).
siteSearchQueryParameters
string 
optional
The site search query parameters for this view (profile).
starred
boolean 
optional
Indicates whether this view (profile) is starred or not.
stripSiteSearchCategoryParameters
boolean 
optional
Whether or not Analytics will strip search category parameters from the URLs in your reports.
stripSiteSearchQueryParameters
boolean 
optional
Whether or not Analytics will strip search query parameters from the URLs in your reports.
timezone
string 
optional
Time zone for which this view (profile) has been configured. Time zones are identified by strings from the TZ database.
type
string 
optional
View (Profile) type. Supported types: WEB or APP.
updated
string <date-time>
read-onlyoptional
Time this view (profile) was last modified.
webPropertyId
string 
read-onlyoptional
Web property ID of the form UA-XXXXX-YY to which this view (profile) belongs.
websiteUrl
string 
optional
Website URL for this view (profile).
webproperty
object (Webproperty) 
optional
Web property for the account.
accountId
string 
optional
Account ID to which this web property belongs.
childLink
object 
optional
Child link for this web property. Points to the list of views (profiles) for this web property.
created
string <date-time>
read-onlyoptional
Time this web property was created.
dataRetentionResetOnNewActivity
boolean 
optional
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).
Set to false to delete data associated with the user identifier automatically after the rentention period.
This property cannot be set on insert.
dataRetentionTtl
string 
optional
The length of time for which user and event data is retained.
This property cannot be set on insert.
defaultProfileId
string <int64>
optional
Default view (profile) ID.
id
string 
optional
Web property ID of the form UA-XXXXX-YY.
industryVertical
string 
optional
The industry vertical/category selected for this web property.
internalWebPropertyId
string 
read-onlyoptional
Internal ID for this web property.
kind
string 
read-onlyoptional
Resource type for Analytics WebProperty.
Default:
analytics#webproperty
level
string 
read-onlyoptional
Level for this web property. Possible values are STANDARD or PREMIUM.
name
string 
optional
Name of this web property.
parentLink
object 
optional
Parent link for this web property. Points to the account to which this web property belongs.
permissions
object 
optional
Permissions the user has for this web property.
profileCount
integer <int32>
read-onlyoptional
View (Profile) count for this web property.
selfLink
string 
read-onlyoptional
Link for this web property.
starred
boolean 
optional
Indicates whether this web property is starred or not.
updated
string <date-time>
read-onlyoptional
Time this web property was last modified.
websiteUrl
string 
optional
Website url for this web property.
Modified at 2023-08-15 05:39:07
Previous
/provisioning/createAccountTicket
Next
/userDeletion/userDeletionRequests:upsert
Built with