@googleapis/analyticsdata 2.0.1 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/v1beta.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
3
2
  import { Readable } from 'stream';
4
3
  export declare namespace analyticsdata_v1beta {
@@ -1335,6 +1334,64 @@ export declare namespace analyticsdata_v1beta {
1335
1334
  constructor(context: APIRequestContext);
1336
1335
  /**
1337
1336
  * Returns multiple pivot reports in a batch. All reports must be for the same Google Analytics property.
1337
+ * @example
1338
+ * ```js
1339
+ * // Before running the sample:
1340
+ * // - Enable the API at:
1341
+ * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com
1342
+ * // - Login into gcloud by running:
1343
+ * // ```sh
1344
+ * // $ gcloud auth application-default login
1345
+ * // ```
1346
+ * // - Install the npm module by running:
1347
+ * // ```sh
1348
+ * // $ npm install googleapis
1349
+ * // ```
1350
+ *
1351
+ * const {google} = require('googleapis');
1352
+ * const analyticsdata = google.analyticsdata('v1beta');
1353
+ *
1354
+ * async function main() {
1355
+ * const auth = new google.auth.GoogleAuth({
1356
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1357
+ * scopes: [
1358
+ * 'https://www.googleapis.com/auth/analytics',
1359
+ * 'https://www.googleapis.com/auth/analytics.readonly',
1360
+ * ],
1361
+ * });
1362
+ *
1363
+ * // Acquire an auth client, and bind it to all future calls
1364
+ * const authClient = await auth.getClient();
1365
+ * google.options({auth: authClient});
1366
+ *
1367
+ * // Do the magic
1368
+ * const res = await analyticsdata.properties.batchRunPivotReports({
1369
+ * // A Google Analytics property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). This property must be specified for the batch. The property within RunPivotReportRequest may either be unspecified or consistent with this property. Example: properties/1234
1370
+ * property: 'properties/my-propertie',
1371
+ *
1372
+ * // Request body metadata
1373
+ * requestBody: {
1374
+ * // request body parameters
1375
+ * // {
1376
+ * // "requests": []
1377
+ * // }
1378
+ * },
1379
+ * });
1380
+ * console.log(res.data);
1381
+ *
1382
+ * // Example response
1383
+ * // {
1384
+ * // "kind": "my_kind",
1385
+ * // "pivotReports": []
1386
+ * // }
1387
+ * }
1388
+ *
1389
+ * main().catch(e => {
1390
+ * console.error(e);
1391
+ * throw e;
1392
+ * });
1393
+ *
1394
+ * ```
1338
1395
  *
1339
1396
  * @param params - Parameters for request
1340
1397
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1349,6 +1406,64 @@ export declare namespace analyticsdata_v1beta {
1349
1406
  batchRunPivotReports(callback: BodyResponseCallback<Schema$BatchRunPivotReportsResponse>): void;
1350
1407
  /**
1351
1408
  * Returns multiple reports in a batch. All reports must be for the same Google Analytics property.
1409
+ * @example
1410
+ * ```js
1411
+ * // Before running the sample:
1412
+ * // - Enable the API at:
1413
+ * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com
1414
+ * // - Login into gcloud by running:
1415
+ * // ```sh
1416
+ * // $ gcloud auth application-default login
1417
+ * // ```
1418
+ * // - Install the npm module by running:
1419
+ * // ```sh
1420
+ * // $ npm install googleapis
1421
+ * // ```
1422
+ *
1423
+ * const {google} = require('googleapis');
1424
+ * const analyticsdata = google.analyticsdata('v1beta');
1425
+ *
1426
+ * async function main() {
1427
+ * const auth = new google.auth.GoogleAuth({
1428
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1429
+ * scopes: [
1430
+ * 'https://www.googleapis.com/auth/analytics',
1431
+ * 'https://www.googleapis.com/auth/analytics.readonly',
1432
+ * ],
1433
+ * });
1434
+ *
1435
+ * // Acquire an auth client, and bind it to all future calls
1436
+ * const authClient = await auth.getClient();
1437
+ * google.options({auth: authClient});
1438
+ *
1439
+ * // Do the magic
1440
+ * const res = await analyticsdata.properties.batchRunReports({
1441
+ * // A Google Analytics property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). This property must be specified for the batch. The property within RunReportRequest may either be unspecified or consistent with this property. Example: properties/1234
1442
+ * property: 'properties/my-propertie',
1443
+ *
1444
+ * // Request body metadata
1445
+ * requestBody: {
1446
+ * // request body parameters
1447
+ * // {
1448
+ * // "requests": []
1449
+ * // }
1450
+ * },
1451
+ * });
1452
+ * console.log(res.data);
1453
+ *
1454
+ * // Example response
1455
+ * // {
1456
+ * // "kind": "my_kind",
1457
+ * // "reports": []
1458
+ * // }
1459
+ * }
1460
+ *
1461
+ * main().catch(e => {
1462
+ * console.error(e);
1463
+ * throw e;
1464
+ * });
1465
+ *
1466
+ * ```
1352
1467
  *
1353
1468
  * @param params - Parameters for request
1354
1469
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1363,6 +1478,68 @@ export declare namespace analyticsdata_v1beta {
1363
1478
  batchRunReports(callback: BodyResponseCallback<Schema$BatchRunReportsResponse>): void;
1364
1479
  /**
1365
1480
  * This compatibility method lists dimensions and metrics that can be added to a report request and maintain compatibility. This method fails if the request's dimensions and metrics are incompatible. In Google Analytics, reports fail if they request incompatible dimensions and/or metrics; in that case, you will need to remove dimensions and/or metrics from the incompatible report until the report is compatible. The Realtime and Core reports have different compatibility rules. This method checks compatibility for Core reports.
1481
+ * @example
1482
+ * ```js
1483
+ * // Before running the sample:
1484
+ * // - Enable the API at:
1485
+ * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com
1486
+ * // - Login into gcloud by running:
1487
+ * // ```sh
1488
+ * // $ gcloud auth application-default login
1489
+ * // ```
1490
+ * // - Install the npm module by running:
1491
+ * // ```sh
1492
+ * // $ npm install googleapis
1493
+ * // ```
1494
+ *
1495
+ * const {google} = require('googleapis');
1496
+ * const analyticsdata = google.analyticsdata('v1beta');
1497
+ *
1498
+ * async function main() {
1499
+ * const auth = new google.auth.GoogleAuth({
1500
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1501
+ * scopes: [
1502
+ * 'https://www.googleapis.com/auth/analytics',
1503
+ * 'https://www.googleapis.com/auth/analytics.readonly',
1504
+ * ],
1505
+ * });
1506
+ *
1507
+ * // Acquire an auth client, and bind it to all future calls
1508
+ * const authClient = await auth.getClient();
1509
+ * google.options({auth: authClient});
1510
+ *
1511
+ * // Do the magic
1512
+ * const res = await analyticsdata.properties.checkCompatibility({
1513
+ * // A Google Analytics property identifier whose events are tracked. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). `property` should be the same value as in your `runReport` request. Example: properties/1234
1514
+ * property: 'properties/my-propertie',
1515
+ *
1516
+ * // Request body metadata
1517
+ * requestBody: {
1518
+ * // request body parameters
1519
+ * // {
1520
+ * // "compatibilityFilter": "my_compatibilityFilter",
1521
+ * // "dimensionFilter": {},
1522
+ * // "dimensions": [],
1523
+ * // "metricFilter": {},
1524
+ * // "metrics": []
1525
+ * // }
1526
+ * },
1527
+ * });
1528
+ * console.log(res.data);
1529
+ *
1530
+ * // Example response
1531
+ * // {
1532
+ * // "dimensionCompatibilities": [],
1533
+ * // "metricCompatibilities": []
1534
+ * // }
1535
+ * }
1536
+ *
1537
+ * main().catch(e => {
1538
+ * console.error(e);
1539
+ * throw e;
1540
+ * });
1541
+ *
1542
+ * ```
1366
1543
  *
1367
1544
  * @param params - Parameters for request
1368
1545
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1377,6 +1554,58 @@ export declare namespace analyticsdata_v1beta {
1377
1554
  checkCompatibility(callback: BodyResponseCallback<Schema$CheckCompatibilityResponse>): void;
1378
1555
  /**
1379
1556
  * Returns metadata for dimensions and metrics available in reporting methods. Used to explore the dimensions and metrics. In this method, a Google Analytics property identifier is specified in the request, and the metadata response includes Custom dimensions and metrics as well as Universal metadata. For example if a custom metric with parameter name `levels_unlocked` is registered to a property, the Metadata response will contain `customEvent:levels_unlocked`. Universal metadata are dimensions and metrics applicable to any property such as `country` and `totalUsers`.
1557
+ * @example
1558
+ * ```js
1559
+ * // Before running the sample:
1560
+ * // - Enable the API at:
1561
+ * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com
1562
+ * // - Login into gcloud by running:
1563
+ * // ```sh
1564
+ * // $ gcloud auth application-default login
1565
+ * // ```
1566
+ * // - Install the npm module by running:
1567
+ * // ```sh
1568
+ * // $ npm install googleapis
1569
+ * // ```
1570
+ *
1571
+ * const {google} = require('googleapis');
1572
+ * const analyticsdata = google.analyticsdata('v1beta');
1573
+ *
1574
+ * async function main() {
1575
+ * const auth = new google.auth.GoogleAuth({
1576
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1577
+ * scopes: [
1578
+ * 'https://www.googleapis.com/auth/analytics',
1579
+ * 'https://www.googleapis.com/auth/analytics.readonly',
1580
+ * ],
1581
+ * });
1582
+ *
1583
+ * // Acquire an auth client, and bind it to all future calls
1584
+ * const authClient = await auth.getClient();
1585
+ * google.options({auth: authClient});
1586
+ *
1587
+ * // Do the magic
1588
+ * const res = await analyticsdata.properties.getMetadata({
1589
+ * // Required. The resource name of the metadata to retrieve. This name field is specified in the URL path and not URL parameters. Property is a numeric Google Analytics property identifier. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Example: properties/1234/metadata Set the Property ID to 0 for dimensions and metrics common to all properties. In this special mode, this method will not return custom dimensions and metrics.
1590
+ * name: 'properties/my-propertie/metadata',
1591
+ * });
1592
+ * console.log(res.data);
1593
+ *
1594
+ * // Example response
1595
+ * // {
1596
+ * // "comparisons": [],
1597
+ * // "dimensions": [],
1598
+ * // "metrics": [],
1599
+ * // "name": "my_name"
1600
+ * // }
1601
+ * }
1602
+ *
1603
+ * main().catch(e => {
1604
+ * console.error(e);
1605
+ * throw e;
1606
+ * });
1607
+ *
1608
+ * ```
1380
1609
  *
1381
1610
  * @param params - Parameters for request
1382
1611
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1391,6 +1620,81 @@ export declare namespace analyticsdata_v1beta {
1391
1620
  getMetadata(callback: BodyResponseCallback<Schema$Metadata>): void;
1392
1621
  /**
1393
1622
  * Returns a customized pivot report of your Google Analytics event data. Pivot reports are more advanced and expressive formats than regular reports. In a pivot report, dimensions are only visible if they are included in a pivot. Multiple pivots can be specified to further dissect your data.
1623
+ * @example
1624
+ * ```js
1625
+ * // Before running the sample:
1626
+ * // - Enable the API at:
1627
+ * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com
1628
+ * // - Login into gcloud by running:
1629
+ * // ```sh
1630
+ * // $ gcloud auth application-default login
1631
+ * // ```
1632
+ * // - Install the npm module by running:
1633
+ * // ```sh
1634
+ * // $ npm install googleapis
1635
+ * // ```
1636
+ *
1637
+ * const {google} = require('googleapis');
1638
+ * const analyticsdata = google.analyticsdata('v1beta');
1639
+ *
1640
+ * async function main() {
1641
+ * const auth = new google.auth.GoogleAuth({
1642
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1643
+ * scopes: [
1644
+ * 'https://www.googleapis.com/auth/analytics',
1645
+ * 'https://www.googleapis.com/auth/analytics.readonly',
1646
+ * ],
1647
+ * });
1648
+ *
1649
+ * // Acquire an auth client, and bind it to all future calls
1650
+ * const authClient = await auth.getClient();
1651
+ * google.options({auth: authClient});
1652
+ *
1653
+ * // Do the magic
1654
+ * const res = await analyticsdata.properties.runPivotReport({
1655
+ * // A Google Analytics property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Within a batch request, this property should either be unspecified or consistent with the batch-level property. Example: properties/1234
1656
+ * property: 'properties/my-propertie',
1657
+ *
1658
+ * // Request body metadata
1659
+ * requestBody: {
1660
+ * // request body parameters
1661
+ * // {
1662
+ * // "cohortSpec": {},
1663
+ * // "comparisons": [],
1664
+ * // "currencyCode": "my_currencyCode",
1665
+ * // "dateRanges": [],
1666
+ * // "dimensionFilter": {},
1667
+ * // "dimensions": [],
1668
+ * // "keepEmptyRows": false,
1669
+ * // "metricFilter": {},
1670
+ * // "metrics": [],
1671
+ * // "pivots": [],
1672
+ * // "property": "my_property",
1673
+ * // "returnPropertyQuota": false
1674
+ * // }
1675
+ * },
1676
+ * });
1677
+ * console.log(res.data);
1678
+ *
1679
+ * // Example response
1680
+ * // {
1681
+ * // "aggregates": [],
1682
+ * // "dimensionHeaders": [],
1683
+ * // "kind": "my_kind",
1684
+ * // "metadata": {},
1685
+ * // "metricHeaders": [],
1686
+ * // "pivotHeaders": [],
1687
+ * // "propertyQuota": {},
1688
+ * // "rows": []
1689
+ * // }
1690
+ * }
1691
+ *
1692
+ * main().catch(e => {
1693
+ * console.error(e);
1694
+ * throw e;
1695
+ * });
1696
+ *
1697
+ * ```
1394
1698
  *
1395
1699
  * @param params - Parameters for request
1396
1700
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1405,6 +1709,79 @@ export declare namespace analyticsdata_v1beta {
1405
1709
  runPivotReport(callback: BodyResponseCallback<Schema$RunPivotReportResponse>): void;
1406
1710
  /**
1407
1711
  * Returns a customized report of realtime event data for your property. Events appear in realtime reports seconds after they have been sent to the Google Analytics. Realtime reports show events and usage data for the periods of time ranging from the present moment to 30 minutes ago (up to 60 minutes for Google Analytics 360 properties). For a guide to constructing realtime requests & understanding responses, see [Creating a Realtime Report](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-basics).
1712
+ * @example
1713
+ * ```js
1714
+ * // Before running the sample:
1715
+ * // - Enable the API at:
1716
+ * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com
1717
+ * // - Login into gcloud by running:
1718
+ * // ```sh
1719
+ * // $ gcloud auth application-default login
1720
+ * // ```
1721
+ * // - Install the npm module by running:
1722
+ * // ```sh
1723
+ * // $ npm install googleapis
1724
+ * // ```
1725
+ *
1726
+ * const {google} = require('googleapis');
1727
+ * const analyticsdata = google.analyticsdata('v1beta');
1728
+ *
1729
+ * async function main() {
1730
+ * const auth = new google.auth.GoogleAuth({
1731
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1732
+ * scopes: [
1733
+ * 'https://www.googleapis.com/auth/analytics',
1734
+ * 'https://www.googleapis.com/auth/analytics.readonly',
1735
+ * ],
1736
+ * });
1737
+ *
1738
+ * // Acquire an auth client, and bind it to all future calls
1739
+ * const authClient = await auth.getClient();
1740
+ * google.options({auth: authClient});
1741
+ *
1742
+ * // Do the magic
1743
+ * const res = await analyticsdata.properties.runRealtimeReport({
1744
+ * // A Google Analytics property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Example: properties/1234
1745
+ * property: 'properties/my-propertie',
1746
+ *
1747
+ * // Request body metadata
1748
+ * requestBody: {
1749
+ * // request body parameters
1750
+ * // {
1751
+ * // "dimensionFilter": {},
1752
+ * // "dimensions": [],
1753
+ * // "limit": "my_limit",
1754
+ * // "metricAggregations": [],
1755
+ * // "metricFilter": {},
1756
+ * // "metrics": [],
1757
+ * // "minuteRanges": [],
1758
+ * // "orderBys": [],
1759
+ * // "returnPropertyQuota": false
1760
+ * // }
1761
+ * },
1762
+ * });
1763
+ * console.log(res.data);
1764
+ *
1765
+ * // Example response
1766
+ * // {
1767
+ * // "dimensionHeaders": [],
1768
+ * // "kind": "my_kind",
1769
+ * // "maximums": [],
1770
+ * // "metricHeaders": [],
1771
+ * // "minimums": [],
1772
+ * // "propertyQuota": {},
1773
+ * // "rowCount": 0,
1774
+ * // "rows": [],
1775
+ * // "totals": []
1776
+ * // }
1777
+ * }
1778
+ *
1779
+ * main().catch(e => {
1780
+ * console.error(e);
1781
+ * throw e;
1782
+ * });
1783
+ *
1784
+ * ```
1408
1785
  *
1409
1786
  * @param params - Parameters for request
1410
1787
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1419,6 +1796,86 @@ export declare namespace analyticsdata_v1beta {
1419
1796
  runRealtimeReport(callback: BodyResponseCallback<Schema$RunRealtimeReportResponse>): void;
1420
1797
  /**
1421
1798
  * Returns a customized report of your Google Analytics event data. Reports contain statistics derived from data collected by the Google Analytics tracking code. The data returned from the API is as a table with columns for the requested dimensions and metrics. Metrics are individual measurements of user activity on your property, such as active users or event count. Dimensions break down metrics across some common criteria, such as country or event name. For a guide to constructing requests & understanding responses, see [Creating a Report](https://developers.google.com/analytics/devguides/reporting/data/v1/basics).
1799
+ * @example
1800
+ * ```js
1801
+ * // Before running the sample:
1802
+ * // - Enable the API at:
1803
+ * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com
1804
+ * // - Login into gcloud by running:
1805
+ * // ```sh
1806
+ * // $ gcloud auth application-default login
1807
+ * // ```
1808
+ * // - Install the npm module by running:
1809
+ * // ```sh
1810
+ * // $ npm install googleapis
1811
+ * // ```
1812
+ *
1813
+ * const {google} = require('googleapis');
1814
+ * const analyticsdata = google.analyticsdata('v1beta');
1815
+ *
1816
+ * async function main() {
1817
+ * const auth = new google.auth.GoogleAuth({
1818
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1819
+ * scopes: [
1820
+ * 'https://www.googleapis.com/auth/analytics',
1821
+ * 'https://www.googleapis.com/auth/analytics.readonly',
1822
+ * ],
1823
+ * });
1824
+ *
1825
+ * // Acquire an auth client, and bind it to all future calls
1826
+ * const authClient = await auth.getClient();
1827
+ * google.options({auth: authClient});
1828
+ *
1829
+ * // Do the magic
1830
+ * const res = await analyticsdata.properties.runReport({
1831
+ * // A Google Analytics property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Within a batch request, this property should either be unspecified or consistent with the batch-level property. Example: properties/1234
1832
+ * property: 'properties/my-propertie',
1833
+ *
1834
+ * // Request body metadata
1835
+ * requestBody: {
1836
+ * // request body parameters
1837
+ * // {
1838
+ * // "cohortSpec": {},
1839
+ * // "comparisons": [],
1840
+ * // "currencyCode": "my_currencyCode",
1841
+ * // "dateRanges": [],
1842
+ * // "dimensionFilter": {},
1843
+ * // "dimensions": [],
1844
+ * // "keepEmptyRows": false,
1845
+ * // "limit": "my_limit",
1846
+ * // "metricAggregations": [],
1847
+ * // "metricFilter": {},
1848
+ * // "metrics": [],
1849
+ * // "offset": "my_offset",
1850
+ * // "orderBys": [],
1851
+ * // "property": "my_property",
1852
+ * // "returnPropertyQuota": false
1853
+ * // }
1854
+ * },
1855
+ * });
1856
+ * console.log(res.data);
1857
+ *
1858
+ * // Example response
1859
+ * // {
1860
+ * // "dimensionHeaders": [],
1861
+ * // "kind": "my_kind",
1862
+ * // "maximums": [],
1863
+ * // "metadata": {},
1864
+ * // "metricHeaders": [],
1865
+ * // "minimums": [],
1866
+ * // "propertyQuota": {},
1867
+ * // "rowCount": 0,
1868
+ * // "rows": [],
1869
+ * // "totals": []
1870
+ * // }
1871
+ * }
1872
+ *
1873
+ * main().catch(e => {
1874
+ * console.error(e);
1875
+ * throw e;
1876
+ * });
1877
+ *
1878
+ * ```
1422
1879
  *
1423
1880
  * @param params - Parameters for request
1424
1881
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1503,6 +1960,76 @@ export declare namespace analyticsdata_v1beta {
1503
1960
  constructor(context: APIRequestContext);
1504
1961
  /**
1505
1962
  * Creates an audience export for later retrieval. This method quickly returns the audience export's resource name and initiates a long running asynchronous request to form an audience export. To export the users in an audience export, first create the audience export through this method and then send the audience resource name to the `QueryAudienceExport` method. See [Creating an Audience Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Exports with examples. An audience export is a snapshot of the users currently in the audience at the time of audience export creation. Creating audience exports for one audience on different days will return different results as users enter and exit the audience. Audiences in Google Analytics 4 allow you to segment your users in the ways that are important to your business. To learn more, see https://support.google.com/analytics/answer/9267572. Audience exports contain the users in each audience. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
1963
+ * @example
1964
+ * ```js
1965
+ * // Before running the sample:
1966
+ * // - Enable the API at:
1967
+ * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com
1968
+ * // - Login into gcloud by running:
1969
+ * // ```sh
1970
+ * // $ gcloud auth application-default login
1971
+ * // ```
1972
+ * // - Install the npm module by running:
1973
+ * // ```sh
1974
+ * // $ npm install googleapis
1975
+ * // ```
1976
+ *
1977
+ * const {google} = require('googleapis');
1978
+ * const analyticsdata = google.analyticsdata('v1beta');
1979
+ *
1980
+ * async function main() {
1981
+ * const auth = new google.auth.GoogleAuth({
1982
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1983
+ * scopes: [
1984
+ * 'https://www.googleapis.com/auth/analytics',
1985
+ * 'https://www.googleapis.com/auth/analytics.readonly',
1986
+ * ],
1987
+ * });
1988
+ *
1989
+ * // Acquire an auth client, and bind it to all future calls
1990
+ * const authClient = await auth.getClient();
1991
+ * google.options({auth: authClient});
1992
+ *
1993
+ * // Do the magic
1994
+ * const res = await analyticsdata.properties.audienceExports.create({
1995
+ * // Required. The parent resource where this audience export will be created. Format: `properties/{property\}`
1996
+ * parent: 'properties/my-propertie',
1997
+ *
1998
+ * // Request body metadata
1999
+ * requestBody: {
2000
+ * // request body parameters
2001
+ * // {
2002
+ * // "audience": "my_audience",
2003
+ * // "audienceDisplayName": "my_audienceDisplayName",
2004
+ * // "beginCreatingTime": "my_beginCreatingTime",
2005
+ * // "creationQuotaTokensCharged": 0,
2006
+ * // "dimensions": [],
2007
+ * // "errorMessage": "my_errorMessage",
2008
+ * // "name": "my_name",
2009
+ * // "percentageCompleted": {},
2010
+ * // "rowCount": 0,
2011
+ * // "state": "my_state"
2012
+ * // }
2013
+ * },
2014
+ * });
2015
+ * console.log(res.data);
2016
+ *
2017
+ * // Example response
2018
+ * // {
2019
+ * // "done": false,
2020
+ * // "error": {},
2021
+ * // "metadata": {},
2022
+ * // "name": "my_name",
2023
+ * // "response": {}
2024
+ * // }
2025
+ * }
2026
+ *
2027
+ * main().catch(e => {
2028
+ * console.error(e);
2029
+ * throw e;
2030
+ * });
2031
+ *
2032
+ * ```
1506
2033
  *
1507
2034
  * @param params - Parameters for request
1508
2035
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1517,6 +2044,64 @@ export declare namespace analyticsdata_v1beta {
1517
2044
  create(callback: BodyResponseCallback<Schema$Operation>): void;
1518
2045
  /**
1519
2046
  * Gets configuration metadata about a specific audience export. This method can be used to understand an audience export after it has been created. See [Creating an Audience Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Exports with examples. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
2047
+ * @example
2048
+ * ```js
2049
+ * // Before running the sample:
2050
+ * // - Enable the API at:
2051
+ * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com
2052
+ * // - Login into gcloud by running:
2053
+ * // ```sh
2054
+ * // $ gcloud auth application-default login
2055
+ * // ```
2056
+ * // - Install the npm module by running:
2057
+ * // ```sh
2058
+ * // $ npm install googleapis
2059
+ * // ```
2060
+ *
2061
+ * const {google} = require('googleapis');
2062
+ * const analyticsdata = google.analyticsdata('v1beta');
2063
+ *
2064
+ * async function main() {
2065
+ * const auth = new google.auth.GoogleAuth({
2066
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2067
+ * scopes: [
2068
+ * 'https://www.googleapis.com/auth/analytics',
2069
+ * 'https://www.googleapis.com/auth/analytics.readonly',
2070
+ * ],
2071
+ * });
2072
+ *
2073
+ * // Acquire an auth client, and bind it to all future calls
2074
+ * const authClient = await auth.getClient();
2075
+ * google.options({auth: authClient});
2076
+ *
2077
+ * // Do the magic
2078
+ * const res = await analyticsdata.properties.audienceExports.get({
2079
+ * // Required. The audience export resource name. Format: `properties/{property\}/audienceExports/{audience_export\}`
2080
+ * name: 'properties/my-propertie/audienceExports/my-audienceExport',
2081
+ * });
2082
+ * console.log(res.data);
2083
+ *
2084
+ * // Example response
2085
+ * // {
2086
+ * // "audience": "my_audience",
2087
+ * // "audienceDisplayName": "my_audienceDisplayName",
2088
+ * // "beginCreatingTime": "my_beginCreatingTime",
2089
+ * // "creationQuotaTokensCharged": 0,
2090
+ * // "dimensions": [],
2091
+ * // "errorMessage": "my_errorMessage",
2092
+ * // "name": "my_name",
2093
+ * // "percentageCompleted": {},
2094
+ * // "rowCount": 0,
2095
+ * // "state": "my_state"
2096
+ * // }
2097
+ * }
2098
+ *
2099
+ * main().catch(e => {
2100
+ * console.error(e);
2101
+ * throw e;
2102
+ * });
2103
+ *
2104
+ * ```
1520
2105
  *
1521
2106
  * @param params - Parameters for request
1522
2107
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1531,6 +2116,60 @@ export declare namespace analyticsdata_v1beta {
1531
2116
  get(callback: BodyResponseCallback<Schema$AudienceExport>): void;
1532
2117
  /**
1533
2118
  * Lists all audience exports for a property. This method can be used for you to find and reuse existing audience exports rather than creating unnecessary new audience exports. The same audience can have multiple audience exports that represent the export of users that were in an audience on different days. See [Creating an Audience Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Exports with examples. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
2119
+ * @example
2120
+ * ```js
2121
+ * // Before running the sample:
2122
+ * // - Enable the API at:
2123
+ * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com
2124
+ * // - Login into gcloud by running:
2125
+ * // ```sh
2126
+ * // $ gcloud auth application-default login
2127
+ * // ```
2128
+ * // - Install the npm module by running:
2129
+ * // ```sh
2130
+ * // $ npm install googleapis
2131
+ * // ```
2132
+ *
2133
+ * const {google} = require('googleapis');
2134
+ * const analyticsdata = google.analyticsdata('v1beta');
2135
+ *
2136
+ * async function main() {
2137
+ * const auth = new google.auth.GoogleAuth({
2138
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2139
+ * scopes: [
2140
+ * 'https://www.googleapis.com/auth/analytics',
2141
+ * 'https://www.googleapis.com/auth/analytics.readonly',
2142
+ * ],
2143
+ * });
2144
+ *
2145
+ * // Acquire an auth client, and bind it to all future calls
2146
+ * const authClient = await auth.getClient();
2147
+ * google.options({auth: authClient});
2148
+ *
2149
+ * // Do the magic
2150
+ * const res = await analyticsdata.properties.audienceExports.list({
2151
+ * // Optional. The maximum number of audience exports to return. The service may return fewer than this value. If unspecified, at most 200 audience exports will be returned. The maximum value is 1000 (higher values will be coerced to the maximum).
2152
+ * pageSize: 'placeholder-value',
2153
+ * // Optional. A page token, received from a previous `ListAudienceExports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAudienceExports` must match the call that provided the page token.
2154
+ * pageToken: 'placeholder-value',
2155
+ * // Required. All audience exports for this property will be listed in the response. Format: `properties/{property\}`
2156
+ * parent: 'properties/my-propertie',
2157
+ * });
2158
+ * console.log(res.data);
2159
+ *
2160
+ * // Example response
2161
+ * // {
2162
+ * // "audienceExports": [],
2163
+ * // "nextPageToken": "my_nextPageToken"
2164
+ * // }
2165
+ * }
2166
+ *
2167
+ * main().catch(e => {
2168
+ * console.error(e);
2169
+ * throw e;
2170
+ * });
2171
+ *
2172
+ * ```
1534
2173
  *
1535
2174
  * @param params - Parameters for request
1536
2175
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1545,6 +2184,66 @@ export declare namespace analyticsdata_v1beta {
1545
2184
  list(callback: BodyResponseCallback<Schema$ListAudienceExportsResponse>): void;
1546
2185
  /**
1547
2186
  * Retrieves an audience export of users. After creating an audience, the users are not immediately available for exporting. First, a request to `CreateAudienceExport` is necessary to create an audience export of users, and then second, this method is used to retrieve the users in the audience export. See [Creating an Audience Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Exports with examples. Audiences in Google Analytics 4 allow you to segment your users in the ways that are important to your business. To learn more, see https://support.google.com/analytics/answer/9267572. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
2187
+ * @example
2188
+ * ```js
2189
+ * // Before running the sample:
2190
+ * // - Enable the API at:
2191
+ * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com
2192
+ * // - Login into gcloud by running:
2193
+ * // ```sh
2194
+ * // $ gcloud auth application-default login
2195
+ * // ```
2196
+ * // - Install the npm module by running:
2197
+ * // ```sh
2198
+ * // $ npm install googleapis
2199
+ * // ```
2200
+ *
2201
+ * const {google} = require('googleapis');
2202
+ * const analyticsdata = google.analyticsdata('v1beta');
2203
+ *
2204
+ * async function main() {
2205
+ * const auth = new google.auth.GoogleAuth({
2206
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2207
+ * scopes: [
2208
+ * 'https://www.googleapis.com/auth/analytics',
2209
+ * 'https://www.googleapis.com/auth/analytics.readonly',
2210
+ * ],
2211
+ * });
2212
+ *
2213
+ * // Acquire an auth client, and bind it to all future calls
2214
+ * const authClient = await auth.getClient();
2215
+ * google.options({auth: authClient});
2216
+ *
2217
+ * // Do the magic
2218
+ * const res = await analyticsdata.properties.audienceExports.query({
2219
+ * // Required. The name of the audience export to retrieve users from. Format: `properties/{property\}/audienceExports/{audience_export\}`
2220
+ * name: 'properties/my-propertie/audienceExports/my-audienceExport',
2221
+ *
2222
+ * // Request body metadata
2223
+ * requestBody: {
2224
+ * // request body parameters
2225
+ * // {
2226
+ * // "limit": "my_limit",
2227
+ * // "offset": "my_offset"
2228
+ * // }
2229
+ * },
2230
+ * });
2231
+ * console.log(res.data);
2232
+ *
2233
+ * // Example response
2234
+ * // {
2235
+ * // "audienceExport": {},
2236
+ * // "audienceRows": [],
2237
+ * // "rowCount": 0
2238
+ * // }
2239
+ * }
2240
+ *
2241
+ * main().catch(e => {
2242
+ * console.error(e);
2243
+ * throw e;
2244
+ * });
2245
+ *
2246
+ * ```
1548
2247
  *
1549
2248
  * @param params - Parameters for request
1550
2249
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.