UNPKG

googleapis

Version:
1,762 lines 171 kB
/** * Copyright 2015 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { AxiosPromise } from 'axios'; import { GoogleApis } from '../..'; import { BodyResponseCallback, GlobalOptions, MethodOptions } from '../../lib/api'; /** * Google Analytics API * * Views and manages your Google Analytics data. * * @example * const google = require('googleapis'); * const analytics = google.analytics('v3'); * * @namespace analytics * @type {Function} * @version v3 * @variation v3 * @param {object=} options Options for Analytics */ export declare class Analytics { _options: GlobalOptions; google: GoogleApis; root: this; data: Resource$Data; management: Resource$Management; metadata: Resource$Metadata; provisioning: Resource$Provisioning; constructor(options: GlobalOptions, google: GoogleApis); getRoot(): this; } /** * JSON template for Analytics account entry. */ export interface Schema$Account { /** * Child link for an account entry. Points to the list of web properties for * this account. */ childLink: any; /** * Time the account was created. */ created: string; /** * Account ID. */ id: string; /** * Resource type for Analytics account. */ kind: string; /** * Account name. */ name: string; /** * Permissions the user has for this account. */ permissions: any; /** * Link for this account. */ selfLink: string; /** * Indicates whether this account is starred or not. */ starred: boolean; /** * Time the account was last modified. */ updated: string; } /** * JSON template for a linked account. */ export interface Schema$AccountRef { /** * Link for this account. */ href: string; /** * Account ID. */ id: string; /** * Analytics account reference. */ kind: string; /** * Account name. */ name: string; } /** * An account collection provides a list of Analytics accounts to which a user * has access. The account collection is the entry point to all management * information. Each resource in the collection corresponds to a single * Analytics account. */ export interface Schema$Accounts { /** * A list of accounts. */ items: Schema$Account[]; /** * The maximum number of entries the response can contain, regardless of the * actual number of entries returned. Its value ranges from 1 to 1000 with a * value of 1000 by default, or otherwise specified by the max-results query * parameter. */ itemsPerPage: number; /** * Collection type. */ kind: string; /** * Next link for this account collection. */ nextLink: string; /** * Previous link for this account collection. */ previousLink: string; /** * The starting index of the entries, which is 1 by default or otherwise * specified by the start-index query parameter. */ startIndex: number; /** * The total number of results for the query, regardless of the number of * results in the response. */ totalResults: number; /** * Email ID of the authenticated user */ username: string; } /** * An AccountSummary collection lists a summary of accounts, properties and * views (profiles) to which the user has access. Each resource in the * collection corresponds to a single AccountSummary. */ export interface Schema$AccountSummaries { /** * A list of AccountSummaries. */ items: Schema$AccountSummary[]; /** * 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. */ itemsPerPage: number; /** * Collection type. */ kind: string; /** * Link to next page for this AccountSummary collection. */ nextLink: string; /** * Link to previous page for this AccountSummary collection. */ previousLink: string; /** * The starting index of the resources, which is 1 by default or otherwise * specified by the start-index query parameter. */ startIndex: number; /** * The total number of results for the query, regardless of the number of * results in the response. */ totalResults: number; /** * Email ID of the authenticated user */ username: string; } /** * JSON template for an Analytics AccountSummary. An AccountSummary is a * lightweight tree comprised of properties/profiles. */ export interface Schema$AccountSummary { /** * Account ID. */ id: string; /** * Resource type for Analytics AccountSummary. */ kind: string; /** * Account name. */ name: string; /** * Indicates whether this account is starred or not. */ starred: boolean; /** * List of web properties under this account. */ webProperties: Schema$WebPropertySummary[]; } /** * JSON template for an Analytics account ticket. The account ticket consists of * the ticket ID and the basic information for the account, property and * profile. */ export interface Schema$AccountTicket { /** * Account for this ticket. */ account: Schema$Account; /** * Account ticket ID used to access the account ticket. */ id: string; /** * Resource type for account ticket. */ kind: string; /** * View (Profile) for the account. */ profile: Schema$Profile; /** * Redirect URI where the user will be sent after accepting Terms of Service. * Must be configured in APIs console as a callback URL. */ redirectUri: string; /** * Web property for the account. */ webproperty: Schema$Webproperty; } /** * 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. */ export interface Schema$AccountTreeRequest { accountName: string; accountSettings: any; /** * Resource type for account ticket. */ kind: string; profileName: string; timezone: string; webpropertyName: string; websiteUrl: string; } /** * 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). */ export interface Schema$AccountTreeResponse { /** * The account created. */ account: Schema$Account; accountSettings: any; /** * Resource type for account ticket. */ kind: string; /** * View (Profile) for the account. */ profile: Schema$Profile; /** * Web property for the account. */ webproperty: Schema$Webproperty; } /** * JSON template for an AdWords account. */ export interface Schema$AdWordsAccount { /** * True if auto-tagging is enabled on the AdWords account. Read-only after the * insert operation. */ autoTaggingEnabled: boolean; /** * Customer ID. This field is required when creating an AdWords link. */ customerId: string; /** * Resource type for AdWords account. */ kind: string; } /** * Request template for the delete upload data request. */ export interface Schema$AnalyticsDataimportDeleteUploadDataRequest { /** * A list of upload UIDs. */ customDataImportUids: string[]; } /** * JSON template for a metadata column. */ export interface Schema$Column { /** * Map of attribute name and value for this column. */ attributes: any; /** * Column id. */ id: string; /** * Resource type for Analytics column. */ kind: string; } /** * Lists columns (dimensions and metrics) for a particular report type. */ export interface Schema$Columns { /** * List of attributes names returned by columns. */ attributeNames: string[]; /** * Etag of collection. This etag can be compared with the last response etag * to check if response has changed. */ etag: string; /** * List of columns for a report type. */ items: Schema$Column[]; /** * Collection type. */ kind: string; /** * Total number of columns returned in the response. */ totalResults: number; } /** * JSON template for an Analytics custom data source. */ export interface Schema$CustomDataSource { /** * Account ID to which this custom data source belongs. */ accountId: string; childLink: any; /** * Time this custom data source was created. */ created: string; /** * Description of custom data source. */ description: string; /** * Custom data source ID. */ id: string; importBehavior: string; /** * Resource type for Analytics custom data source. */ kind: string; /** * Name of this custom data source. */ name: string; /** * Parent link for this custom data source. Points to the web property to * which this custom data source belongs. */ parentLink: any; /** * IDs of views (profiles) linked to the custom data source. */ profilesLinked: string[]; /** * Collection of schema headers of the custom data source. */ schema: string[]; /** * Link for this Analytics custom data source. */ selfLink: string; /** * Type of the custom data source. */ type: string; /** * Time this custom data source was last modified. */ updated: string; /** * Upload type of the custom data source. */ uploadType: string; /** * Web property ID of the form UA-XXXXX-YY to which this custom data source * belongs. */ webPropertyId: string; } /** * Lists Analytics custom data sources to which the user has access. Each * resource in the collection corresponds to a single Analytics custom data * source. */ export interface Schema$CustomDataSources { /** * Collection of custom data sources. */ items: Schema$CustomDataSource[]; /** * 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. */ itemsPerPage: number; /** * Collection type. */ kind: string; /** * Link to next page for this custom data source collection. */ nextLink: string; /** * Link to previous page for this custom data source collection. */ previousLink: string; /** * The starting index of the resources, which is 1 by default or otherwise * specified by the start-index query parameter. */ startIndex: number; /** * The total number of results for the query, regardless of the number of * results in the response. */ totalResults: number; /** * Email ID of the authenticated user */ username: string; } /** * JSON template for Analytics Custom Dimension. */ export interface Schema$CustomDimension { /** * Account ID. */ accountId: string; /** * Boolean indicating whether the custom dimension is active. */ active: boolean; /** * Time the custom dimension was created. */ created: string; /** * Custom dimension ID. */ id: string; /** * Index of the custom dimension. */ index: number; /** * Kind value for a custom dimension. Set to * "analytics#customDimension". It is a read-only field. */ kind: string; /** * Name of the custom dimension. */ name: string; /** * Parent link for the custom dimension. Points to the property to which the * custom dimension belongs. */ parentLink: any; /** * Scope of the custom dimension: HIT, SESSION, USER or PRODUCT. */ scope: string; /** * Link for the custom dimension */ selfLink: string; /** * Time the custom dimension was last modified. */ updated: string; /** * Property ID. */ webPropertyId: string; } /** * A custom dimension collection lists Analytics custom dimensions to which the * user has access. Each resource in the collection corresponds to a single * Analytics custom dimension. */ export interface Schema$CustomDimensions { /** * Collection of custom dimensions. */ items: Schema$CustomDimension[]; /** * 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. */ itemsPerPage: number; /** * Collection type. */ kind: string; /** * Link to next page for this custom dimension collection. */ nextLink: string; /** * Link to previous page for this custom dimension collection. */ previousLink: string; /** * The starting index of the resources, which is 1 by default or otherwise * specified by the start-index query parameter. */ startIndex: number; /** * The total number of results for the query, regardless of the number of * results in the response. */ totalResults: number; /** * Email ID of the authenticated user */ username: string; } /** * JSON template for Analytics Custom Metric. */ export interface Schema$CustomMetric { /** * Account ID. */ accountId: string; /** * Boolean indicating whether the custom metric is active. */ active: boolean; /** * Time the custom metric was created. */ created: string; /** * Custom metric ID. */ id: string; /** * Index of the custom metric. */ index: number; /** * Kind value for a custom metric. Set to "analytics#customMetric". * It is a read-only field. */ kind: string; /** * Max value of custom metric. */ max_value: string; /** * Min value of custom metric. */ min_value: string; /** * Name of the custom metric. */ name: string; /** * Parent link for the custom metric. Points to the property to which the * custom metric belongs. */ parentLink: any; /** * Scope of the custom metric: HIT or PRODUCT. */ scope: string; /** * Link for the custom metric */ selfLink: string; /** * Data type of custom metric. */ type: string; /** * Time the custom metric was last modified. */ updated: string; /** * Property ID. */ webPropertyId: string; } /** * A custom metric collection lists Analytics custom metrics to which the user * has access. Each resource in the collection corresponds to a single Analytics * custom metric. */ export interface Schema$CustomMetrics { /** * Collection of custom metrics. */ items: Schema$CustomMetric[]; /** * 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. */ itemsPerPage: number; /** * Collection type. */ kind: string; /** * Link to next page for this custom metric collection. */ nextLink: string; /** * Link to previous page for this custom metric collection. */ previousLink: string; /** * The starting index of the resources, which is 1 by default or otherwise * specified by the start-index query parameter. */ startIndex: number; /** * The total number of results for the query, regardless of the number of * results in the response. */ totalResults: number; /** * Email ID of the authenticated user */ username: string; } /** * JSON template for Analytics Entity AdWords Link. */ export interface Schema$EntityAdWordsLink { /** * A list of AdWords client accounts. These cannot be MCC accounts. This field * is required when creating an AdWords link. It cannot be empty. */ adWordsAccounts: Schema$AdWordsAccount[]; /** * Web property being linked. */ entity: any; /** * Entity AdWords link ID */ id: string; /** * Resource type for entity AdWords link. */ kind: string; /** * Name of the link. This field is required when creating an AdWords link. */ name: string; /** * IDs of linked Views (Profiles) represented as strings. */ profileIds: string[]; /** * URL link for this Google Analytics - Google AdWords link. */ selfLink: string; } /** * An entity AdWords link collection provides a list of GA-AdWords links Each * resource in this collection corresponds to a single link. */ export interface Schema$EntityAdWordsLinks { /** * A list of entity AdWords links. */ items: Schema$EntityAdWordsLink[]; /** * The maximum number of entries the response can contain, regardless of the * actual number of entries returned. Its value ranges from 1 to 1000 with a * value of 1000 by default, or otherwise specified by the max-results query * parameter. */ itemsPerPage: number; /** * Collection type. */ kind: string; /** * Next link for this AdWords link collection. */ nextLink: string; /** * Previous link for this AdWords link collection. */ previousLink: string; /** * The starting index of the entries, which is 1 by default or otherwise * specified by the start-index query parameter. */ startIndex: number; /** * The total number of results for the query, regardless of the number of * results in the response. */ totalResults: number; } /** * JSON template for an Analytics Entity-User Link. Returns permissions that a * user has for an entity. */ export interface Schema$EntityUserLink { /** * Entity for this link. It can be an account, a web property, or a view * (profile). */ entity: any; /** * Entity user link ID */ id: string; /** * Resource type for entity user link. */ kind: string; /** * Permissions the user has for this entity. */ permissions: any; /** * Self link for this resource. */ selfLink: string; /** * User reference. */ userRef: Schema$UserRef; } /** * An entity user link collection provides a list of Analytics ACL links Each * resource in this collection corresponds to a single link. */ export interface Schema$EntityUserLinks { /** * A list of entity user links. */ items: Schema$EntityUserLink[]; /** * The maximum number of entries the response can contain, regardless of the * actual number of entries returned. Its value ranges from 1 to 1000 with a * value of 1000 by default, or otherwise specified by the max-results query * parameter. */ itemsPerPage: number; /** * Collection type. */ kind: string; /** * Next link for this account collection. */ nextLink: string; /** * Previous link for this account collection. */ previousLink: string; /** * The starting index of the entries, which is 1 by default or otherwise * specified by the start-index query parameter. */ startIndex: number; /** * The total number of results for the query, regardless of the number of * results in the response. */ totalResults: number; } /** * JSON template for Analytics experiment resource. */ export interface Schema$Experiment { /** * Account ID to which this experiment belongs. This field is read-only. */ accountId: string; /** * Time the experiment was created. This field is read-only. */ created: string; /** * Notes about this experiment. */ description: string; /** * If true, the end user will be able to edit the experiment via the Google * Analytics user interface. */ editableInGaUi: boolean; /** * The ending time of the experiment (the time the status changed from RUNNING * to ENDED). This field is present only if the experiment has ended. This * field is read-only. */ endTime: string; /** * Boolean specifying whether to distribute traffic evenly across all * variations. If the value is False, content experiments follows the default * behavior of adjusting traffic dynamically based on variation performance. * Optional -- defaults to False. This field may not be changed for an * experiment whose status is ENDED. */ equalWeighting: boolean; /** * Experiment ID. Required for patch and update. Disallowed for create. */ id: string; /** * Internal ID for the web property to which this experiment belongs. This * field is read-only. */ internalWebPropertyId: string; /** * Resource type for an Analytics experiment. This field is read-only. */ kind: string; /** * An integer number in [3, 90]. Specifies the minimum length of the * experiment. Can be changed for a running experiment. This field may not be * changed for an experiments whose status is ENDED. */ minimumExperimentLengthInDays: number; /** * Experiment name. This field may not be changed for an experiment whose * status is ENDED. This field is required when creating an experiment. */ name: string; /** * The metric that the experiment is optimizing. Valid values: * "ga:goal(n)Completions", "ga:adsenseAdsClicks", * "ga:adsenseAdsViewed", "ga:adsenseRevenue", * "ga:bounces", "ga:pageviews", * "ga:sessionDuration", "ga:transactions", * "ga:transactionRevenue". This field is required if status is * "RUNNING" and servingFramework is one of "REDIRECT" or * "API". */ objectiveMetric: string; /** * Whether the objectiveMetric should be minimized or maximized. Possible * values: "MAXIMUM", "MINIMUM". Optional--defaults to * "MAXIMUM". Cannot be specified without objectiveMetric. Cannot be * modified when status is "RUNNING" or "ENDED". */ optimizationType: string; /** * Parent link for an experiment. Points to the view (profile) to which this * experiment belongs. */ parentLink: any; /** * View (Profile) ID to which this experiment belongs. This field is * read-only. */ profileId: string; /** * Why the experiment ended. Possible values: "STOPPED_BY_USER", * "WINNER_FOUND", "EXPERIMENT_EXPIRED", * "ENDED_WITH_NO_WINNER", "GOAL_OBJECTIVE_CHANGED". * "ENDED_WITH_NO_WINNER" means that the experiment didn't * expire but no winner was projected to be found. If the experiment status is * changed via the API to ENDED this field is set to STOPPED_BY_USER. This * field is read-only. */ reasonExperimentEnded: string; /** * Boolean specifying whether variations URLS are rewritten to match those of * the original. This field may not be changed for an experiments whose status * is ENDED. */ rewriteVariationUrlsAsOriginal: boolean; /** * Link for this experiment. This field is read-only. */ selfLink: string; /** * The framework used to serve the experiment variations and evaluate the * results. One of: - REDIRECT: Google Analytics redirects traffic to * different variation pages, reports the chosen variation and evaluates the * results. - API: Google Analytics chooses and reports the variation to serve * and evaluates the results; the caller is responsible for serving the * selected variation. - EXTERNAL: The variations will be served externally * and the chosen variation reported to Google Analytics. The caller is * responsible for serving the selected variation and evaluating the results. */ servingFramework: string; /** * The snippet of code to include on the control page(s). This field is * read-only. */ snippet: string; /** * The starting time of the experiment (the time the status changed from * READY_TO_RUN to RUNNING). This field is present only if the experiment has * started. This field is read-only. */ startTime: string; /** * Experiment status. Possible values: "DRAFT", * "READY_TO_RUN", "RUNNING", "ENDED". * Experiments can be created in the "DRAFT", * "READY_TO_RUN" or "RUNNING" state. This field is * required when creating an experiment. */ status: string; /** * A floating-point number in (0, 1]. Specifies the fraction of the traffic * that participates in the experiment. Can be changed for a running * experiment. This field may not be changed for an experiments whose status * is ENDED. */ trafficCoverage: number; /** * Time the experiment was last modified. This field is read-only. */ updated: string; /** * Array of variations. The first variation in the array is the original. The * number of variations may not change once an experiment is in the RUNNING * state. At least two variations are required before status can be set to * RUNNING. */ variations: any[]; /** * Web property ID to which this experiment belongs. The web property ID is of * the form UA-XXXXX-YY. This field is read-only. */ webPropertyId: string; /** * A floating-point number in (0, 1). Specifies the necessary confidence level * to choose a winner. This field may not be changed for an experiments whose * status is ENDED. */ winnerConfidenceLevel: number; /** * Boolean specifying whether a winner has been found for this experiment. * This field is read-only. */ winnerFound: boolean; } /** * An experiment collection lists Analytics experiments to which the user has * access. Each view (profile) can have a set of experiments. Each resource in * the Experiment collection corresponds to a single Analytics experiment. */ export interface Schema$Experiments { /** * A list of experiments. */ items: Schema$Experiment[]; /** * 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. */ itemsPerPage: number; /** * Collection type. */ kind: string; /** * Link to next page for this experiment collection. */ nextLink: string; /** * Link to previous page for this experiment collection. */ previousLink: string; /** * The starting index of the resources, which is 1 by default or otherwise * specified by the start-index query parameter. */ startIndex: number; /** * The total number of results for the query, regardless of the number of * resources in the result. */ totalResults: number; /** * Email ID of the authenticated user */ username: string; } /** * JSON template for an Analytics account filter. */ export interface Schema$Filter { /** * Account ID to which this filter belongs. */ accountId: string; /** * Details for the filter of the type ADVANCED. */ advancedDetails: any; /** * Time this filter was created. */ created: string; /** * Details for the filter of the type EXCLUDE. */ excludeDetails: Schema$FilterExpression; /** * Filter ID. */ id: string; /** * Details for the filter of the type INCLUDE. */ includeDetails: Schema$FilterExpression; /** * Resource type for Analytics filter. */ kind: string; /** * Details for the filter of the type LOWER. */ lowercaseDetails: any; /** * Name of this filter. */ name: string; /** * Parent link for this filter. Points to the account to which this filter * belongs. */ parentLink: any; /** * Details for the filter of the type SEARCH_AND_REPLACE. */ searchAndReplaceDetails: any; /** * Link for this filter. */ selfLink: string; /** * Type of this filter. Possible values are INCLUDE, EXCLUDE, LOWERCASE, * UPPERCASE, SEARCH_AND_REPLACE and ADVANCED. */ type: string; /** * Time this filter was last modified. */ updated: string; /** * Details for the filter of the type UPPER. */ uppercaseDetails: any; } /** * JSON template for an Analytics filter expression. */ export interface Schema$FilterExpression { /** * Determines if the filter is case sensitive. */ caseSensitive: boolean; /** * Filter expression value */ expressionValue: string; /** * Field to filter. Possible values: - Content and Traffic - * PAGE_REQUEST_URI, - PAGE_HOSTNAME, - PAGE_TITLE, - REFERRAL, - * COST_DATA_URI (Campaign target URL), - HIT_TYPE, - INTERNAL_SEARCH_TERM, * - INTERNAL_SEARCH_TYPE, - SOURCE_PROPERTY_TRACKING_ID, - Campaign or * AdGroup - CAMPAIGN_SOURCE, - CAMPAIGN_MEDIUM, - CAMPAIGN_NAME, - * CAMPAIGN_AD_GROUP, - CAMPAIGN_TERM, - CAMPAIGN_CONTENT, - CAMPAIGN_CODE, * - CAMPAIGN_REFERRAL_PATH, - E-Commerce - TRANSACTION_COUNTRY, - * TRANSACTION_REGION, - TRANSACTION_CITY, - TRANSACTION_AFFILIATION (Store * or order location), - ITEM_NAME, - ITEM_CODE, - ITEM_VARIATION, - * TRANSACTION_ID, - TRANSACTION_CURRENCY_CODE, - PRODUCT_ACTION_TYPE, - * Audience/Users - BROWSER, - BROWSER_VERSION, - BROWSER_SIZE, - * PLATFORM, - PLATFORM_VERSION, - LANGUAGE, - SCREEN_RESOLUTION, - * SCREEN_COLORS, - JAVA_ENABLED (Boolean Field), - FLASH_VERSION, - * GEO_SPEED (Connection speed), - VISITOR_TYPE, - GEO_ORGANIZATION (ISP * organization), - GEO_DOMAIN, - GEO_IP_ADDRESS, - GEO_IP_VERSION, - * Location - GEO_COUNTRY, - GEO_REGION, - GEO_CITY, - Event - * EVENT_CATEGORY, - EVENT_ACTION, - EVENT_LABEL, - Other - * CUSTOM_FIELD_1, - CUSTOM_FIELD_2, - USER_DEFINED_VALUE, - Application * - APP_ID, - APP_INSTALLER_ID, - APP_NAME, - APP_VERSION, - SCREEN, - * IS_APP (Boolean Field), - IS_FATAL_EXCEPTION (Boolean Field), - * EXCEPTION_DESCRIPTION, - Mobile device - IS_MOBILE (Boolean Field, * Deprecated. Use DEVICE_CATEGORY=mobile), - IS_TABLET (Boolean Field, * Deprecated. Use DEVICE_CATEGORY=tablet), - DEVICE_CATEGORY, - * MOBILE_HAS_QWERTY_KEYBOARD (Boolean Field), - MOBILE_HAS_NFC_SUPPORT * (Boolean Field), - MOBILE_HAS_CELLULAR_RADIO (Boolean Field), - * MOBILE_HAS_WIFI_SUPPORT (Boolean Field), - MOBILE_BRAND_NAME, - * MOBILE_MODEL_NAME, - MOBILE_MARKETING_NAME, - MOBILE_POINTING_METHOD, - * Social - SOCIAL_NETWORK, - SOCIAL_ACTION, - SOCIAL_ACTION_TARGET, - * Custom dimension - CUSTOM_DIMENSION (See accompanying field index), */ field: string; /** * The Index of the custom dimension. Set only if the field is a is * CUSTOM_DIMENSION. */ fieldIndex: number; /** * Kind value for filter expression */ kind: string; /** * Match type for this filter. Possible values are BEGINS_WITH, EQUAL, * ENDS_WITH, CONTAINS, or MATCHES. GEO_DOMAIN, GEO_IP_ADDRESS, * PAGE_REQUEST_URI, or PAGE_HOSTNAME filters can use any match type; all * other filters must use MATCHES. */ matchType: string; } /** * JSON template for a profile filter link. */ export interface Schema$FilterRef { /** * Account ID to which this filter belongs. */ accountId: string; /** * Link for this filter. */ href: string; /** * Filter ID. */ id: string; /** * Kind value for filter reference. */ kind: string; /** * Name of this filter. */ name: string; } /** * A filter collection lists filters created by users in an Analytics account. * Each resource in the collection corresponds to a filter. */ export interface Schema$Filters { /** * A list of filters. */ items: Schema$Filter[]; /** * The maximum number of resources the response can contain, regardless of the * actual number of resources returned. Its value ranges from 1 to 1,000 with * a value of 1000 by default, or otherwise specified by the max-results query * parameter. */ itemsPerPage: number; /** * Collection type. */ kind: string; /** * Link to next page for this filter collection. */ nextLink: string; /** * Link to previous page for this filter collection. */ previousLink: string; /** * The starting index of the resources, which is 1 by default or otherwise * specified by the start-index query parameter. */ startIndex: number; /** * The total number of results for the query, regardless of the number of * results in the response. */ totalResults: number; /** * Email ID of the authenticated user */ username: string; } /** * Analytics data for a given view (profile). */ export interface Schema$GaData { /** * Column headers that list dimension names followed by the metric names. The * order of dimensions and metrics is same as specified in the request. */ columnHeaders: any[]; /** * Determines if Analytics data contains samples. */ containsSampledData: boolean; /** * The last refreshed time in seconds for Analytics data. */ dataLastRefreshed: string; dataTable: any; /** * Unique ID for this data response. */ id: string; /** * The maximum number of rows the response can contain, regardless of the * actual number of rows returned. Its value ranges from 1 to 10,000 with a * value of 1000 by default, or otherwise specified by the max-results query * parameter. */ itemsPerPage: number; /** * Resource type. */ kind: string; /** * Link to next page for this Analytics data query. */ nextLink: string; /** * Link to previous page for this Analytics data query. */ previousLink: string; /** * Information for the view (profile), for which the Analytics data was * requested. */ profileInfo: any; /** * Analytics data request query parameters. */ query: any; /** * Analytics data rows, where each row contains a list of dimension values * followed by the metric values. The order of dimensions and metrics is same * as specified in the request. */ rows: string[][]; /** * The number of samples used to calculate the result. */ sampleSize: string; /** * Total size of the sample space from which the samples were selected. */ sampleSpace: string; /** * Link to this page. */ selfLink: string; /** * The total number of rows for the query, regardless of the number of rows in * the response. */ totalResults: number; /** * Total values for the requested metrics over all the results, not just the * results returned in this response. The order of the metric totals is same * as the metric order specified in the request. */ totalsForAllResults: any; } /** * JSON template for Analytics goal resource. */ export interface Schema$Goal { /** * Account ID to which this goal belongs. */ accountId: string; /** * Determines whether this goal is active. */ active: boolean; /** * Time this goal was created. */ created: string; /** * Details for the goal of the type EVENT. */ eventDetails: any; /** * Goal ID. */ id: string; /** * Internal ID for the web property to which this goal belongs. */ internalWebPropertyId: string; /** * Resource type for an Analytics goal. */ kind: string; /** * Goal name. */ name: string; /** * Parent link for a goal. Points to the view (profile) to which this goal * belongs. */ parentLink: any; /** * View (Profile) ID to which this goal belongs. */ profileId: string; /** * Link for this goal. */ selfLink: string; /** * Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, * VISIT_NUM_PAGES, AND EVENT. */ type: string; /** * Time this goal was last modified. */ updated: string; /** * Details for the goal of the type URL_DESTINATION. */ urlDestinationDetails: any; /** * Goal value. */ value: number; /** * Details for the goal of the type VISIT_NUM_PAGES. */ visitNumPagesDetails: any; /** * Details for the goal of the type VISIT_TIME_ON_SITE. */ visitTimeOnSiteDetails: any; /** * Web property ID to which this goal belongs. The web property ID is of the * form UA-XXXXX-YY. */ webPropertyId: string; } /** * 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. */ export interface Schema$Goals { /** * A list of goals. */ items: Schema$Goal[]; /** * 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. */ itemsPerPage: number; /** * Collection type. */ kind: string; /** * Link to next page for this goal collection. */ nextLink: string; /** * Link to previous page for this goal collection. */ previousLink: string; /** * The starting index of the resources, which is 1 by default or otherwise * specified by the start-index query parameter. */ startIndex: number; /** * The total number of results for the query, regardless of the number of * resources in the result. */ totalResults: number; /** * Email ID of the authenticated user */ username: string; } /** * JSON template for an Analytics Remarketing Include Conditions. */ export interface Schema$IncludeConditions { /** * The look-back window lets you specify a time frame for evaluating the * behavior that qualifies users for your audience. For example, if your * filters include users from Central Asia, and Transactions Greater than 2, * and you set the look-back window to 14 days, then any user from Central * Asia whose cumulative transactions exceed 2 during the last 14 days is * added to the audience. */ daysToLookBack: number; /** * Boolean indicating whether this segment is a smart list. * https://support.google.com/analytics/answer/4628577 */ isSmartList: boolean; /** * Resource type for include conditions. */ kind: string; /** * Number of days (in the range 1 to 540) a user remains in the audience. */ membershipDurationDays: number; /** * The segment condition that will cause a user to be added to an audience. */ segment: string; } /** * JSON template for an Analytics Remarketing Audience Foreign Link. */ export interface Schema$LinkedForeignAccount { /** * Account ID to which this linked foreign account belongs. */ accountId: string; /** * Boolean indicating whether this is eligible for search. */ eligibleForSearch: boolean; /** * Entity ad account link ID. */ id: string; /** * Internal ID for the web property to which this linked foreign account * belongs. */ internalWebPropertyId: string; /** * Resource type for linked foreign account. */ kind: string; /** * The foreign account ID. For example the an AdWords `linkedAccountId` has * the following format XXX-XXX-XXXX. */ linkedAccountId: string; /** * Remarketing audience ID to which this linked foreign account belongs. */ remarketingAudienceId: string; /** * The status of this foreign account link. */ status: string; /** * The type of the foreign account. For example, `ADWORDS_LINKS`, `DBM_LINKS`, * `MCC_LINKS` or `OPTIMIZE`. */ type: string; /** * Web property ID of the form UA-XXXXX-YY to which this linked foreign * account belongs. */ webPropertyId: string; } /** * Multi-Channel Funnels data for a given view (profile). */ export interface Schema$McfData { /** * Column headers that list dimension names followed by the metric names. The * order of dimensions and metrics is same as specified in the request. */ columnHeaders: any[]; /** * Determines if the Analytics data contains sampled data. */ containsSampledData: boolean; /** * Unique ID for this data response. */ id: string; /** * The maximum number of rows the response can contain, regardless of the * actual number of rows returned. Its value ranges from 1 to 10,000 with a * value of 1000 by default, or otherwise specified by the max-results query * parameter. */ itemsPerPage: number; /** * Resource type. */ kind: string; /** * Link to next page for this Analytics data query. */ nextLink: string; /** * Link to previous page for this Analytics data query. */ previousLink: string; /** * Information for the view (profile), for which the Analytics data was * requested. */ profileInfo: any; /** * Analytics data request query parameters. */ query: any; /** * Analytics data rows, where each row contains a list of dimension values * followed by the metric values. The order of dimensions and metrics is same * as specified in the request. */ rows: any[][]; /** * The number of samples used to calculate the result. */ sampleSize: string; /** * Total size of the sample space from which the samples were selected. */ sampleSpace: string; /** * Link to this page. */ selfLink: string; /** * The total number of rows for the query, regardless of the number of rows in * the response. */ totalResults: number; /** * Total values for the requested metrics over all the results, not just the * results returned in this response. The order of the metric totals is same * as the metric order specified in the request. */ totalsForAllResults: any; } /** * JSON template for an Analytics view (profile). */ export interface Schema$Profile { /** * Account ID to which this view (profile) belongs. */ accountId: string; /** * Indicates whether bot filtering is enabled for this view (profile). */ botFilteringEnabled: boolean; /** * Child link for this view (profile). Points to the list of goals for this * view (profile). */ childLink: any; /** * Time this view (profile) was created. */ created: string; /** * 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 */ currency: string; /** * Default page for this view (profile). */ defaultPage: string; /** * Indicates whether ecommerce tracking is enabled for this view (profile). */ eCommerceTracking: boolean; /** * Indicates whether enhanced ecommerce tracking is enabled for this view * (profile). This property can only be enabled if ecommerce tracking is * enabled. */ enhancedECommerceTracking: boolean; /** * The query parameters that are excluded from this view (profile). */ excludeQueryParameters: string; /** * View (Profile) ID. */ id: string; /** * Internal ID for the web property to which this view (profile) belongs. */ internalWebPropertyId: string; /** * Resource type for Analytics view (profile). */ kind: string; /** * Name of this view (profile). */ name: string; /** * Parent link for this view (profile). Points to the web property to which * this view (profile) belongs. */ parentLink: any; /** * Permissions the user has for this view (profile). */ permissions: any; /** * Link for this view (profile). */ selfLink: string; /** * Site search category parameters for this view (profile). */ siteSearchCategoryParameters: string; /** * The site search query parameters for this view (profile). */ siteSearchQueryParameters: string; /** * Indicates whether this view (profile) is starred or not. */ starred: boolean; /** * Whether or not Analytics will strip search category parameters from the * URLs in your reports. */ stripSiteSearchCategoryParameters: boolean; /** * Whether or not Analytics will strip search query parameters from the URLs * in your reports. */ stripSiteSearchQueryParameters: boolean; /** * Time zone for which this view (profile) has been configured. Time zones are * identified by strings from the TZ database. */ timezone: string; /** * View (Profile) type. Supported types: WEB or APP. */ type: string; /** * Time this view (profile) was last modified. */ updated: string; /** * Web property ID of the form UA-XXXXX-YY to which this view (profile) * belongs. */ webPropertyId: string; /** * Website URL for this view (profile). */ websiteUrl: string; } /** * JSON template for an Analytics profile filter link. */ export interface Schema$ProfileFilterLink { /** * Filter for this link. */ filterRef: Schema$FilterRef; /** * Profile filter link ID. */ id: string; /** * Resource type for Analytics filter. */ kind: string; /** * View (Profile) for this link. */ profileRef: Schema$ProfileRef; /** * The rank of this profile filter link relative to the other filters linked * to the same profile. For readonly (i.e., list and get) operations, the rank * always starts at 1. For write (i.e., create, update, or delete) operations, * you may specify a value between 0 and 255 inclusively, [0, 255]. In order * to insert a link at the end of the list, either don't specify a rank or * set a rank to a number greater than the largest rank in the list. In order * to insert a link to the beginning of the list specify a rank that is less * than or equal to 1. The new link will move all existing filters with the * same or lower rank down the list. After the link is * inserted/updated/deleted all profile filter links will be renumbered * starting at 1. */ rank: number; /** * Link for this profile filter link. */ selfLink: string; } /** * A profile filter link collection lists profile filter links between profiles * and filters. Each resource in t