@googleapis/tagmanager 11.0.1 → 13.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/CHANGELOG.md +46 -0
- package/build/index.js +2 -2
- package/build/index.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -0
- package/build/v1.d.ts +3109 -1
- package/build/v1.js +26 -1
- package/build/v1.js.map +1 -1
- package/build/v2.d.ts +6417 -7
- package/build/v2.js +38 -1
- package/build/v2.js.map +1 -1
- package/package.json +4 -4
- package/v1.ts +3109 -0
- package/v2.ts +6417 -6
package/v1.ts
CHANGED
|
@@ -877,6 +877,59 @@ export namespace tagmanager_v1 {
|
|
|
877
877
|
|
|
878
878
|
/**
|
|
879
879
|
* Gets a GTM Account.
|
|
880
|
+
* @example
|
|
881
|
+
* ```js
|
|
882
|
+
* // Before running the sample:
|
|
883
|
+
* // - Enable the API at:
|
|
884
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
885
|
+
* // - Login into gcloud by running:
|
|
886
|
+
* // ```sh
|
|
887
|
+
* // $ gcloud auth application-default login
|
|
888
|
+
* // ```
|
|
889
|
+
* // - Install the npm module by running:
|
|
890
|
+
* // ```sh
|
|
891
|
+
* // $ npm install googleapis
|
|
892
|
+
* // ```
|
|
893
|
+
*
|
|
894
|
+
* const {google} = require('googleapis');
|
|
895
|
+
* const tagmanager = google.tagmanager('v1');
|
|
896
|
+
*
|
|
897
|
+
* async function main() {
|
|
898
|
+
* const auth = new google.auth.GoogleAuth({
|
|
899
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
900
|
+
* scopes: [
|
|
901
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
902
|
+
* 'https://www.googleapis.com/auth/tagmanager.manage.accounts',
|
|
903
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
904
|
+
* ],
|
|
905
|
+
* });
|
|
906
|
+
*
|
|
907
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
908
|
+
* const authClient = await auth.getClient();
|
|
909
|
+
* google.options({auth: authClient});
|
|
910
|
+
*
|
|
911
|
+
* // Do the magic
|
|
912
|
+
* const res = await tagmanager.accounts.get({
|
|
913
|
+
* // The GTM Account ID.
|
|
914
|
+
* accountId: 'placeholder-value',
|
|
915
|
+
* });
|
|
916
|
+
* console.log(res.data);
|
|
917
|
+
*
|
|
918
|
+
* // Example response
|
|
919
|
+
* // {
|
|
920
|
+
* // "accountId": "my_accountId",
|
|
921
|
+
* // "fingerprint": "my_fingerprint",
|
|
922
|
+
* // "name": "my_name",
|
|
923
|
+
* // "shareData": false
|
|
924
|
+
* // }
|
|
925
|
+
* }
|
|
926
|
+
*
|
|
927
|
+
* main().catch(e => {
|
|
928
|
+
* console.error(e);
|
|
929
|
+
* throw e;
|
|
930
|
+
* });
|
|
931
|
+
*
|
|
932
|
+
* ```
|
|
880
933
|
*
|
|
881
934
|
* @param params - Parameters for request
|
|
882
935
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -967,6 +1020,53 @@ export namespace tagmanager_v1 {
|
|
|
967
1020
|
|
|
968
1021
|
/**
|
|
969
1022
|
* Lists all GTM Accounts that a user has access to.
|
|
1023
|
+
* @example
|
|
1024
|
+
* ```js
|
|
1025
|
+
* // Before running the sample:
|
|
1026
|
+
* // - Enable the API at:
|
|
1027
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
1028
|
+
* // - Login into gcloud by running:
|
|
1029
|
+
* // ```sh
|
|
1030
|
+
* // $ gcloud auth application-default login
|
|
1031
|
+
* // ```
|
|
1032
|
+
* // - Install the npm module by running:
|
|
1033
|
+
* // ```sh
|
|
1034
|
+
* // $ npm install googleapis
|
|
1035
|
+
* // ```
|
|
1036
|
+
*
|
|
1037
|
+
* const {google} = require('googleapis');
|
|
1038
|
+
* const tagmanager = google.tagmanager('v1');
|
|
1039
|
+
*
|
|
1040
|
+
* async function main() {
|
|
1041
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1042
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1043
|
+
* scopes: [
|
|
1044
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
1045
|
+
* 'https://www.googleapis.com/auth/tagmanager.manage.accounts',
|
|
1046
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
1047
|
+
* ],
|
|
1048
|
+
* });
|
|
1049
|
+
*
|
|
1050
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1051
|
+
* const authClient = await auth.getClient();
|
|
1052
|
+
* google.options({auth: authClient});
|
|
1053
|
+
*
|
|
1054
|
+
* // Do the magic
|
|
1055
|
+
* const res = await tagmanager.accounts.list({});
|
|
1056
|
+
* console.log(res.data);
|
|
1057
|
+
*
|
|
1058
|
+
* // Example response
|
|
1059
|
+
* // {
|
|
1060
|
+
* // "accounts": []
|
|
1061
|
+
* // }
|
|
1062
|
+
* }
|
|
1063
|
+
*
|
|
1064
|
+
* main().catch(e => {
|
|
1065
|
+
* console.error(e);
|
|
1066
|
+
* throw e;
|
|
1067
|
+
* });
|
|
1068
|
+
*
|
|
1069
|
+
* ```
|
|
970
1070
|
*
|
|
971
1071
|
* @param params - Parameters for request
|
|
972
1072
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1059,6 +1159,68 @@ export namespace tagmanager_v1 {
|
|
|
1059
1159
|
|
|
1060
1160
|
/**
|
|
1061
1161
|
* Updates a GTM Account.
|
|
1162
|
+
* @example
|
|
1163
|
+
* ```js
|
|
1164
|
+
* // Before running the sample:
|
|
1165
|
+
* // - Enable the API at:
|
|
1166
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
1167
|
+
* // - Login into gcloud by running:
|
|
1168
|
+
* // ```sh
|
|
1169
|
+
* // $ gcloud auth application-default login
|
|
1170
|
+
* // ```
|
|
1171
|
+
* // - Install the npm module by running:
|
|
1172
|
+
* // ```sh
|
|
1173
|
+
* // $ npm install googleapis
|
|
1174
|
+
* // ```
|
|
1175
|
+
*
|
|
1176
|
+
* const {google} = require('googleapis');
|
|
1177
|
+
* const tagmanager = google.tagmanager('v1');
|
|
1178
|
+
*
|
|
1179
|
+
* async function main() {
|
|
1180
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1181
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1182
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.manage.accounts'],
|
|
1183
|
+
* });
|
|
1184
|
+
*
|
|
1185
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1186
|
+
* const authClient = await auth.getClient();
|
|
1187
|
+
* google.options({auth: authClient});
|
|
1188
|
+
*
|
|
1189
|
+
* // Do the magic
|
|
1190
|
+
* const res = await tagmanager.accounts.update({
|
|
1191
|
+
* // The GTM Account ID.
|
|
1192
|
+
* accountId: 'placeholder-value',
|
|
1193
|
+
* // When provided, this fingerprint must match the fingerprint of the account in storage.
|
|
1194
|
+
* fingerprint: 'placeholder-value',
|
|
1195
|
+
*
|
|
1196
|
+
* // Request body metadata
|
|
1197
|
+
* requestBody: {
|
|
1198
|
+
* // request body parameters
|
|
1199
|
+
* // {
|
|
1200
|
+
* // "accountId": "my_accountId",
|
|
1201
|
+
* // "fingerprint": "my_fingerprint",
|
|
1202
|
+
* // "name": "my_name",
|
|
1203
|
+
* // "shareData": false
|
|
1204
|
+
* // }
|
|
1205
|
+
* },
|
|
1206
|
+
* });
|
|
1207
|
+
* console.log(res.data);
|
|
1208
|
+
*
|
|
1209
|
+
* // Example response
|
|
1210
|
+
* // {
|
|
1211
|
+
* // "accountId": "my_accountId",
|
|
1212
|
+
* // "fingerprint": "my_fingerprint",
|
|
1213
|
+
* // "name": "my_name",
|
|
1214
|
+
* // "shareData": false
|
|
1215
|
+
* // }
|
|
1216
|
+
* }
|
|
1217
|
+
*
|
|
1218
|
+
* main().catch(e => {
|
|
1219
|
+
* console.error(e);
|
|
1220
|
+
* throw e;
|
|
1221
|
+
* });
|
|
1222
|
+
*
|
|
1223
|
+
* ```
|
|
1062
1224
|
*
|
|
1063
1225
|
* @param params - Parameters for request
|
|
1064
1226
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1200,6 +1362,80 @@ export namespace tagmanager_v1 {
|
|
|
1200
1362
|
|
|
1201
1363
|
/**
|
|
1202
1364
|
* Creates a Container.
|
|
1365
|
+
* @example
|
|
1366
|
+
* ```js
|
|
1367
|
+
* // Before running the sample:
|
|
1368
|
+
* // - Enable the API at:
|
|
1369
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
1370
|
+
* // - Login into gcloud by running:
|
|
1371
|
+
* // ```sh
|
|
1372
|
+
* // $ gcloud auth application-default login
|
|
1373
|
+
* // ```
|
|
1374
|
+
* // - Install the npm module by running:
|
|
1375
|
+
* // ```sh
|
|
1376
|
+
* // $ npm install googleapis
|
|
1377
|
+
* // ```
|
|
1378
|
+
*
|
|
1379
|
+
* const {google} = require('googleapis');
|
|
1380
|
+
* const tagmanager = google.tagmanager('v1');
|
|
1381
|
+
*
|
|
1382
|
+
* async function main() {
|
|
1383
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1384
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1385
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
1386
|
+
* });
|
|
1387
|
+
*
|
|
1388
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1389
|
+
* const authClient = await auth.getClient();
|
|
1390
|
+
* google.options({auth: authClient});
|
|
1391
|
+
*
|
|
1392
|
+
* // Do the magic
|
|
1393
|
+
* const res = await tagmanager.accounts.containers.create({
|
|
1394
|
+
* // The GTM Account ID.
|
|
1395
|
+
* accountId: 'placeholder-value',
|
|
1396
|
+
*
|
|
1397
|
+
* // Request body metadata
|
|
1398
|
+
* requestBody: {
|
|
1399
|
+
* // request body parameters
|
|
1400
|
+
* // {
|
|
1401
|
+
* // "accountId": "my_accountId",
|
|
1402
|
+
* // "containerId": "my_containerId",
|
|
1403
|
+
* // "domainName": [],
|
|
1404
|
+
* // "enabledBuiltInVariable": [],
|
|
1405
|
+
* // "fingerprint": "my_fingerprint",
|
|
1406
|
+
* // "name": "my_name",
|
|
1407
|
+
* // "notes": "my_notes",
|
|
1408
|
+
* // "publicId": "my_publicId",
|
|
1409
|
+
* // "timeZoneCountryId": "my_timeZoneCountryId",
|
|
1410
|
+
* // "timeZoneId": "my_timeZoneId",
|
|
1411
|
+
* // "usageContext": []
|
|
1412
|
+
* // }
|
|
1413
|
+
* },
|
|
1414
|
+
* });
|
|
1415
|
+
* console.log(res.data);
|
|
1416
|
+
*
|
|
1417
|
+
* // Example response
|
|
1418
|
+
* // {
|
|
1419
|
+
* // "accountId": "my_accountId",
|
|
1420
|
+
* // "containerId": "my_containerId",
|
|
1421
|
+
* // "domainName": [],
|
|
1422
|
+
* // "enabledBuiltInVariable": [],
|
|
1423
|
+
* // "fingerprint": "my_fingerprint",
|
|
1424
|
+
* // "name": "my_name",
|
|
1425
|
+
* // "notes": "my_notes",
|
|
1426
|
+
* // "publicId": "my_publicId",
|
|
1427
|
+
* // "timeZoneCountryId": "my_timeZoneCountryId",
|
|
1428
|
+
* // "timeZoneId": "my_timeZoneId",
|
|
1429
|
+
* // "usageContext": []
|
|
1430
|
+
* // }
|
|
1431
|
+
* }
|
|
1432
|
+
*
|
|
1433
|
+
* main().catch(e => {
|
|
1434
|
+
* console.error(e);
|
|
1435
|
+
* throw e;
|
|
1436
|
+
* });
|
|
1437
|
+
*
|
|
1438
|
+
* ```
|
|
1203
1439
|
*
|
|
1204
1440
|
* @param params - Parameters for request
|
|
1205
1441
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1290,6 +1526,49 @@ export namespace tagmanager_v1 {
|
|
|
1290
1526
|
|
|
1291
1527
|
/**
|
|
1292
1528
|
* Deletes a Container.
|
|
1529
|
+
* @example
|
|
1530
|
+
* ```js
|
|
1531
|
+
* // Before running the sample:
|
|
1532
|
+
* // - Enable the API at:
|
|
1533
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
1534
|
+
* // - Login into gcloud by running:
|
|
1535
|
+
* // ```sh
|
|
1536
|
+
* // $ gcloud auth application-default login
|
|
1537
|
+
* // ```
|
|
1538
|
+
* // - Install the npm module by running:
|
|
1539
|
+
* // ```sh
|
|
1540
|
+
* // $ npm install googleapis
|
|
1541
|
+
* // ```
|
|
1542
|
+
*
|
|
1543
|
+
* const {google} = require('googleapis');
|
|
1544
|
+
* const tagmanager = google.tagmanager('v1');
|
|
1545
|
+
*
|
|
1546
|
+
* async function main() {
|
|
1547
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1548
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1549
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.delete.containers'],
|
|
1550
|
+
* });
|
|
1551
|
+
*
|
|
1552
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1553
|
+
* const authClient = await auth.getClient();
|
|
1554
|
+
* google.options({auth: authClient});
|
|
1555
|
+
*
|
|
1556
|
+
* // Do the magic
|
|
1557
|
+
* const res = await tagmanager.accounts.containers.delete({
|
|
1558
|
+
* // The GTM Account ID.
|
|
1559
|
+
* accountId: 'placeholder-value',
|
|
1560
|
+
* // The GTM Container ID.
|
|
1561
|
+
* containerId: 'placeholder-value',
|
|
1562
|
+
* });
|
|
1563
|
+
* console.log(res.data);
|
|
1564
|
+
* }
|
|
1565
|
+
*
|
|
1566
|
+
* main().catch(e => {
|
|
1567
|
+
* console.error(e);
|
|
1568
|
+
* throw e;
|
|
1569
|
+
* });
|
|
1570
|
+
*
|
|
1571
|
+
* ```
|
|
1293
1572
|
*
|
|
1294
1573
|
* @param params - Parameters for request
|
|
1295
1574
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1379,6 +1658,67 @@ export namespace tagmanager_v1 {
|
|
|
1379
1658
|
|
|
1380
1659
|
/**
|
|
1381
1660
|
* Gets a Container.
|
|
1661
|
+
* @example
|
|
1662
|
+
* ```js
|
|
1663
|
+
* // Before running the sample:
|
|
1664
|
+
* // - Enable the API at:
|
|
1665
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
1666
|
+
* // - Login into gcloud by running:
|
|
1667
|
+
* // ```sh
|
|
1668
|
+
* // $ gcloud auth application-default login
|
|
1669
|
+
* // ```
|
|
1670
|
+
* // - Install the npm module by running:
|
|
1671
|
+
* // ```sh
|
|
1672
|
+
* // $ npm install googleapis
|
|
1673
|
+
* // ```
|
|
1674
|
+
*
|
|
1675
|
+
* const {google} = require('googleapis');
|
|
1676
|
+
* const tagmanager = google.tagmanager('v1');
|
|
1677
|
+
*
|
|
1678
|
+
* async function main() {
|
|
1679
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1680
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1681
|
+
* scopes: [
|
|
1682
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
1683
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
1684
|
+
* ],
|
|
1685
|
+
* });
|
|
1686
|
+
*
|
|
1687
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1688
|
+
* const authClient = await auth.getClient();
|
|
1689
|
+
* google.options({auth: authClient});
|
|
1690
|
+
*
|
|
1691
|
+
* // Do the magic
|
|
1692
|
+
* const res = await tagmanager.accounts.containers.get({
|
|
1693
|
+
* // The GTM Account ID.
|
|
1694
|
+
* accountId: 'placeholder-value',
|
|
1695
|
+
* // The GTM Container ID.
|
|
1696
|
+
* containerId: 'placeholder-value',
|
|
1697
|
+
* });
|
|
1698
|
+
* console.log(res.data);
|
|
1699
|
+
*
|
|
1700
|
+
* // Example response
|
|
1701
|
+
* // {
|
|
1702
|
+
* // "accountId": "my_accountId",
|
|
1703
|
+
* // "containerId": "my_containerId",
|
|
1704
|
+
* // "domainName": [],
|
|
1705
|
+
* // "enabledBuiltInVariable": [],
|
|
1706
|
+
* // "fingerprint": "my_fingerprint",
|
|
1707
|
+
* // "name": "my_name",
|
|
1708
|
+
* // "notes": "my_notes",
|
|
1709
|
+
* // "publicId": "my_publicId",
|
|
1710
|
+
* // "timeZoneCountryId": "my_timeZoneCountryId",
|
|
1711
|
+
* // "timeZoneId": "my_timeZoneId",
|
|
1712
|
+
* // "usageContext": []
|
|
1713
|
+
* // }
|
|
1714
|
+
* }
|
|
1715
|
+
*
|
|
1716
|
+
* main().catch(e => {
|
|
1717
|
+
* console.error(e);
|
|
1718
|
+
* throw e;
|
|
1719
|
+
* });
|
|
1720
|
+
*
|
|
1721
|
+
* ```
|
|
1382
1722
|
*
|
|
1383
1723
|
* @param params - Parameters for request
|
|
1384
1724
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1470,6 +1810,55 @@ export namespace tagmanager_v1 {
|
|
|
1470
1810
|
|
|
1471
1811
|
/**
|
|
1472
1812
|
* Lists all Containers that belongs to a GTM Account.
|
|
1813
|
+
* @example
|
|
1814
|
+
* ```js
|
|
1815
|
+
* // Before running the sample:
|
|
1816
|
+
* // - Enable the API at:
|
|
1817
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
1818
|
+
* // - Login into gcloud by running:
|
|
1819
|
+
* // ```sh
|
|
1820
|
+
* // $ gcloud auth application-default login
|
|
1821
|
+
* // ```
|
|
1822
|
+
* // - Install the npm module by running:
|
|
1823
|
+
* // ```sh
|
|
1824
|
+
* // $ npm install googleapis
|
|
1825
|
+
* // ```
|
|
1826
|
+
*
|
|
1827
|
+
* const {google} = require('googleapis');
|
|
1828
|
+
* const tagmanager = google.tagmanager('v1');
|
|
1829
|
+
*
|
|
1830
|
+
* async function main() {
|
|
1831
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1832
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1833
|
+
* scopes: [
|
|
1834
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
1835
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
1836
|
+
* ],
|
|
1837
|
+
* });
|
|
1838
|
+
*
|
|
1839
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1840
|
+
* const authClient = await auth.getClient();
|
|
1841
|
+
* google.options({auth: authClient});
|
|
1842
|
+
*
|
|
1843
|
+
* // Do the magic
|
|
1844
|
+
* const res = await tagmanager.accounts.containers.list({
|
|
1845
|
+
* // The GTM Account ID.
|
|
1846
|
+
* accountId: 'placeholder-value',
|
|
1847
|
+
* });
|
|
1848
|
+
* console.log(res.data);
|
|
1849
|
+
*
|
|
1850
|
+
* // Example response
|
|
1851
|
+
* // {
|
|
1852
|
+
* // "containers": []
|
|
1853
|
+
* // }
|
|
1854
|
+
* }
|
|
1855
|
+
*
|
|
1856
|
+
* main().catch(e => {
|
|
1857
|
+
* console.error(e);
|
|
1858
|
+
* throw e;
|
|
1859
|
+
* });
|
|
1860
|
+
*
|
|
1861
|
+
* ```
|
|
1473
1862
|
*
|
|
1474
1863
|
* @param params - Parameters for request
|
|
1475
1864
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1562,6 +1951,84 @@ export namespace tagmanager_v1 {
|
|
|
1562
1951
|
|
|
1563
1952
|
/**
|
|
1564
1953
|
* Updates a Container.
|
|
1954
|
+
* @example
|
|
1955
|
+
* ```js
|
|
1956
|
+
* // Before running the sample:
|
|
1957
|
+
* // - Enable the API at:
|
|
1958
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
1959
|
+
* // - Login into gcloud by running:
|
|
1960
|
+
* // ```sh
|
|
1961
|
+
* // $ gcloud auth application-default login
|
|
1962
|
+
* // ```
|
|
1963
|
+
* // - Install the npm module by running:
|
|
1964
|
+
* // ```sh
|
|
1965
|
+
* // $ npm install googleapis
|
|
1966
|
+
* // ```
|
|
1967
|
+
*
|
|
1968
|
+
* const {google} = require('googleapis');
|
|
1969
|
+
* const tagmanager = google.tagmanager('v1');
|
|
1970
|
+
*
|
|
1971
|
+
* async function main() {
|
|
1972
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1973
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1974
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
1975
|
+
* });
|
|
1976
|
+
*
|
|
1977
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1978
|
+
* const authClient = await auth.getClient();
|
|
1979
|
+
* google.options({auth: authClient});
|
|
1980
|
+
*
|
|
1981
|
+
* // Do the magic
|
|
1982
|
+
* const res = await tagmanager.accounts.containers.update({
|
|
1983
|
+
* // The GTM Account ID.
|
|
1984
|
+
* accountId: 'placeholder-value',
|
|
1985
|
+
* // The GTM Container ID.
|
|
1986
|
+
* containerId: 'placeholder-value',
|
|
1987
|
+
* // When provided, this fingerprint must match the fingerprint of the container in storage.
|
|
1988
|
+
* fingerprint: 'placeholder-value',
|
|
1989
|
+
*
|
|
1990
|
+
* // Request body metadata
|
|
1991
|
+
* requestBody: {
|
|
1992
|
+
* // request body parameters
|
|
1993
|
+
* // {
|
|
1994
|
+
* // "accountId": "my_accountId",
|
|
1995
|
+
* // "containerId": "my_containerId",
|
|
1996
|
+
* // "domainName": [],
|
|
1997
|
+
* // "enabledBuiltInVariable": [],
|
|
1998
|
+
* // "fingerprint": "my_fingerprint",
|
|
1999
|
+
* // "name": "my_name",
|
|
2000
|
+
* // "notes": "my_notes",
|
|
2001
|
+
* // "publicId": "my_publicId",
|
|
2002
|
+
* // "timeZoneCountryId": "my_timeZoneCountryId",
|
|
2003
|
+
* // "timeZoneId": "my_timeZoneId",
|
|
2004
|
+
* // "usageContext": []
|
|
2005
|
+
* // }
|
|
2006
|
+
* },
|
|
2007
|
+
* });
|
|
2008
|
+
* console.log(res.data);
|
|
2009
|
+
*
|
|
2010
|
+
* // Example response
|
|
2011
|
+
* // {
|
|
2012
|
+
* // "accountId": "my_accountId",
|
|
2013
|
+
* // "containerId": "my_containerId",
|
|
2014
|
+
* // "domainName": [],
|
|
2015
|
+
* // "enabledBuiltInVariable": [],
|
|
2016
|
+
* // "fingerprint": "my_fingerprint",
|
|
2017
|
+
* // "name": "my_name",
|
|
2018
|
+
* // "notes": "my_notes",
|
|
2019
|
+
* // "publicId": "my_publicId",
|
|
2020
|
+
* // "timeZoneCountryId": "my_timeZoneCountryId",
|
|
2021
|
+
* // "timeZoneId": "my_timeZoneId",
|
|
2022
|
+
* // "usageContext": []
|
|
2023
|
+
* // }
|
|
2024
|
+
* }
|
|
2025
|
+
*
|
|
2026
|
+
* main().catch(e => {
|
|
2027
|
+
* console.error(e);
|
|
2028
|
+
* throw e;
|
|
2029
|
+
* });
|
|
2030
|
+
*
|
|
2031
|
+
* ```
|
|
1565
2032
|
*
|
|
1566
2033
|
* @param params - Parameters for request
|
|
1567
2034
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1722,6 +2189,84 @@ export namespace tagmanager_v1 {
|
|
|
1722
2189
|
|
|
1723
2190
|
/**
|
|
1724
2191
|
* Creates a GTM Environment.
|
|
2192
|
+
* @example
|
|
2193
|
+
* ```js
|
|
2194
|
+
* // Before running the sample:
|
|
2195
|
+
* // - Enable the API at:
|
|
2196
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
2197
|
+
* // - Login into gcloud by running:
|
|
2198
|
+
* // ```sh
|
|
2199
|
+
* // $ gcloud auth application-default login
|
|
2200
|
+
* // ```
|
|
2201
|
+
* // - Install the npm module by running:
|
|
2202
|
+
* // ```sh
|
|
2203
|
+
* // $ npm install googleapis
|
|
2204
|
+
* // ```
|
|
2205
|
+
*
|
|
2206
|
+
* const {google} = require('googleapis');
|
|
2207
|
+
* const tagmanager = google.tagmanager('v1');
|
|
2208
|
+
*
|
|
2209
|
+
* async function main() {
|
|
2210
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2211
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2212
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
2213
|
+
* });
|
|
2214
|
+
*
|
|
2215
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2216
|
+
* const authClient = await auth.getClient();
|
|
2217
|
+
* google.options({auth: authClient});
|
|
2218
|
+
*
|
|
2219
|
+
* // Do the magic
|
|
2220
|
+
* const res = await tagmanager.accounts.containers.environments.create({
|
|
2221
|
+
* // The GTM Account ID.
|
|
2222
|
+
* accountId: 'placeholder-value',
|
|
2223
|
+
* // The GTM Container ID.
|
|
2224
|
+
* containerId: 'placeholder-value',
|
|
2225
|
+
*
|
|
2226
|
+
* // Request body metadata
|
|
2227
|
+
* requestBody: {
|
|
2228
|
+
* // request body parameters
|
|
2229
|
+
* // {
|
|
2230
|
+
* // "accountId": "my_accountId",
|
|
2231
|
+
* // "authorizationCode": "my_authorizationCode",
|
|
2232
|
+
* // "authorizationTimestampMs": "my_authorizationTimestampMs",
|
|
2233
|
+
* // "containerId": "my_containerId",
|
|
2234
|
+
* // "containerVersionId": "my_containerVersionId",
|
|
2235
|
+
* // "description": "my_description",
|
|
2236
|
+
* // "enableDebug": false,
|
|
2237
|
+
* // "environmentId": "my_environmentId",
|
|
2238
|
+
* // "fingerprint": "my_fingerprint",
|
|
2239
|
+
* // "name": "my_name",
|
|
2240
|
+
* // "type": "my_type",
|
|
2241
|
+
* // "url": "my_url"
|
|
2242
|
+
* // }
|
|
2243
|
+
* },
|
|
2244
|
+
* });
|
|
2245
|
+
* console.log(res.data);
|
|
2246
|
+
*
|
|
2247
|
+
* // Example response
|
|
2248
|
+
* // {
|
|
2249
|
+
* // "accountId": "my_accountId",
|
|
2250
|
+
* // "authorizationCode": "my_authorizationCode",
|
|
2251
|
+
* // "authorizationTimestampMs": "my_authorizationTimestampMs",
|
|
2252
|
+
* // "containerId": "my_containerId",
|
|
2253
|
+
* // "containerVersionId": "my_containerVersionId",
|
|
2254
|
+
* // "description": "my_description",
|
|
2255
|
+
* // "enableDebug": false,
|
|
2256
|
+
* // "environmentId": "my_environmentId",
|
|
2257
|
+
* // "fingerprint": "my_fingerprint",
|
|
2258
|
+
* // "name": "my_name",
|
|
2259
|
+
* // "type": "my_type",
|
|
2260
|
+
* // "url": "my_url"
|
|
2261
|
+
* // }
|
|
2262
|
+
* }
|
|
2263
|
+
*
|
|
2264
|
+
* main().catch(e => {
|
|
2265
|
+
* console.error(e);
|
|
2266
|
+
* throw e;
|
|
2267
|
+
* });
|
|
2268
|
+
*
|
|
2269
|
+
* ```
|
|
1725
2270
|
*
|
|
1726
2271
|
* @param params - Parameters for request
|
|
1727
2272
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1813,6 +2358,51 @@ export namespace tagmanager_v1 {
|
|
|
1813
2358
|
|
|
1814
2359
|
/**
|
|
1815
2360
|
* Deletes a GTM Environment.
|
|
2361
|
+
* @example
|
|
2362
|
+
* ```js
|
|
2363
|
+
* // Before running the sample:
|
|
2364
|
+
* // - Enable the API at:
|
|
2365
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
2366
|
+
* // - Login into gcloud by running:
|
|
2367
|
+
* // ```sh
|
|
2368
|
+
* // $ gcloud auth application-default login
|
|
2369
|
+
* // ```
|
|
2370
|
+
* // - Install the npm module by running:
|
|
2371
|
+
* // ```sh
|
|
2372
|
+
* // $ npm install googleapis
|
|
2373
|
+
* // ```
|
|
2374
|
+
*
|
|
2375
|
+
* const {google} = require('googleapis');
|
|
2376
|
+
* const tagmanager = google.tagmanager('v1');
|
|
2377
|
+
*
|
|
2378
|
+
* async function main() {
|
|
2379
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2380
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2381
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
2382
|
+
* });
|
|
2383
|
+
*
|
|
2384
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2385
|
+
* const authClient = await auth.getClient();
|
|
2386
|
+
* google.options({auth: authClient});
|
|
2387
|
+
*
|
|
2388
|
+
* // Do the magic
|
|
2389
|
+
* const res = await tagmanager.accounts.containers.environments.delete({
|
|
2390
|
+
* // The GTM Account ID.
|
|
2391
|
+
* accountId: 'placeholder-value',
|
|
2392
|
+
* // The GTM Container ID.
|
|
2393
|
+
* containerId: 'placeholder-value',
|
|
2394
|
+
* // The GTM Environment ID.
|
|
2395
|
+
* environmentId: 'placeholder-value',
|
|
2396
|
+
* });
|
|
2397
|
+
* console.log(res.data);
|
|
2398
|
+
* }
|
|
2399
|
+
*
|
|
2400
|
+
* main().catch(e => {
|
|
2401
|
+
* console.error(e);
|
|
2402
|
+
* throw e;
|
|
2403
|
+
* });
|
|
2404
|
+
*
|
|
2405
|
+
* ```
|
|
1816
2406
|
*
|
|
1817
2407
|
* @param params - Parameters for request
|
|
1818
2408
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1902,6 +2492,70 @@ export namespace tagmanager_v1 {
|
|
|
1902
2492
|
|
|
1903
2493
|
/**
|
|
1904
2494
|
* Gets a GTM Environment.
|
|
2495
|
+
* @example
|
|
2496
|
+
* ```js
|
|
2497
|
+
* // Before running the sample:
|
|
2498
|
+
* // - Enable the API at:
|
|
2499
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
2500
|
+
* // - Login into gcloud by running:
|
|
2501
|
+
* // ```sh
|
|
2502
|
+
* // $ gcloud auth application-default login
|
|
2503
|
+
* // ```
|
|
2504
|
+
* // - Install the npm module by running:
|
|
2505
|
+
* // ```sh
|
|
2506
|
+
* // $ npm install googleapis
|
|
2507
|
+
* // ```
|
|
2508
|
+
*
|
|
2509
|
+
* const {google} = require('googleapis');
|
|
2510
|
+
* const tagmanager = google.tagmanager('v1');
|
|
2511
|
+
*
|
|
2512
|
+
* async function main() {
|
|
2513
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2514
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2515
|
+
* scopes: [
|
|
2516
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
2517
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
2518
|
+
* ],
|
|
2519
|
+
* });
|
|
2520
|
+
*
|
|
2521
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2522
|
+
* const authClient = await auth.getClient();
|
|
2523
|
+
* google.options({auth: authClient});
|
|
2524
|
+
*
|
|
2525
|
+
* // Do the magic
|
|
2526
|
+
* const res = await tagmanager.accounts.containers.environments.get({
|
|
2527
|
+
* // The GTM Account ID.
|
|
2528
|
+
* accountId: 'placeholder-value',
|
|
2529
|
+
* // The GTM Container ID.
|
|
2530
|
+
* containerId: 'placeholder-value',
|
|
2531
|
+
* // The GTM Environment ID.
|
|
2532
|
+
* environmentId: 'placeholder-value',
|
|
2533
|
+
* });
|
|
2534
|
+
* console.log(res.data);
|
|
2535
|
+
*
|
|
2536
|
+
* // Example response
|
|
2537
|
+
* // {
|
|
2538
|
+
* // "accountId": "my_accountId",
|
|
2539
|
+
* // "authorizationCode": "my_authorizationCode",
|
|
2540
|
+
* // "authorizationTimestampMs": "my_authorizationTimestampMs",
|
|
2541
|
+
* // "containerId": "my_containerId",
|
|
2542
|
+
* // "containerVersionId": "my_containerVersionId",
|
|
2543
|
+
* // "description": "my_description",
|
|
2544
|
+
* // "enableDebug": false,
|
|
2545
|
+
* // "environmentId": "my_environmentId",
|
|
2546
|
+
* // "fingerprint": "my_fingerprint",
|
|
2547
|
+
* // "name": "my_name",
|
|
2548
|
+
* // "type": "my_type",
|
|
2549
|
+
* // "url": "my_url"
|
|
2550
|
+
* // }
|
|
2551
|
+
* }
|
|
2552
|
+
*
|
|
2553
|
+
* main().catch(e => {
|
|
2554
|
+
* console.error(e);
|
|
2555
|
+
* throw e;
|
|
2556
|
+
* });
|
|
2557
|
+
*
|
|
2558
|
+
* ```
|
|
1905
2559
|
*
|
|
1906
2560
|
* @param params - Parameters for request
|
|
1907
2561
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1993,6 +2647,57 @@ export namespace tagmanager_v1 {
|
|
|
1993
2647
|
|
|
1994
2648
|
/**
|
|
1995
2649
|
* Lists all GTM Environments of a GTM Container.
|
|
2650
|
+
* @example
|
|
2651
|
+
* ```js
|
|
2652
|
+
* // Before running the sample:
|
|
2653
|
+
* // - Enable the API at:
|
|
2654
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
2655
|
+
* // - Login into gcloud by running:
|
|
2656
|
+
* // ```sh
|
|
2657
|
+
* // $ gcloud auth application-default login
|
|
2658
|
+
* // ```
|
|
2659
|
+
* // - Install the npm module by running:
|
|
2660
|
+
* // ```sh
|
|
2661
|
+
* // $ npm install googleapis
|
|
2662
|
+
* // ```
|
|
2663
|
+
*
|
|
2664
|
+
* const {google} = require('googleapis');
|
|
2665
|
+
* const tagmanager = google.tagmanager('v1');
|
|
2666
|
+
*
|
|
2667
|
+
* async function main() {
|
|
2668
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2669
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2670
|
+
* scopes: [
|
|
2671
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
2672
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
2673
|
+
* ],
|
|
2674
|
+
* });
|
|
2675
|
+
*
|
|
2676
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2677
|
+
* const authClient = await auth.getClient();
|
|
2678
|
+
* google.options({auth: authClient});
|
|
2679
|
+
*
|
|
2680
|
+
* // Do the magic
|
|
2681
|
+
* const res = await tagmanager.accounts.containers.environments.list({
|
|
2682
|
+
* // The GTM Account ID.
|
|
2683
|
+
* accountId: 'placeholder-value',
|
|
2684
|
+
* // The GTM Container ID.
|
|
2685
|
+
* containerId: 'placeholder-value',
|
|
2686
|
+
* });
|
|
2687
|
+
* console.log(res.data);
|
|
2688
|
+
*
|
|
2689
|
+
* // Example response
|
|
2690
|
+
* // {
|
|
2691
|
+
* // "environments": []
|
|
2692
|
+
* // }
|
|
2693
|
+
* }
|
|
2694
|
+
*
|
|
2695
|
+
* main().catch(e => {
|
|
2696
|
+
* console.error(e);
|
|
2697
|
+
* throw e;
|
|
2698
|
+
* });
|
|
2699
|
+
*
|
|
2700
|
+
* ```
|
|
1996
2701
|
*
|
|
1997
2702
|
* @param params - Parameters for request
|
|
1998
2703
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2086,6 +2791,88 @@ export namespace tagmanager_v1 {
|
|
|
2086
2791
|
|
|
2087
2792
|
/**
|
|
2088
2793
|
* Updates a GTM Environment.
|
|
2794
|
+
* @example
|
|
2795
|
+
* ```js
|
|
2796
|
+
* // Before running the sample:
|
|
2797
|
+
* // - Enable the API at:
|
|
2798
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
2799
|
+
* // - Login into gcloud by running:
|
|
2800
|
+
* // ```sh
|
|
2801
|
+
* // $ gcloud auth application-default login
|
|
2802
|
+
* // ```
|
|
2803
|
+
* // - Install the npm module by running:
|
|
2804
|
+
* // ```sh
|
|
2805
|
+
* // $ npm install googleapis
|
|
2806
|
+
* // ```
|
|
2807
|
+
*
|
|
2808
|
+
* const {google} = require('googleapis');
|
|
2809
|
+
* const tagmanager = google.tagmanager('v1');
|
|
2810
|
+
*
|
|
2811
|
+
* async function main() {
|
|
2812
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2813
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2814
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
2815
|
+
* });
|
|
2816
|
+
*
|
|
2817
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2818
|
+
* const authClient = await auth.getClient();
|
|
2819
|
+
* google.options({auth: authClient});
|
|
2820
|
+
*
|
|
2821
|
+
* // Do the magic
|
|
2822
|
+
* const res = await tagmanager.accounts.containers.environments.update({
|
|
2823
|
+
* // The GTM Account ID.
|
|
2824
|
+
* accountId: 'placeholder-value',
|
|
2825
|
+
* // The GTM Container ID.
|
|
2826
|
+
* containerId: 'placeholder-value',
|
|
2827
|
+
* // The GTM Environment ID.
|
|
2828
|
+
* environmentId: 'placeholder-value',
|
|
2829
|
+
* // When provided, this fingerprint must match the fingerprint of the environment in storage.
|
|
2830
|
+
* fingerprint: 'placeholder-value',
|
|
2831
|
+
*
|
|
2832
|
+
* // Request body metadata
|
|
2833
|
+
* requestBody: {
|
|
2834
|
+
* // request body parameters
|
|
2835
|
+
* // {
|
|
2836
|
+
* // "accountId": "my_accountId",
|
|
2837
|
+
* // "authorizationCode": "my_authorizationCode",
|
|
2838
|
+
* // "authorizationTimestampMs": "my_authorizationTimestampMs",
|
|
2839
|
+
* // "containerId": "my_containerId",
|
|
2840
|
+
* // "containerVersionId": "my_containerVersionId",
|
|
2841
|
+
* // "description": "my_description",
|
|
2842
|
+
* // "enableDebug": false,
|
|
2843
|
+
* // "environmentId": "my_environmentId",
|
|
2844
|
+
* // "fingerprint": "my_fingerprint",
|
|
2845
|
+
* // "name": "my_name",
|
|
2846
|
+
* // "type": "my_type",
|
|
2847
|
+
* // "url": "my_url"
|
|
2848
|
+
* // }
|
|
2849
|
+
* },
|
|
2850
|
+
* });
|
|
2851
|
+
* console.log(res.data);
|
|
2852
|
+
*
|
|
2853
|
+
* // Example response
|
|
2854
|
+
* // {
|
|
2855
|
+
* // "accountId": "my_accountId",
|
|
2856
|
+
* // "authorizationCode": "my_authorizationCode",
|
|
2857
|
+
* // "authorizationTimestampMs": "my_authorizationTimestampMs",
|
|
2858
|
+
* // "containerId": "my_containerId",
|
|
2859
|
+
* // "containerVersionId": "my_containerVersionId",
|
|
2860
|
+
* // "description": "my_description",
|
|
2861
|
+
* // "enableDebug": false,
|
|
2862
|
+
* // "environmentId": "my_environmentId",
|
|
2863
|
+
* // "fingerprint": "my_fingerprint",
|
|
2864
|
+
* // "name": "my_name",
|
|
2865
|
+
* // "type": "my_type",
|
|
2866
|
+
* // "url": "my_url"
|
|
2867
|
+
* // }
|
|
2868
|
+
* }
|
|
2869
|
+
*
|
|
2870
|
+
* main().catch(e => {
|
|
2871
|
+
* console.error(e);
|
|
2872
|
+
* throw e;
|
|
2873
|
+
* });
|
|
2874
|
+
*
|
|
2875
|
+
* ```
|
|
2089
2876
|
*
|
|
2090
2877
|
* @param params - Parameters for request
|
|
2091
2878
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2270,6 +3057,70 @@ export namespace tagmanager_v1 {
|
|
|
2270
3057
|
|
|
2271
3058
|
/**
|
|
2272
3059
|
* Creates a GTM Folder.
|
|
3060
|
+
* @example
|
|
3061
|
+
* ```js
|
|
3062
|
+
* // Before running the sample:
|
|
3063
|
+
* // - Enable the API at:
|
|
3064
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
3065
|
+
* // - Login into gcloud by running:
|
|
3066
|
+
* // ```sh
|
|
3067
|
+
* // $ gcloud auth application-default login
|
|
3068
|
+
* // ```
|
|
3069
|
+
* // - Install the npm module by running:
|
|
3070
|
+
* // ```sh
|
|
3071
|
+
* // $ npm install googleapis
|
|
3072
|
+
* // ```
|
|
3073
|
+
*
|
|
3074
|
+
* const {google} = require('googleapis');
|
|
3075
|
+
* const tagmanager = google.tagmanager('v1');
|
|
3076
|
+
*
|
|
3077
|
+
* async function main() {
|
|
3078
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3079
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3080
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
3081
|
+
* });
|
|
3082
|
+
*
|
|
3083
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3084
|
+
* const authClient = await auth.getClient();
|
|
3085
|
+
* google.options({auth: authClient});
|
|
3086
|
+
*
|
|
3087
|
+
* // Do the magic
|
|
3088
|
+
* const res = await tagmanager.accounts.containers.folders.create({
|
|
3089
|
+
* // The GTM Account ID.
|
|
3090
|
+
* accountId: 'placeholder-value',
|
|
3091
|
+
* // The GTM Container ID.
|
|
3092
|
+
* containerId: 'placeholder-value',
|
|
3093
|
+
*
|
|
3094
|
+
* // Request body metadata
|
|
3095
|
+
* requestBody: {
|
|
3096
|
+
* // request body parameters
|
|
3097
|
+
* // {
|
|
3098
|
+
* // "accountId": "my_accountId",
|
|
3099
|
+
* // "containerId": "my_containerId",
|
|
3100
|
+
* // "fingerprint": "my_fingerprint",
|
|
3101
|
+
* // "folderId": "my_folderId",
|
|
3102
|
+
* // "name": "my_name"
|
|
3103
|
+
* // }
|
|
3104
|
+
* },
|
|
3105
|
+
* });
|
|
3106
|
+
* console.log(res.data);
|
|
3107
|
+
*
|
|
3108
|
+
* // Example response
|
|
3109
|
+
* // {
|
|
3110
|
+
* // "accountId": "my_accountId",
|
|
3111
|
+
* // "containerId": "my_containerId",
|
|
3112
|
+
* // "fingerprint": "my_fingerprint",
|
|
3113
|
+
* // "folderId": "my_folderId",
|
|
3114
|
+
* // "name": "my_name"
|
|
3115
|
+
* // }
|
|
3116
|
+
* }
|
|
3117
|
+
*
|
|
3118
|
+
* main().catch(e => {
|
|
3119
|
+
* console.error(e);
|
|
3120
|
+
* throw e;
|
|
3121
|
+
* });
|
|
3122
|
+
*
|
|
3123
|
+
* ```
|
|
2273
3124
|
*
|
|
2274
3125
|
* @param params - Parameters for request
|
|
2275
3126
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2361,6 +3212,51 @@ export namespace tagmanager_v1 {
|
|
|
2361
3212
|
|
|
2362
3213
|
/**
|
|
2363
3214
|
* Deletes a GTM Folder.
|
|
3215
|
+
* @example
|
|
3216
|
+
* ```js
|
|
3217
|
+
* // Before running the sample:
|
|
3218
|
+
* // - Enable the API at:
|
|
3219
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
3220
|
+
* // - Login into gcloud by running:
|
|
3221
|
+
* // ```sh
|
|
3222
|
+
* // $ gcloud auth application-default login
|
|
3223
|
+
* // ```
|
|
3224
|
+
* // - Install the npm module by running:
|
|
3225
|
+
* // ```sh
|
|
3226
|
+
* // $ npm install googleapis
|
|
3227
|
+
* // ```
|
|
3228
|
+
*
|
|
3229
|
+
* const {google} = require('googleapis');
|
|
3230
|
+
* const tagmanager = google.tagmanager('v1');
|
|
3231
|
+
*
|
|
3232
|
+
* async function main() {
|
|
3233
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3234
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3235
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
3236
|
+
* });
|
|
3237
|
+
*
|
|
3238
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3239
|
+
* const authClient = await auth.getClient();
|
|
3240
|
+
* google.options({auth: authClient});
|
|
3241
|
+
*
|
|
3242
|
+
* // Do the magic
|
|
3243
|
+
* const res = await tagmanager.accounts.containers.folders.delete({
|
|
3244
|
+
* // The GTM Account ID.
|
|
3245
|
+
* accountId: 'placeholder-value',
|
|
3246
|
+
* // The GTM Container ID.
|
|
3247
|
+
* containerId: 'placeholder-value',
|
|
3248
|
+
* // The GTM Folder ID.
|
|
3249
|
+
* folderId: 'placeholder-value',
|
|
3250
|
+
* });
|
|
3251
|
+
* console.log(res.data);
|
|
3252
|
+
* }
|
|
3253
|
+
*
|
|
3254
|
+
* main().catch(e => {
|
|
3255
|
+
* console.error(e);
|
|
3256
|
+
* throw e;
|
|
3257
|
+
* });
|
|
3258
|
+
*
|
|
3259
|
+
* ```
|
|
2364
3260
|
*
|
|
2365
3261
|
* @param params - Parameters for request
|
|
2366
3262
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2450,6 +3346,63 @@ export namespace tagmanager_v1 {
|
|
|
2450
3346
|
|
|
2451
3347
|
/**
|
|
2452
3348
|
* Gets a GTM Folder.
|
|
3349
|
+
* @example
|
|
3350
|
+
* ```js
|
|
3351
|
+
* // Before running the sample:
|
|
3352
|
+
* // - Enable the API at:
|
|
3353
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
3354
|
+
* // - Login into gcloud by running:
|
|
3355
|
+
* // ```sh
|
|
3356
|
+
* // $ gcloud auth application-default login
|
|
3357
|
+
* // ```
|
|
3358
|
+
* // - Install the npm module by running:
|
|
3359
|
+
* // ```sh
|
|
3360
|
+
* // $ npm install googleapis
|
|
3361
|
+
* // ```
|
|
3362
|
+
*
|
|
3363
|
+
* const {google} = require('googleapis');
|
|
3364
|
+
* const tagmanager = google.tagmanager('v1');
|
|
3365
|
+
*
|
|
3366
|
+
* async function main() {
|
|
3367
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3368
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3369
|
+
* scopes: [
|
|
3370
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
3371
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
3372
|
+
* ],
|
|
3373
|
+
* });
|
|
3374
|
+
*
|
|
3375
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3376
|
+
* const authClient = await auth.getClient();
|
|
3377
|
+
* google.options({auth: authClient});
|
|
3378
|
+
*
|
|
3379
|
+
* // Do the magic
|
|
3380
|
+
* const res = await tagmanager.accounts.containers.folders.get({
|
|
3381
|
+
* // The GTM Account ID.
|
|
3382
|
+
* accountId: 'placeholder-value',
|
|
3383
|
+
* // The GTM Container ID.
|
|
3384
|
+
* containerId: 'placeholder-value',
|
|
3385
|
+
* // The GTM Folder ID.
|
|
3386
|
+
* folderId: 'placeholder-value',
|
|
3387
|
+
* });
|
|
3388
|
+
* console.log(res.data);
|
|
3389
|
+
*
|
|
3390
|
+
* // Example response
|
|
3391
|
+
* // {
|
|
3392
|
+
* // "accountId": "my_accountId",
|
|
3393
|
+
* // "containerId": "my_containerId",
|
|
3394
|
+
* // "fingerprint": "my_fingerprint",
|
|
3395
|
+
* // "folderId": "my_folderId",
|
|
3396
|
+
* // "name": "my_name"
|
|
3397
|
+
* // }
|
|
3398
|
+
* }
|
|
3399
|
+
*
|
|
3400
|
+
* main().catch(e => {
|
|
3401
|
+
* console.error(e);
|
|
3402
|
+
* throw e;
|
|
3403
|
+
* });
|
|
3404
|
+
*
|
|
3405
|
+
* ```
|
|
2453
3406
|
*
|
|
2454
3407
|
* @param params - Parameters for request
|
|
2455
3408
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2541,6 +3494,57 @@ export namespace tagmanager_v1 {
|
|
|
2541
3494
|
|
|
2542
3495
|
/**
|
|
2543
3496
|
* Lists all GTM Folders of a Container.
|
|
3497
|
+
* @example
|
|
3498
|
+
* ```js
|
|
3499
|
+
* // Before running the sample:
|
|
3500
|
+
* // - Enable the API at:
|
|
3501
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
3502
|
+
* // - Login into gcloud by running:
|
|
3503
|
+
* // ```sh
|
|
3504
|
+
* // $ gcloud auth application-default login
|
|
3505
|
+
* // ```
|
|
3506
|
+
* // - Install the npm module by running:
|
|
3507
|
+
* // ```sh
|
|
3508
|
+
* // $ npm install googleapis
|
|
3509
|
+
* // ```
|
|
3510
|
+
*
|
|
3511
|
+
* const {google} = require('googleapis');
|
|
3512
|
+
* const tagmanager = google.tagmanager('v1');
|
|
3513
|
+
*
|
|
3514
|
+
* async function main() {
|
|
3515
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3516
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3517
|
+
* scopes: [
|
|
3518
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
3519
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
3520
|
+
* ],
|
|
3521
|
+
* });
|
|
3522
|
+
*
|
|
3523
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3524
|
+
* const authClient = await auth.getClient();
|
|
3525
|
+
* google.options({auth: authClient});
|
|
3526
|
+
*
|
|
3527
|
+
* // Do the magic
|
|
3528
|
+
* const res = await tagmanager.accounts.containers.folders.list({
|
|
3529
|
+
* // The GTM Account ID.
|
|
3530
|
+
* accountId: 'placeholder-value',
|
|
3531
|
+
* // The GTM Container ID.
|
|
3532
|
+
* containerId: 'placeholder-value',
|
|
3533
|
+
* });
|
|
3534
|
+
* console.log(res.data);
|
|
3535
|
+
*
|
|
3536
|
+
* // Example response
|
|
3537
|
+
* // {
|
|
3538
|
+
* // "folders": []
|
|
3539
|
+
* // }
|
|
3540
|
+
* }
|
|
3541
|
+
*
|
|
3542
|
+
* main().catch(e => {
|
|
3543
|
+
* console.error(e);
|
|
3544
|
+
* throw e;
|
|
3545
|
+
* });
|
|
3546
|
+
*
|
|
3547
|
+
* ```
|
|
2544
3548
|
*
|
|
2545
3549
|
* @param params - Parameters for request
|
|
2546
3550
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2632,6 +3636,74 @@ export namespace tagmanager_v1 {
|
|
|
2632
3636
|
|
|
2633
3637
|
/**
|
|
2634
3638
|
* Updates a GTM Folder.
|
|
3639
|
+
* @example
|
|
3640
|
+
* ```js
|
|
3641
|
+
* // Before running the sample:
|
|
3642
|
+
* // - Enable the API at:
|
|
3643
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
3644
|
+
* // - Login into gcloud by running:
|
|
3645
|
+
* // ```sh
|
|
3646
|
+
* // $ gcloud auth application-default login
|
|
3647
|
+
* // ```
|
|
3648
|
+
* // - Install the npm module by running:
|
|
3649
|
+
* // ```sh
|
|
3650
|
+
* // $ npm install googleapis
|
|
3651
|
+
* // ```
|
|
3652
|
+
*
|
|
3653
|
+
* const {google} = require('googleapis');
|
|
3654
|
+
* const tagmanager = google.tagmanager('v1');
|
|
3655
|
+
*
|
|
3656
|
+
* async function main() {
|
|
3657
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3658
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3659
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
3660
|
+
* });
|
|
3661
|
+
*
|
|
3662
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3663
|
+
* const authClient = await auth.getClient();
|
|
3664
|
+
* google.options({auth: authClient});
|
|
3665
|
+
*
|
|
3666
|
+
* // Do the magic
|
|
3667
|
+
* const res = await tagmanager.accounts.containers.folders.update({
|
|
3668
|
+
* // The GTM Account ID.
|
|
3669
|
+
* accountId: 'placeholder-value',
|
|
3670
|
+
* // The GTM Container ID.
|
|
3671
|
+
* containerId: 'placeholder-value',
|
|
3672
|
+
* // When provided, this fingerprint must match the fingerprint of the folder in storage.
|
|
3673
|
+
* fingerprint: 'placeholder-value',
|
|
3674
|
+
* // The GTM Folder ID.
|
|
3675
|
+
* folderId: 'placeholder-value',
|
|
3676
|
+
*
|
|
3677
|
+
* // Request body metadata
|
|
3678
|
+
* requestBody: {
|
|
3679
|
+
* // request body parameters
|
|
3680
|
+
* // {
|
|
3681
|
+
* // "accountId": "my_accountId",
|
|
3682
|
+
* // "containerId": "my_containerId",
|
|
3683
|
+
* // "fingerprint": "my_fingerprint",
|
|
3684
|
+
* // "folderId": "my_folderId",
|
|
3685
|
+
* // "name": "my_name"
|
|
3686
|
+
* // }
|
|
3687
|
+
* },
|
|
3688
|
+
* });
|
|
3689
|
+
* console.log(res.data);
|
|
3690
|
+
*
|
|
3691
|
+
* // Example response
|
|
3692
|
+
* // {
|
|
3693
|
+
* // "accountId": "my_accountId",
|
|
3694
|
+
* // "containerId": "my_containerId",
|
|
3695
|
+
* // "fingerprint": "my_fingerprint",
|
|
3696
|
+
* // "folderId": "my_folderId",
|
|
3697
|
+
* // "name": "my_name"
|
|
3698
|
+
* // }
|
|
3699
|
+
* }
|
|
3700
|
+
*
|
|
3701
|
+
* main().catch(e => {
|
|
3702
|
+
* console.error(e);
|
|
3703
|
+
* throw e;
|
|
3704
|
+
* });
|
|
3705
|
+
*
|
|
3706
|
+
* ```
|
|
2635
3707
|
*
|
|
2636
3708
|
* @param params - Parameters for request
|
|
2637
3709
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2812,6 +3884,61 @@ export namespace tagmanager_v1 {
|
|
|
2812
3884
|
|
|
2813
3885
|
/**
|
|
2814
3886
|
* List all entities in a GTM Folder.
|
|
3887
|
+
* @example
|
|
3888
|
+
* ```js
|
|
3889
|
+
* // Before running the sample:
|
|
3890
|
+
* // - Enable the API at:
|
|
3891
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
3892
|
+
* // - Login into gcloud by running:
|
|
3893
|
+
* // ```sh
|
|
3894
|
+
* // $ gcloud auth application-default login
|
|
3895
|
+
* // ```
|
|
3896
|
+
* // - Install the npm module by running:
|
|
3897
|
+
* // ```sh
|
|
3898
|
+
* // $ npm install googleapis
|
|
3899
|
+
* // ```
|
|
3900
|
+
*
|
|
3901
|
+
* const {google} = require('googleapis');
|
|
3902
|
+
* const tagmanager = google.tagmanager('v1');
|
|
3903
|
+
*
|
|
3904
|
+
* async function main() {
|
|
3905
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3906
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3907
|
+
* scopes: [
|
|
3908
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
3909
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
3910
|
+
* ],
|
|
3911
|
+
* });
|
|
3912
|
+
*
|
|
3913
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3914
|
+
* const authClient = await auth.getClient();
|
|
3915
|
+
* google.options({auth: authClient});
|
|
3916
|
+
*
|
|
3917
|
+
* // Do the magic
|
|
3918
|
+
* const res = await tagmanager.accounts.containers.folders.entities.list({
|
|
3919
|
+
* // The GTM Account ID.
|
|
3920
|
+
* accountId: 'placeholder-value',
|
|
3921
|
+
* // The GTM Container ID.
|
|
3922
|
+
* containerId: 'placeholder-value',
|
|
3923
|
+
* // The GTM Folder ID.
|
|
3924
|
+
* folderId: 'placeholder-value',
|
|
3925
|
+
* });
|
|
3926
|
+
* console.log(res.data);
|
|
3927
|
+
*
|
|
3928
|
+
* // Example response
|
|
3929
|
+
* // {
|
|
3930
|
+
* // "tag": [],
|
|
3931
|
+
* // "trigger": [],
|
|
3932
|
+
* // "variable": []
|
|
3933
|
+
* // }
|
|
3934
|
+
* }
|
|
3935
|
+
*
|
|
3936
|
+
* main().catch(e => {
|
|
3937
|
+
* console.error(e);
|
|
3938
|
+
* throw e;
|
|
3939
|
+
* });
|
|
3940
|
+
*
|
|
3941
|
+
* ```
|
|
2815
3942
|
*
|
|
2816
3943
|
* @param params - Parameters for request
|
|
2817
3944
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2927,6 +4054,69 @@ export namespace tagmanager_v1 {
|
|
|
2927
4054
|
|
|
2928
4055
|
/**
|
|
2929
4056
|
* Moves entities to a GTM Folder.
|
|
4057
|
+
* @example
|
|
4058
|
+
* ```js
|
|
4059
|
+
* // Before running the sample:
|
|
4060
|
+
* // - Enable the API at:
|
|
4061
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
4062
|
+
* // - Login into gcloud by running:
|
|
4063
|
+
* // ```sh
|
|
4064
|
+
* // $ gcloud auth application-default login
|
|
4065
|
+
* // ```
|
|
4066
|
+
* // - Install the npm module by running:
|
|
4067
|
+
* // ```sh
|
|
4068
|
+
* // $ npm install googleapis
|
|
4069
|
+
* // ```
|
|
4070
|
+
*
|
|
4071
|
+
* const {google} = require('googleapis');
|
|
4072
|
+
* const tagmanager = google.tagmanager('v1');
|
|
4073
|
+
*
|
|
4074
|
+
* async function main() {
|
|
4075
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4076
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4077
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
4078
|
+
* });
|
|
4079
|
+
*
|
|
4080
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4081
|
+
* const authClient = await auth.getClient();
|
|
4082
|
+
* google.options({auth: authClient});
|
|
4083
|
+
*
|
|
4084
|
+
* // Do the magic
|
|
4085
|
+
* const res = await tagmanager.accounts.containers.move_folders.update({
|
|
4086
|
+
* // The GTM Account ID.
|
|
4087
|
+
* accountId: 'placeholder-value',
|
|
4088
|
+
* // The GTM Container ID.
|
|
4089
|
+
* containerId: 'placeholder-value',
|
|
4090
|
+
* // The GTM Folder ID.
|
|
4091
|
+
* folderId: 'placeholder-value',
|
|
4092
|
+
* // The tags to be moved to the folder.
|
|
4093
|
+
* tagId: 'placeholder-value',
|
|
4094
|
+
* // The triggers to be moved to the folder.
|
|
4095
|
+
* triggerId: 'placeholder-value',
|
|
4096
|
+
* // The variables to be moved to the folder.
|
|
4097
|
+
* variableId: 'placeholder-value',
|
|
4098
|
+
*
|
|
4099
|
+
* // Request body metadata
|
|
4100
|
+
* requestBody: {
|
|
4101
|
+
* // request body parameters
|
|
4102
|
+
* // {
|
|
4103
|
+
* // "accountId": "my_accountId",
|
|
4104
|
+
* // "containerId": "my_containerId",
|
|
4105
|
+
* // "fingerprint": "my_fingerprint",
|
|
4106
|
+
* // "folderId": "my_folderId",
|
|
4107
|
+
* // "name": "my_name"
|
|
4108
|
+
* // }
|
|
4109
|
+
* },
|
|
4110
|
+
* });
|
|
4111
|
+
* console.log(res.data);
|
|
4112
|
+
* }
|
|
4113
|
+
*
|
|
4114
|
+
* main().catch(e => {
|
|
4115
|
+
* console.error(e);
|
|
4116
|
+
* throw e;
|
|
4117
|
+
* });
|
|
4118
|
+
*
|
|
4119
|
+
* ```
|
|
2930
4120
|
*
|
|
2931
4121
|
* @param params - Parameters for request
|
|
2932
4122
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3056,6 +4246,87 @@ export namespace tagmanager_v1 {
|
|
|
3056
4246
|
|
|
3057
4247
|
/**
|
|
3058
4248
|
* Re-generates the authorization code for a GTM Environment.
|
|
4249
|
+
* @example
|
|
4250
|
+
* ```js
|
|
4251
|
+
* // Before running the sample:
|
|
4252
|
+
* // - Enable the API at:
|
|
4253
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
4254
|
+
* // - Login into gcloud by running:
|
|
4255
|
+
* // ```sh
|
|
4256
|
+
* // $ gcloud auth application-default login
|
|
4257
|
+
* // ```
|
|
4258
|
+
* // - Install the npm module by running:
|
|
4259
|
+
* // ```sh
|
|
4260
|
+
* // $ npm install googleapis
|
|
4261
|
+
* // ```
|
|
4262
|
+
*
|
|
4263
|
+
* const {google} = require('googleapis');
|
|
4264
|
+
* const tagmanager = google.tagmanager('v1');
|
|
4265
|
+
*
|
|
4266
|
+
* async function main() {
|
|
4267
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4268
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4269
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.publish'],
|
|
4270
|
+
* });
|
|
4271
|
+
*
|
|
4272
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4273
|
+
* const authClient = await auth.getClient();
|
|
4274
|
+
* google.options({auth: authClient});
|
|
4275
|
+
*
|
|
4276
|
+
* // Do the magic
|
|
4277
|
+
* const res =
|
|
4278
|
+
* await tagmanager.accounts.containers.reauthorize_environments.update({
|
|
4279
|
+
* // The GTM Account ID.
|
|
4280
|
+
* accountId: 'placeholder-value',
|
|
4281
|
+
* // The GTM Container ID.
|
|
4282
|
+
* containerId: 'placeholder-value',
|
|
4283
|
+
* // The GTM Environment ID.
|
|
4284
|
+
* environmentId: 'placeholder-value',
|
|
4285
|
+
*
|
|
4286
|
+
* // Request body metadata
|
|
4287
|
+
* requestBody: {
|
|
4288
|
+
* // request body parameters
|
|
4289
|
+
* // {
|
|
4290
|
+
* // "accountId": "my_accountId",
|
|
4291
|
+
* // "authorizationCode": "my_authorizationCode",
|
|
4292
|
+
* // "authorizationTimestampMs": "my_authorizationTimestampMs",
|
|
4293
|
+
* // "containerId": "my_containerId",
|
|
4294
|
+
* // "containerVersionId": "my_containerVersionId",
|
|
4295
|
+
* // "description": "my_description",
|
|
4296
|
+
* // "enableDebug": false,
|
|
4297
|
+
* // "environmentId": "my_environmentId",
|
|
4298
|
+
* // "fingerprint": "my_fingerprint",
|
|
4299
|
+
* // "name": "my_name",
|
|
4300
|
+
* // "type": "my_type",
|
|
4301
|
+
* // "url": "my_url"
|
|
4302
|
+
* // }
|
|
4303
|
+
* },
|
|
4304
|
+
* });
|
|
4305
|
+
* console.log(res.data);
|
|
4306
|
+
*
|
|
4307
|
+
* // Example response
|
|
4308
|
+
* // {
|
|
4309
|
+
* // "accountId": "my_accountId",
|
|
4310
|
+
* // "authorizationCode": "my_authorizationCode",
|
|
4311
|
+
* // "authorizationTimestampMs": "my_authorizationTimestampMs",
|
|
4312
|
+
* // "containerId": "my_containerId",
|
|
4313
|
+
* // "containerVersionId": "my_containerVersionId",
|
|
4314
|
+
* // "description": "my_description",
|
|
4315
|
+
* // "enableDebug": false,
|
|
4316
|
+
* // "environmentId": "my_environmentId",
|
|
4317
|
+
* // "fingerprint": "my_fingerprint",
|
|
4318
|
+
* // "name": "my_name",
|
|
4319
|
+
* // "type": "my_type",
|
|
4320
|
+
* // "url": "my_url"
|
|
4321
|
+
* // }
|
|
4322
|
+
* }
|
|
4323
|
+
*
|
|
4324
|
+
* main().catch(e => {
|
|
4325
|
+
* console.error(e);
|
|
4326
|
+
* throw e;
|
|
4327
|
+
* });
|
|
4328
|
+
*
|
|
4329
|
+
* ```
|
|
3059
4330
|
*
|
|
3060
4331
|
* @param params - Parameters for request
|
|
3061
4332
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3176,6 +4447,98 @@ export namespace tagmanager_v1 {
|
|
|
3176
4447
|
|
|
3177
4448
|
/**
|
|
3178
4449
|
* Creates a GTM Tag.
|
|
4450
|
+
* @example
|
|
4451
|
+
* ```js
|
|
4452
|
+
* // Before running the sample:
|
|
4453
|
+
* // - Enable the API at:
|
|
4454
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
4455
|
+
* // - Login into gcloud by running:
|
|
4456
|
+
* // ```sh
|
|
4457
|
+
* // $ gcloud auth application-default login
|
|
4458
|
+
* // ```
|
|
4459
|
+
* // - Install the npm module by running:
|
|
4460
|
+
* // ```sh
|
|
4461
|
+
* // $ npm install googleapis
|
|
4462
|
+
* // ```
|
|
4463
|
+
*
|
|
4464
|
+
* const {google} = require('googleapis');
|
|
4465
|
+
* const tagmanager = google.tagmanager('v1');
|
|
4466
|
+
*
|
|
4467
|
+
* async function main() {
|
|
4468
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4469
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4470
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
4471
|
+
* });
|
|
4472
|
+
*
|
|
4473
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4474
|
+
* const authClient = await auth.getClient();
|
|
4475
|
+
* google.options({auth: authClient});
|
|
4476
|
+
*
|
|
4477
|
+
* // Do the magic
|
|
4478
|
+
* const res = await tagmanager.accounts.containers.tags.create({
|
|
4479
|
+
* // The GTM Account ID.
|
|
4480
|
+
* accountId: 'placeholder-value',
|
|
4481
|
+
* // The GTM Container ID.
|
|
4482
|
+
* containerId: 'placeholder-value',
|
|
4483
|
+
*
|
|
4484
|
+
* // Request body metadata
|
|
4485
|
+
* requestBody: {
|
|
4486
|
+
* // request body parameters
|
|
4487
|
+
* // {
|
|
4488
|
+
* // "accountId": "my_accountId",
|
|
4489
|
+
* // "blockingTriggerId": [],
|
|
4490
|
+
* // "containerId": "my_containerId",
|
|
4491
|
+
* // "fingerprint": "my_fingerprint",
|
|
4492
|
+
* // "firingTriggerId": [],
|
|
4493
|
+
* // "liveOnly": false,
|
|
4494
|
+
* // "name": "my_name",
|
|
4495
|
+
* // "notes": "my_notes",
|
|
4496
|
+
* // "parameter": [],
|
|
4497
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
4498
|
+
* // "paused": false,
|
|
4499
|
+
* // "priority": {},
|
|
4500
|
+
* // "scheduleEndMs": "my_scheduleEndMs",
|
|
4501
|
+
* // "scheduleStartMs": "my_scheduleStartMs",
|
|
4502
|
+
* // "setupTag": [],
|
|
4503
|
+
* // "tagFiringOption": "my_tagFiringOption",
|
|
4504
|
+
* // "tagId": "my_tagId",
|
|
4505
|
+
* // "teardownTag": [],
|
|
4506
|
+
* // "type": "my_type"
|
|
4507
|
+
* // }
|
|
4508
|
+
* },
|
|
4509
|
+
* });
|
|
4510
|
+
* console.log(res.data);
|
|
4511
|
+
*
|
|
4512
|
+
* // Example response
|
|
4513
|
+
* // {
|
|
4514
|
+
* // "accountId": "my_accountId",
|
|
4515
|
+
* // "blockingTriggerId": [],
|
|
4516
|
+
* // "containerId": "my_containerId",
|
|
4517
|
+
* // "fingerprint": "my_fingerprint",
|
|
4518
|
+
* // "firingTriggerId": [],
|
|
4519
|
+
* // "liveOnly": false,
|
|
4520
|
+
* // "name": "my_name",
|
|
4521
|
+
* // "notes": "my_notes",
|
|
4522
|
+
* // "parameter": [],
|
|
4523
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
4524
|
+
* // "paused": false,
|
|
4525
|
+
* // "priority": {},
|
|
4526
|
+
* // "scheduleEndMs": "my_scheduleEndMs",
|
|
4527
|
+
* // "scheduleStartMs": "my_scheduleStartMs",
|
|
4528
|
+
* // "setupTag": [],
|
|
4529
|
+
* // "tagFiringOption": "my_tagFiringOption",
|
|
4530
|
+
* // "tagId": "my_tagId",
|
|
4531
|
+
* // "teardownTag": [],
|
|
4532
|
+
* // "type": "my_type"
|
|
4533
|
+
* // }
|
|
4534
|
+
* }
|
|
4535
|
+
*
|
|
4536
|
+
* main().catch(e => {
|
|
4537
|
+
* console.error(e);
|
|
4538
|
+
* throw e;
|
|
4539
|
+
* });
|
|
4540
|
+
*
|
|
4541
|
+
* ```
|
|
3179
4542
|
*
|
|
3180
4543
|
* @param params - Parameters for request
|
|
3181
4544
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3267,6 +4630,51 @@ export namespace tagmanager_v1 {
|
|
|
3267
4630
|
|
|
3268
4631
|
/**
|
|
3269
4632
|
* Deletes a GTM Tag.
|
|
4633
|
+
* @example
|
|
4634
|
+
* ```js
|
|
4635
|
+
* // Before running the sample:
|
|
4636
|
+
* // - Enable the API at:
|
|
4637
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
4638
|
+
* // - Login into gcloud by running:
|
|
4639
|
+
* // ```sh
|
|
4640
|
+
* // $ gcloud auth application-default login
|
|
4641
|
+
* // ```
|
|
4642
|
+
* // - Install the npm module by running:
|
|
4643
|
+
* // ```sh
|
|
4644
|
+
* // $ npm install googleapis
|
|
4645
|
+
* // ```
|
|
4646
|
+
*
|
|
4647
|
+
* const {google} = require('googleapis');
|
|
4648
|
+
* const tagmanager = google.tagmanager('v1');
|
|
4649
|
+
*
|
|
4650
|
+
* async function main() {
|
|
4651
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4652
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4653
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
4654
|
+
* });
|
|
4655
|
+
*
|
|
4656
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4657
|
+
* const authClient = await auth.getClient();
|
|
4658
|
+
* google.options({auth: authClient});
|
|
4659
|
+
*
|
|
4660
|
+
* // Do the magic
|
|
4661
|
+
* const res = await tagmanager.accounts.containers.tags.delete({
|
|
4662
|
+
* // The GTM Account ID.
|
|
4663
|
+
* accountId: 'placeholder-value',
|
|
4664
|
+
* // The GTM Container ID.
|
|
4665
|
+
* containerId: 'placeholder-value',
|
|
4666
|
+
* // The GTM Tag ID.
|
|
4667
|
+
* tagId: 'placeholder-value',
|
|
4668
|
+
* });
|
|
4669
|
+
* console.log(res.data);
|
|
4670
|
+
* }
|
|
4671
|
+
*
|
|
4672
|
+
* main().catch(e => {
|
|
4673
|
+
* console.error(e);
|
|
4674
|
+
* throw e;
|
|
4675
|
+
* });
|
|
4676
|
+
*
|
|
4677
|
+
* ```
|
|
3270
4678
|
*
|
|
3271
4679
|
* @param params - Parameters for request
|
|
3272
4680
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3356,6 +4764,77 @@ export namespace tagmanager_v1 {
|
|
|
3356
4764
|
|
|
3357
4765
|
/**
|
|
3358
4766
|
* Gets a GTM Tag.
|
|
4767
|
+
* @example
|
|
4768
|
+
* ```js
|
|
4769
|
+
* // Before running the sample:
|
|
4770
|
+
* // - Enable the API at:
|
|
4771
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
4772
|
+
* // - Login into gcloud by running:
|
|
4773
|
+
* // ```sh
|
|
4774
|
+
* // $ gcloud auth application-default login
|
|
4775
|
+
* // ```
|
|
4776
|
+
* // - Install the npm module by running:
|
|
4777
|
+
* // ```sh
|
|
4778
|
+
* // $ npm install googleapis
|
|
4779
|
+
* // ```
|
|
4780
|
+
*
|
|
4781
|
+
* const {google} = require('googleapis');
|
|
4782
|
+
* const tagmanager = google.tagmanager('v1');
|
|
4783
|
+
*
|
|
4784
|
+
* async function main() {
|
|
4785
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4786
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4787
|
+
* scopes: [
|
|
4788
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
4789
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
4790
|
+
* ],
|
|
4791
|
+
* });
|
|
4792
|
+
*
|
|
4793
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4794
|
+
* const authClient = await auth.getClient();
|
|
4795
|
+
* google.options({auth: authClient});
|
|
4796
|
+
*
|
|
4797
|
+
* // Do the magic
|
|
4798
|
+
* const res = await tagmanager.accounts.containers.tags.get({
|
|
4799
|
+
* // The GTM Account ID.
|
|
4800
|
+
* accountId: 'placeholder-value',
|
|
4801
|
+
* // The GTM Container ID.
|
|
4802
|
+
* containerId: 'placeholder-value',
|
|
4803
|
+
* // The GTM Tag ID.
|
|
4804
|
+
* tagId: 'placeholder-value',
|
|
4805
|
+
* });
|
|
4806
|
+
* console.log(res.data);
|
|
4807
|
+
*
|
|
4808
|
+
* // Example response
|
|
4809
|
+
* // {
|
|
4810
|
+
* // "accountId": "my_accountId",
|
|
4811
|
+
* // "blockingTriggerId": [],
|
|
4812
|
+
* // "containerId": "my_containerId",
|
|
4813
|
+
* // "fingerprint": "my_fingerprint",
|
|
4814
|
+
* // "firingTriggerId": [],
|
|
4815
|
+
* // "liveOnly": false,
|
|
4816
|
+
* // "name": "my_name",
|
|
4817
|
+
* // "notes": "my_notes",
|
|
4818
|
+
* // "parameter": [],
|
|
4819
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
4820
|
+
* // "paused": false,
|
|
4821
|
+
* // "priority": {},
|
|
4822
|
+
* // "scheduleEndMs": "my_scheduleEndMs",
|
|
4823
|
+
* // "scheduleStartMs": "my_scheduleStartMs",
|
|
4824
|
+
* // "setupTag": [],
|
|
4825
|
+
* // "tagFiringOption": "my_tagFiringOption",
|
|
4826
|
+
* // "tagId": "my_tagId",
|
|
4827
|
+
* // "teardownTag": [],
|
|
4828
|
+
* // "type": "my_type"
|
|
4829
|
+
* // }
|
|
4830
|
+
* }
|
|
4831
|
+
*
|
|
4832
|
+
* main().catch(e => {
|
|
4833
|
+
* console.error(e);
|
|
4834
|
+
* throw e;
|
|
4835
|
+
* });
|
|
4836
|
+
*
|
|
4837
|
+
* ```
|
|
3359
4838
|
*
|
|
3360
4839
|
* @param params - Parameters for request
|
|
3361
4840
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3447,6 +4926,57 @@ export namespace tagmanager_v1 {
|
|
|
3447
4926
|
|
|
3448
4927
|
/**
|
|
3449
4928
|
* Lists all GTM Tags of a Container.
|
|
4929
|
+
* @example
|
|
4930
|
+
* ```js
|
|
4931
|
+
* // Before running the sample:
|
|
4932
|
+
* // - Enable the API at:
|
|
4933
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
4934
|
+
* // - Login into gcloud by running:
|
|
4935
|
+
* // ```sh
|
|
4936
|
+
* // $ gcloud auth application-default login
|
|
4937
|
+
* // ```
|
|
4938
|
+
* // - Install the npm module by running:
|
|
4939
|
+
* // ```sh
|
|
4940
|
+
* // $ npm install googleapis
|
|
4941
|
+
* // ```
|
|
4942
|
+
*
|
|
4943
|
+
* const {google} = require('googleapis');
|
|
4944
|
+
* const tagmanager = google.tagmanager('v1');
|
|
4945
|
+
*
|
|
4946
|
+
* async function main() {
|
|
4947
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4948
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4949
|
+
* scopes: [
|
|
4950
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
4951
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
4952
|
+
* ],
|
|
4953
|
+
* });
|
|
4954
|
+
*
|
|
4955
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4956
|
+
* const authClient = await auth.getClient();
|
|
4957
|
+
* google.options({auth: authClient});
|
|
4958
|
+
*
|
|
4959
|
+
* // Do the magic
|
|
4960
|
+
* const res = await tagmanager.accounts.containers.tags.list({
|
|
4961
|
+
* // The GTM Account ID.
|
|
4962
|
+
* accountId: 'placeholder-value',
|
|
4963
|
+
* // The GTM Container ID.
|
|
4964
|
+
* containerId: 'placeholder-value',
|
|
4965
|
+
* });
|
|
4966
|
+
* console.log(res.data);
|
|
4967
|
+
*
|
|
4968
|
+
* // Example response
|
|
4969
|
+
* // {
|
|
4970
|
+
* // "tags": []
|
|
4971
|
+
* // }
|
|
4972
|
+
* }
|
|
4973
|
+
*
|
|
4974
|
+
* main().catch(e => {
|
|
4975
|
+
* console.error(e);
|
|
4976
|
+
* throw e;
|
|
4977
|
+
* });
|
|
4978
|
+
*
|
|
4979
|
+
* ```
|
|
3450
4980
|
*
|
|
3451
4981
|
* @param params - Parameters for request
|
|
3452
4982
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3538,6 +5068,102 @@ export namespace tagmanager_v1 {
|
|
|
3538
5068
|
|
|
3539
5069
|
/**
|
|
3540
5070
|
* Updates a GTM Tag.
|
|
5071
|
+
* @example
|
|
5072
|
+
* ```js
|
|
5073
|
+
* // Before running the sample:
|
|
5074
|
+
* // - Enable the API at:
|
|
5075
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
5076
|
+
* // - Login into gcloud by running:
|
|
5077
|
+
* // ```sh
|
|
5078
|
+
* // $ gcloud auth application-default login
|
|
5079
|
+
* // ```
|
|
5080
|
+
* // - Install the npm module by running:
|
|
5081
|
+
* // ```sh
|
|
5082
|
+
* // $ npm install googleapis
|
|
5083
|
+
* // ```
|
|
5084
|
+
*
|
|
5085
|
+
* const {google} = require('googleapis');
|
|
5086
|
+
* const tagmanager = google.tagmanager('v1');
|
|
5087
|
+
*
|
|
5088
|
+
* async function main() {
|
|
5089
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5090
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5091
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
5092
|
+
* });
|
|
5093
|
+
*
|
|
5094
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5095
|
+
* const authClient = await auth.getClient();
|
|
5096
|
+
* google.options({auth: authClient});
|
|
5097
|
+
*
|
|
5098
|
+
* // Do the magic
|
|
5099
|
+
* const res = await tagmanager.accounts.containers.tags.update({
|
|
5100
|
+
* // The GTM Account ID.
|
|
5101
|
+
* accountId: 'placeholder-value',
|
|
5102
|
+
* // The GTM Container ID.
|
|
5103
|
+
* containerId: 'placeholder-value',
|
|
5104
|
+
* // When provided, this fingerprint must match the fingerprint of the tag in storage.
|
|
5105
|
+
* fingerprint: 'placeholder-value',
|
|
5106
|
+
* // The GTM Tag ID.
|
|
5107
|
+
* tagId: 'placeholder-value',
|
|
5108
|
+
*
|
|
5109
|
+
* // Request body metadata
|
|
5110
|
+
* requestBody: {
|
|
5111
|
+
* // request body parameters
|
|
5112
|
+
* // {
|
|
5113
|
+
* // "accountId": "my_accountId",
|
|
5114
|
+
* // "blockingTriggerId": [],
|
|
5115
|
+
* // "containerId": "my_containerId",
|
|
5116
|
+
* // "fingerprint": "my_fingerprint",
|
|
5117
|
+
* // "firingTriggerId": [],
|
|
5118
|
+
* // "liveOnly": false,
|
|
5119
|
+
* // "name": "my_name",
|
|
5120
|
+
* // "notes": "my_notes",
|
|
5121
|
+
* // "parameter": [],
|
|
5122
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
5123
|
+
* // "paused": false,
|
|
5124
|
+
* // "priority": {},
|
|
5125
|
+
* // "scheduleEndMs": "my_scheduleEndMs",
|
|
5126
|
+
* // "scheduleStartMs": "my_scheduleStartMs",
|
|
5127
|
+
* // "setupTag": [],
|
|
5128
|
+
* // "tagFiringOption": "my_tagFiringOption",
|
|
5129
|
+
* // "tagId": "my_tagId",
|
|
5130
|
+
* // "teardownTag": [],
|
|
5131
|
+
* // "type": "my_type"
|
|
5132
|
+
* // }
|
|
5133
|
+
* },
|
|
5134
|
+
* });
|
|
5135
|
+
* console.log(res.data);
|
|
5136
|
+
*
|
|
5137
|
+
* // Example response
|
|
5138
|
+
* // {
|
|
5139
|
+
* // "accountId": "my_accountId",
|
|
5140
|
+
* // "blockingTriggerId": [],
|
|
5141
|
+
* // "containerId": "my_containerId",
|
|
5142
|
+
* // "fingerprint": "my_fingerprint",
|
|
5143
|
+
* // "firingTriggerId": [],
|
|
5144
|
+
* // "liveOnly": false,
|
|
5145
|
+
* // "name": "my_name",
|
|
5146
|
+
* // "notes": "my_notes",
|
|
5147
|
+
* // "parameter": [],
|
|
5148
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
5149
|
+
* // "paused": false,
|
|
5150
|
+
* // "priority": {},
|
|
5151
|
+
* // "scheduleEndMs": "my_scheduleEndMs",
|
|
5152
|
+
* // "scheduleStartMs": "my_scheduleStartMs",
|
|
5153
|
+
* // "setupTag": [],
|
|
5154
|
+
* // "tagFiringOption": "my_tagFiringOption",
|
|
5155
|
+
* // "tagId": "my_tagId",
|
|
5156
|
+
* // "teardownTag": [],
|
|
5157
|
+
* // "type": "my_type"
|
|
5158
|
+
* // }
|
|
5159
|
+
* }
|
|
5160
|
+
*
|
|
5161
|
+
* main().catch(e => {
|
|
5162
|
+
* console.error(e);
|
|
5163
|
+
* throw e;
|
|
5164
|
+
* });
|
|
5165
|
+
*
|
|
5166
|
+
* ```
|
|
3541
5167
|
*
|
|
3542
5168
|
* @param params - Parameters for request
|
|
3543
5169
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3718,6 +5344,116 @@ export namespace tagmanager_v1 {
|
|
|
3718
5344
|
|
|
3719
5345
|
/**
|
|
3720
5346
|
* Creates a GTM Trigger.
|
|
5347
|
+
* @example
|
|
5348
|
+
* ```js
|
|
5349
|
+
* // Before running the sample:
|
|
5350
|
+
* // - Enable the API at:
|
|
5351
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
5352
|
+
* // - Login into gcloud by running:
|
|
5353
|
+
* // ```sh
|
|
5354
|
+
* // $ gcloud auth application-default login
|
|
5355
|
+
* // ```
|
|
5356
|
+
* // - Install the npm module by running:
|
|
5357
|
+
* // ```sh
|
|
5358
|
+
* // $ npm install googleapis
|
|
5359
|
+
* // ```
|
|
5360
|
+
*
|
|
5361
|
+
* const {google} = require('googleapis');
|
|
5362
|
+
* const tagmanager = google.tagmanager('v1');
|
|
5363
|
+
*
|
|
5364
|
+
* async function main() {
|
|
5365
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5366
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5367
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
5368
|
+
* });
|
|
5369
|
+
*
|
|
5370
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5371
|
+
* const authClient = await auth.getClient();
|
|
5372
|
+
* google.options({auth: authClient});
|
|
5373
|
+
*
|
|
5374
|
+
* // Do the magic
|
|
5375
|
+
* const res = await tagmanager.accounts.containers.triggers.create({
|
|
5376
|
+
* // The GTM Account ID.
|
|
5377
|
+
* accountId: 'placeholder-value',
|
|
5378
|
+
* // The GTM Container ID.
|
|
5379
|
+
* containerId: 'placeholder-value',
|
|
5380
|
+
*
|
|
5381
|
+
* // Request body metadata
|
|
5382
|
+
* requestBody: {
|
|
5383
|
+
* // request body parameters
|
|
5384
|
+
* // {
|
|
5385
|
+
* // "accountId": "my_accountId",
|
|
5386
|
+
* // "autoEventFilter": [],
|
|
5387
|
+
* // "checkValidation": {},
|
|
5388
|
+
* // "containerId": "my_containerId",
|
|
5389
|
+
* // "continuousTimeMinMilliseconds": {},
|
|
5390
|
+
* // "customEventFilter": [],
|
|
5391
|
+
* // "eventName": {},
|
|
5392
|
+
* // "filter": [],
|
|
5393
|
+
* // "fingerprint": "my_fingerprint",
|
|
5394
|
+
* // "horizontalScrollPercentageList": {},
|
|
5395
|
+
* // "interval": {},
|
|
5396
|
+
* // "intervalSeconds": {},
|
|
5397
|
+
* // "limit": {},
|
|
5398
|
+
* // "maxTimerLengthSeconds": {},
|
|
5399
|
+
* // "name": "my_name",
|
|
5400
|
+
* // "parameter": [],
|
|
5401
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
5402
|
+
* // "selector": {},
|
|
5403
|
+
* // "totalTimeMinMilliseconds": {},
|
|
5404
|
+
* // "triggerId": "my_triggerId",
|
|
5405
|
+
* // "type": "my_type",
|
|
5406
|
+
* // "uniqueTriggerId": {},
|
|
5407
|
+
* // "verticalScrollPercentageList": {},
|
|
5408
|
+
* // "visibilitySelector": {},
|
|
5409
|
+
* // "visiblePercentageMax": {},
|
|
5410
|
+
* // "visiblePercentageMin": {},
|
|
5411
|
+
* // "waitForTags": {},
|
|
5412
|
+
* // "waitForTagsTimeout": {}
|
|
5413
|
+
* // }
|
|
5414
|
+
* },
|
|
5415
|
+
* });
|
|
5416
|
+
* console.log(res.data);
|
|
5417
|
+
*
|
|
5418
|
+
* // Example response
|
|
5419
|
+
* // {
|
|
5420
|
+
* // "accountId": "my_accountId",
|
|
5421
|
+
* // "autoEventFilter": [],
|
|
5422
|
+
* // "checkValidation": {},
|
|
5423
|
+
* // "containerId": "my_containerId",
|
|
5424
|
+
* // "continuousTimeMinMilliseconds": {},
|
|
5425
|
+
* // "customEventFilter": [],
|
|
5426
|
+
* // "eventName": {},
|
|
5427
|
+
* // "filter": [],
|
|
5428
|
+
* // "fingerprint": "my_fingerprint",
|
|
5429
|
+
* // "horizontalScrollPercentageList": {},
|
|
5430
|
+
* // "interval": {},
|
|
5431
|
+
* // "intervalSeconds": {},
|
|
5432
|
+
* // "limit": {},
|
|
5433
|
+
* // "maxTimerLengthSeconds": {},
|
|
5434
|
+
* // "name": "my_name",
|
|
5435
|
+
* // "parameter": [],
|
|
5436
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
5437
|
+
* // "selector": {},
|
|
5438
|
+
* // "totalTimeMinMilliseconds": {},
|
|
5439
|
+
* // "triggerId": "my_triggerId",
|
|
5440
|
+
* // "type": "my_type",
|
|
5441
|
+
* // "uniqueTriggerId": {},
|
|
5442
|
+
* // "verticalScrollPercentageList": {},
|
|
5443
|
+
* // "visibilitySelector": {},
|
|
5444
|
+
* // "visiblePercentageMax": {},
|
|
5445
|
+
* // "visiblePercentageMin": {},
|
|
5446
|
+
* // "waitForTags": {},
|
|
5447
|
+
* // "waitForTagsTimeout": {}
|
|
5448
|
+
* // }
|
|
5449
|
+
* }
|
|
5450
|
+
*
|
|
5451
|
+
* main().catch(e => {
|
|
5452
|
+
* console.error(e);
|
|
5453
|
+
* throw e;
|
|
5454
|
+
* });
|
|
5455
|
+
*
|
|
5456
|
+
* ```
|
|
3721
5457
|
*
|
|
3722
5458
|
* @param params - Parameters for request
|
|
3723
5459
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3809,6 +5545,51 @@ export namespace tagmanager_v1 {
|
|
|
3809
5545
|
|
|
3810
5546
|
/**
|
|
3811
5547
|
* Deletes a GTM Trigger.
|
|
5548
|
+
* @example
|
|
5549
|
+
* ```js
|
|
5550
|
+
* // Before running the sample:
|
|
5551
|
+
* // - Enable the API at:
|
|
5552
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
5553
|
+
* // - Login into gcloud by running:
|
|
5554
|
+
* // ```sh
|
|
5555
|
+
* // $ gcloud auth application-default login
|
|
5556
|
+
* // ```
|
|
5557
|
+
* // - Install the npm module by running:
|
|
5558
|
+
* // ```sh
|
|
5559
|
+
* // $ npm install googleapis
|
|
5560
|
+
* // ```
|
|
5561
|
+
*
|
|
5562
|
+
* const {google} = require('googleapis');
|
|
5563
|
+
* const tagmanager = google.tagmanager('v1');
|
|
5564
|
+
*
|
|
5565
|
+
* async function main() {
|
|
5566
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5567
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5568
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
5569
|
+
* });
|
|
5570
|
+
*
|
|
5571
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5572
|
+
* const authClient = await auth.getClient();
|
|
5573
|
+
* google.options({auth: authClient});
|
|
5574
|
+
*
|
|
5575
|
+
* // Do the magic
|
|
5576
|
+
* const res = await tagmanager.accounts.containers.triggers.delete({
|
|
5577
|
+
* // The GTM Account ID.
|
|
5578
|
+
* accountId: 'placeholder-value',
|
|
5579
|
+
* // The GTM Container ID.
|
|
5580
|
+
* containerId: 'placeholder-value',
|
|
5581
|
+
* // The GTM Trigger ID.
|
|
5582
|
+
* triggerId: 'placeholder-value',
|
|
5583
|
+
* });
|
|
5584
|
+
* console.log(res.data);
|
|
5585
|
+
* }
|
|
5586
|
+
*
|
|
5587
|
+
* main().catch(e => {
|
|
5588
|
+
* console.error(e);
|
|
5589
|
+
* throw e;
|
|
5590
|
+
* });
|
|
5591
|
+
*
|
|
5592
|
+
* ```
|
|
3812
5593
|
*
|
|
3813
5594
|
* @param params - Parameters for request
|
|
3814
5595
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3898,6 +5679,86 @@ export namespace tagmanager_v1 {
|
|
|
3898
5679
|
|
|
3899
5680
|
/**
|
|
3900
5681
|
* Gets a GTM Trigger.
|
|
5682
|
+
* @example
|
|
5683
|
+
* ```js
|
|
5684
|
+
* // Before running the sample:
|
|
5685
|
+
* // - Enable the API at:
|
|
5686
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
5687
|
+
* // - Login into gcloud by running:
|
|
5688
|
+
* // ```sh
|
|
5689
|
+
* // $ gcloud auth application-default login
|
|
5690
|
+
* // ```
|
|
5691
|
+
* // - Install the npm module by running:
|
|
5692
|
+
* // ```sh
|
|
5693
|
+
* // $ npm install googleapis
|
|
5694
|
+
* // ```
|
|
5695
|
+
*
|
|
5696
|
+
* const {google} = require('googleapis');
|
|
5697
|
+
* const tagmanager = google.tagmanager('v1');
|
|
5698
|
+
*
|
|
5699
|
+
* async function main() {
|
|
5700
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5701
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5702
|
+
* scopes: [
|
|
5703
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
5704
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
5705
|
+
* ],
|
|
5706
|
+
* });
|
|
5707
|
+
*
|
|
5708
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5709
|
+
* const authClient = await auth.getClient();
|
|
5710
|
+
* google.options({auth: authClient});
|
|
5711
|
+
*
|
|
5712
|
+
* // Do the magic
|
|
5713
|
+
* const res = await tagmanager.accounts.containers.triggers.get({
|
|
5714
|
+
* // The GTM Account ID.
|
|
5715
|
+
* accountId: 'placeholder-value',
|
|
5716
|
+
* // The GTM Container ID.
|
|
5717
|
+
* containerId: 'placeholder-value',
|
|
5718
|
+
* // The GTM Trigger ID.
|
|
5719
|
+
* triggerId: 'placeholder-value',
|
|
5720
|
+
* });
|
|
5721
|
+
* console.log(res.data);
|
|
5722
|
+
*
|
|
5723
|
+
* // Example response
|
|
5724
|
+
* // {
|
|
5725
|
+
* // "accountId": "my_accountId",
|
|
5726
|
+
* // "autoEventFilter": [],
|
|
5727
|
+
* // "checkValidation": {},
|
|
5728
|
+
* // "containerId": "my_containerId",
|
|
5729
|
+
* // "continuousTimeMinMilliseconds": {},
|
|
5730
|
+
* // "customEventFilter": [],
|
|
5731
|
+
* // "eventName": {},
|
|
5732
|
+
* // "filter": [],
|
|
5733
|
+
* // "fingerprint": "my_fingerprint",
|
|
5734
|
+
* // "horizontalScrollPercentageList": {},
|
|
5735
|
+
* // "interval": {},
|
|
5736
|
+
* // "intervalSeconds": {},
|
|
5737
|
+
* // "limit": {},
|
|
5738
|
+
* // "maxTimerLengthSeconds": {},
|
|
5739
|
+
* // "name": "my_name",
|
|
5740
|
+
* // "parameter": [],
|
|
5741
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
5742
|
+
* // "selector": {},
|
|
5743
|
+
* // "totalTimeMinMilliseconds": {},
|
|
5744
|
+
* // "triggerId": "my_triggerId",
|
|
5745
|
+
* // "type": "my_type",
|
|
5746
|
+
* // "uniqueTriggerId": {},
|
|
5747
|
+
* // "verticalScrollPercentageList": {},
|
|
5748
|
+
* // "visibilitySelector": {},
|
|
5749
|
+
* // "visiblePercentageMax": {},
|
|
5750
|
+
* // "visiblePercentageMin": {},
|
|
5751
|
+
* // "waitForTags": {},
|
|
5752
|
+
* // "waitForTagsTimeout": {}
|
|
5753
|
+
* // }
|
|
5754
|
+
* }
|
|
5755
|
+
*
|
|
5756
|
+
* main().catch(e => {
|
|
5757
|
+
* console.error(e);
|
|
5758
|
+
* throw e;
|
|
5759
|
+
* });
|
|
5760
|
+
*
|
|
5761
|
+
* ```
|
|
3901
5762
|
*
|
|
3902
5763
|
* @param params - Parameters for request
|
|
3903
5764
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3989,6 +5850,57 @@ export namespace tagmanager_v1 {
|
|
|
3989
5850
|
|
|
3990
5851
|
/**
|
|
3991
5852
|
* Lists all GTM Triggers of a Container.
|
|
5853
|
+
* @example
|
|
5854
|
+
* ```js
|
|
5855
|
+
* // Before running the sample:
|
|
5856
|
+
* // - Enable the API at:
|
|
5857
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
5858
|
+
* // - Login into gcloud by running:
|
|
5859
|
+
* // ```sh
|
|
5860
|
+
* // $ gcloud auth application-default login
|
|
5861
|
+
* // ```
|
|
5862
|
+
* // - Install the npm module by running:
|
|
5863
|
+
* // ```sh
|
|
5864
|
+
* // $ npm install googleapis
|
|
5865
|
+
* // ```
|
|
5866
|
+
*
|
|
5867
|
+
* const {google} = require('googleapis');
|
|
5868
|
+
* const tagmanager = google.tagmanager('v1');
|
|
5869
|
+
*
|
|
5870
|
+
* async function main() {
|
|
5871
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5872
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5873
|
+
* scopes: [
|
|
5874
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
5875
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
5876
|
+
* ],
|
|
5877
|
+
* });
|
|
5878
|
+
*
|
|
5879
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5880
|
+
* const authClient = await auth.getClient();
|
|
5881
|
+
* google.options({auth: authClient});
|
|
5882
|
+
*
|
|
5883
|
+
* // Do the magic
|
|
5884
|
+
* const res = await tagmanager.accounts.containers.triggers.list({
|
|
5885
|
+
* // The GTM Account ID.
|
|
5886
|
+
* accountId: 'placeholder-value',
|
|
5887
|
+
* // The GTM Container ID.
|
|
5888
|
+
* containerId: 'placeholder-value',
|
|
5889
|
+
* });
|
|
5890
|
+
* console.log(res.data);
|
|
5891
|
+
*
|
|
5892
|
+
* // Example response
|
|
5893
|
+
* // {
|
|
5894
|
+
* // "triggers": []
|
|
5895
|
+
* // }
|
|
5896
|
+
* }
|
|
5897
|
+
*
|
|
5898
|
+
* main().catch(e => {
|
|
5899
|
+
* console.error(e);
|
|
5900
|
+
* throw e;
|
|
5901
|
+
* });
|
|
5902
|
+
*
|
|
5903
|
+
* ```
|
|
3992
5904
|
*
|
|
3993
5905
|
* @param params - Parameters for request
|
|
3994
5906
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4082,6 +5994,120 @@ export namespace tagmanager_v1 {
|
|
|
4082
5994
|
|
|
4083
5995
|
/**
|
|
4084
5996
|
* Updates a GTM Trigger.
|
|
5997
|
+
* @example
|
|
5998
|
+
* ```js
|
|
5999
|
+
* // Before running the sample:
|
|
6000
|
+
* // - Enable the API at:
|
|
6001
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
6002
|
+
* // - Login into gcloud by running:
|
|
6003
|
+
* // ```sh
|
|
6004
|
+
* // $ gcloud auth application-default login
|
|
6005
|
+
* // ```
|
|
6006
|
+
* // - Install the npm module by running:
|
|
6007
|
+
* // ```sh
|
|
6008
|
+
* // $ npm install googleapis
|
|
6009
|
+
* // ```
|
|
6010
|
+
*
|
|
6011
|
+
* const {google} = require('googleapis');
|
|
6012
|
+
* const tagmanager = google.tagmanager('v1');
|
|
6013
|
+
*
|
|
6014
|
+
* async function main() {
|
|
6015
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6016
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6017
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
6018
|
+
* });
|
|
6019
|
+
*
|
|
6020
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6021
|
+
* const authClient = await auth.getClient();
|
|
6022
|
+
* google.options({auth: authClient});
|
|
6023
|
+
*
|
|
6024
|
+
* // Do the magic
|
|
6025
|
+
* const res = await tagmanager.accounts.containers.triggers.update({
|
|
6026
|
+
* // The GTM Account ID.
|
|
6027
|
+
* accountId: 'placeholder-value',
|
|
6028
|
+
* // The GTM Container ID.
|
|
6029
|
+
* containerId: 'placeholder-value',
|
|
6030
|
+
* // When provided, this fingerprint must match the fingerprint of the trigger in storage.
|
|
6031
|
+
* fingerprint: 'placeholder-value',
|
|
6032
|
+
* // The GTM Trigger ID.
|
|
6033
|
+
* triggerId: 'placeholder-value',
|
|
6034
|
+
*
|
|
6035
|
+
* // Request body metadata
|
|
6036
|
+
* requestBody: {
|
|
6037
|
+
* // request body parameters
|
|
6038
|
+
* // {
|
|
6039
|
+
* // "accountId": "my_accountId",
|
|
6040
|
+
* // "autoEventFilter": [],
|
|
6041
|
+
* // "checkValidation": {},
|
|
6042
|
+
* // "containerId": "my_containerId",
|
|
6043
|
+
* // "continuousTimeMinMilliseconds": {},
|
|
6044
|
+
* // "customEventFilter": [],
|
|
6045
|
+
* // "eventName": {},
|
|
6046
|
+
* // "filter": [],
|
|
6047
|
+
* // "fingerprint": "my_fingerprint",
|
|
6048
|
+
* // "horizontalScrollPercentageList": {},
|
|
6049
|
+
* // "interval": {},
|
|
6050
|
+
* // "intervalSeconds": {},
|
|
6051
|
+
* // "limit": {},
|
|
6052
|
+
* // "maxTimerLengthSeconds": {},
|
|
6053
|
+
* // "name": "my_name",
|
|
6054
|
+
* // "parameter": [],
|
|
6055
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
6056
|
+
* // "selector": {},
|
|
6057
|
+
* // "totalTimeMinMilliseconds": {},
|
|
6058
|
+
* // "triggerId": "my_triggerId",
|
|
6059
|
+
* // "type": "my_type",
|
|
6060
|
+
* // "uniqueTriggerId": {},
|
|
6061
|
+
* // "verticalScrollPercentageList": {},
|
|
6062
|
+
* // "visibilitySelector": {},
|
|
6063
|
+
* // "visiblePercentageMax": {},
|
|
6064
|
+
* // "visiblePercentageMin": {},
|
|
6065
|
+
* // "waitForTags": {},
|
|
6066
|
+
* // "waitForTagsTimeout": {}
|
|
6067
|
+
* // }
|
|
6068
|
+
* },
|
|
6069
|
+
* });
|
|
6070
|
+
* console.log(res.data);
|
|
6071
|
+
*
|
|
6072
|
+
* // Example response
|
|
6073
|
+
* // {
|
|
6074
|
+
* // "accountId": "my_accountId",
|
|
6075
|
+
* // "autoEventFilter": [],
|
|
6076
|
+
* // "checkValidation": {},
|
|
6077
|
+
* // "containerId": "my_containerId",
|
|
6078
|
+
* // "continuousTimeMinMilliseconds": {},
|
|
6079
|
+
* // "customEventFilter": [],
|
|
6080
|
+
* // "eventName": {},
|
|
6081
|
+
* // "filter": [],
|
|
6082
|
+
* // "fingerprint": "my_fingerprint",
|
|
6083
|
+
* // "horizontalScrollPercentageList": {},
|
|
6084
|
+
* // "interval": {},
|
|
6085
|
+
* // "intervalSeconds": {},
|
|
6086
|
+
* // "limit": {},
|
|
6087
|
+
* // "maxTimerLengthSeconds": {},
|
|
6088
|
+
* // "name": "my_name",
|
|
6089
|
+
* // "parameter": [],
|
|
6090
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
6091
|
+
* // "selector": {},
|
|
6092
|
+
* // "totalTimeMinMilliseconds": {},
|
|
6093
|
+
* // "triggerId": "my_triggerId",
|
|
6094
|
+
* // "type": "my_type",
|
|
6095
|
+
* // "uniqueTriggerId": {},
|
|
6096
|
+
* // "verticalScrollPercentageList": {},
|
|
6097
|
+
* // "visibilitySelector": {},
|
|
6098
|
+
* // "visiblePercentageMax": {},
|
|
6099
|
+
* // "visiblePercentageMin": {},
|
|
6100
|
+
* // "waitForTags": {},
|
|
6101
|
+
* // "waitForTagsTimeout": {}
|
|
6102
|
+
* // }
|
|
6103
|
+
* }
|
|
6104
|
+
*
|
|
6105
|
+
* main().catch(e => {
|
|
6106
|
+
* console.error(e);
|
|
6107
|
+
* throw e;
|
|
6108
|
+
* });
|
|
6109
|
+
*
|
|
6110
|
+
* ```
|
|
4085
6111
|
*
|
|
4086
6112
|
* @param params - Parameters for request
|
|
4087
6113
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4262,6 +6288,86 @@ export namespace tagmanager_v1 {
|
|
|
4262
6288
|
|
|
4263
6289
|
/**
|
|
4264
6290
|
* Creates a GTM Variable.
|
|
6291
|
+
* @example
|
|
6292
|
+
* ```js
|
|
6293
|
+
* // Before running the sample:
|
|
6294
|
+
* // - Enable the API at:
|
|
6295
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
6296
|
+
* // - Login into gcloud by running:
|
|
6297
|
+
* // ```sh
|
|
6298
|
+
* // $ gcloud auth application-default login
|
|
6299
|
+
* // ```
|
|
6300
|
+
* // - Install the npm module by running:
|
|
6301
|
+
* // ```sh
|
|
6302
|
+
* // $ npm install googleapis
|
|
6303
|
+
* // ```
|
|
6304
|
+
*
|
|
6305
|
+
* const {google} = require('googleapis');
|
|
6306
|
+
* const tagmanager = google.tagmanager('v1');
|
|
6307
|
+
*
|
|
6308
|
+
* async function main() {
|
|
6309
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6310
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6311
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
6312
|
+
* });
|
|
6313
|
+
*
|
|
6314
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6315
|
+
* const authClient = await auth.getClient();
|
|
6316
|
+
* google.options({auth: authClient});
|
|
6317
|
+
*
|
|
6318
|
+
* // Do the magic
|
|
6319
|
+
* const res = await tagmanager.accounts.containers.variables.create({
|
|
6320
|
+
* // The GTM Account ID.
|
|
6321
|
+
* accountId: 'placeholder-value',
|
|
6322
|
+
* // The GTM Container ID.
|
|
6323
|
+
* containerId: 'placeholder-value',
|
|
6324
|
+
*
|
|
6325
|
+
* // Request body metadata
|
|
6326
|
+
* requestBody: {
|
|
6327
|
+
* // request body parameters
|
|
6328
|
+
* // {
|
|
6329
|
+
* // "accountId": "my_accountId",
|
|
6330
|
+
* // "containerId": "my_containerId",
|
|
6331
|
+
* // "disablingTriggerId": [],
|
|
6332
|
+
* // "enablingTriggerId": [],
|
|
6333
|
+
* // "fingerprint": "my_fingerprint",
|
|
6334
|
+
* // "name": "my_name",
|
|
6335
|
+
* // "notes": "my_notes",
|
|
6336
|
+
* // "parameter": [],
|
|
6337
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
6338
|
+
* // "scheduleEndMs": "my_scheduleEndMs",
|
|
6339
|
+
* // "scheduleStartMs": "my_scheduleStartMs",
|
|
6340
|
+
* // "type": "my_type",
|
|
6341
|
+
* // "variableId": "my_variableId"
|
|
6342
|
+
* // }
|
|
6343
|
+
* },
|
|
6344
|
+
* });
|
|
6345
|
+
* console.log(res.data);
|
|
6346
|
+
*
|
|
6347
|
+
* // Example response
|
|
6348
|
+
* // {
|
|
6349
|
+
* // "accountId": "my_accountId",
|
|
6350
|
+
* // "containerId": "my_containerId",
|
|
6351
|
+
* // "disablingTriggerId": [],
|
|
6352
|
+
* // "enablingTriggerId": [],
|
|
6353
|
+
* // "fingerprint": "my_fingerprint",
|
|
6354
|
+
* // "name": "my_name",
|
|
6355
|
+
* // "notes": "my_notes",
|
|
6356
|
+
* // "parameter": [],
|
|
6357
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
6358
|
+
* // "scheduleEndMs": "my_scheduleEndMs",
|
|
6359
|
+
* // "scheduleStartMs": "my_scheduleStartMs",
|
|
6360
|
+
* // "type": "my_type",
|
|
6361
|
+
* // "variableId": "my_variableId"
|
|
6362
|
+
* // }
|
|
6363
|
+
* }
|
|
6364
|
+
*
|
|
6365
|
+
* main().catch(e => {
|
|
6366
|
+
* console.error(e);
|
|
6367
|
+
* throw e;
|
|
6368
|
+
* });
|
|
6369
|
+
*
|
|
6370
|
+
* ```
|
|
4265
6371
|
*
|
|
4266
6372
|
* @param params - Parameters for request
|
|
4267
6373
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4353,6 +6459,51 @@ export namespace tagmanager_v1 {
|
|
|
4353
6459
|
|
|
4354
6460
|
/**
|
|
4355
6461
|
* Deletes a GTM Variable.
|
|
6462
|
+
* @example
|
|
6463
|
+
* ```js
|
|
6464
|
+
* // Before running the sample:
|
|
6465
|
+
* // - Enable the API at:
|
|
6466
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
6467
|
+
* // - Login into gcloud by running:
|
|
6468
|
+
* // ```sh
|
|
6469
|
+
* // $ gcloud auth application-default login
|
|
6470
|
+
* // ```
|
|
6471
|
+
* // - Install the npm module by running:
|
|
6472
|
+
* // ```sh
|
|
6473
|
+
* // $ npm install googleapis
|
|
6474
|
+
* // ```
|
|
6475
|
+
*
|
|
6476
|
+
* const {google} = require('googleapis');
|
|
6477
|
+
* const tagmanager = google.tagmanager('v1');
|
|
6478
|
+
*
|
|
6479
|
+
* async function main() {
|
|
6480
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6481
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6482
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
6483
|
+
* });
|
|
6484
|
+
*
|
|
6485
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6486
|
+
* const authClient = await auth.getClient();
|
|
6487
|
+
* google.options({auth: authClient});
|
|
6488
|
+
*
|
|
6489
|
+
* // Do the magic
|
|
6490
|
+
* const res = await tagmanager.accounts.containers.variables.delete({
|
|
6491
|
+
* // The GTM Account ID.
|
|
6492
|
+
* accountId: 'placeholder-value',
|
|
6493
|
+
* // The GTM Container ID.
|
|
6494
|
+
* containerId: 'placeholder-value',
|
|
6495
|
+
* // The GTM Variable ID.
|
|
6496
|
+
* variableId: 'placeholder-value',
|
|
6497
|
+
* });
|
|
6498
|
+
* console.log(res.data);
|
|
6499
|
+
* }
|
|
6500
|
+
*
|
|
6501
|
+
* main().catch(e => {
|
|
6502
|
+
* console.error(e);
|
|
6503
|
+
* throw e;
|
|
6504
|
+
* });
|
|
6505
|
+
*
|
|
6506
|
+
* ```
|
|
4356
6507
|
*
|
|
4357
6508
|
* @param params - Parameters for request
|
|
4358
6509
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4442,6 +6593,71 @@ export namespace tagmanager_v1 {
|
|
|
4442
6593
|
|
|
4443
6594
|
/**
|
|
4444
6595
|
* Gets a GTM Variable.
|
|
6596
|
+
* @example
|
|
6597
|
+
* ```js
|
|
6598
|
+
* // Before running the sample:
|
|
6599
|
+
* // - Enable the API at:
|
|
6600
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
6601
|
+
* // - Login into gcloud by running:
|
|
6602
|
+
* // ```sh
|
|
6603
|
+
* // $ gcloud auth application-default login
|
|
6604
|
+
* // ```
|
|
6605
|
+
* // - Install the npm module by running:
|
|
6606
|
+
* // ```sh
|
|
6607
|
+
* // $ npm install googleapis
|
|
6608
|
+
* // ```
|
|
6609
|
+
*
|
|
6610
|
+
* const {google} = require('googleapis');
|
|
6611
|
+
* const tagmanager = google.tagmanager('v1');
|
|
6612
|
+
*
|
|
6613
|
+
* async function main() {
|
|
6614
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6615
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6616
|
+
* scopes: [
|
|
6617
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
6618
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
6619
|
+
* ],
|
|
6620
|
+
* });
|
|
6621
|
+
*
|
|
6622
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6623
|
+
* const authClient = await auth.getClient();
|
|
6624
|
+
* google.options({auth: authClient});
|
|
6625
|
+
*
|
|
6626
|
+
* // Do the magic
|
|
6627
|
+
* const res = await tagmanager.accounts.containers.variables.get({
|
|
6628
|
+
* // The GTM Account ID.
|
|
6629
|
+
* accountId: 'placeholder-value',
|
|
6630
|
+
* // The GTM Container ID.
|
|
6631
|
+
* containerId: 'placeholder-value',
|
|
6632
|
+
* // The GTM Variable ID.
|
|
6633
|
+
* variableId: 'placeholder-value',
|
|
6634
|
+
* });
|
|
6635
|
+
* console.log(res.data);
|
|
6636
|
+
*
|
|
6637
|
+
* // Example response
|
|
6638
|
+
* // {
|
|
6639
|
+
* // "accountId": "my_accountId",
|
|
6640
|
+
* // "containerId": "my_containerId",
|
|
6641
|
+
* // "disablingTriggerId": [],
|
|
6642
|
+
* // "enablingTriggerId": [],
|
|
6643
|
+
* // "fingerprint": "my_fingerprint",
|
|
6644
|
+
* // "name": "my_name",
|
|
6645
|
+
* // "notes": "my_notes",
|
|
6646
|
+
* // "parameter": [],
|
|
6647
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
6648
|
+
* // "scheduleEndMs": "my_scheduleEndMs",
|
|
6649
|
+
* // "scheduleStartMs": "my_scheduleStartMs",
|
|
6650
|
+
* // "type": "my_type",
|
|
6651
|
+
* // "variableId": "my_variableId"
|
|
6652
|
+
* // }
|
|
6653
|
+
* }
|
|
6654
|
+
*
|
|
6655
|
+
* main().catch(e => {
|
|
6656
|
+
* console.error(e);
|
|
6657
|
+
* throw e;
|
|
6658
|
+
* });
|
|
6659
|
+
*
|
|
6660
|
+
* ```
|
|
4445
6661
|
*
|
|
4446
6662
|
* @param params - Parameters for request
|
|
4447
6663
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4533,6 +6749,57 @@ export namespace tagmanager_v1 {
|
|
|
4533
6749
|
|
|
4534
6750
|
/**
|
|
4535
6751
|
* Lists all GTM Variables of a Container.
|
|
6752
|
+
* @example
|
|
6753
|
+
* ```js
|
|
6754
|
+
* // Before running the sample:
|
|
6755
|
+
* // - Enable the API at:
|
|
6756
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
6757
|
+
* // - Login into gcloud by running:
|
|
6758
|
+
* // ```sh
|
|
6759
|
+
* // $ gcloud auth application-default login
|
|
6760
|
+
* // ```
|
|
6761
|
+
* // - Install the npm module by running:
|
|
6762
|
+
* // ```sh
|
|
6763
|
+
* // $ npm install googleapis
|
|
6764
|
+
* // ```
|
|
6765
|
+
*
|
|
6766
|
+
* const {google} = require('googleapis');
|
|
6767
|
+
* const tagmanager = google.tagmanager('v1');
|
|
6768
|
+
*
|
|
6769
|
+
* async function main() {
|
|
6770
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6771
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6772
|
+
* scopes: [
|
|
6773
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
6774
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
6775
|
+
* ],
|
|
6776
|
+
* });
|
|
6777
|
+
*
|
|
6778
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6779
|
+
* const authClient = await auth.getClient();
|
|
6780
|
+
* google.options({auth: authClient});
|
|
6781
|
+
*
|
|
6782
|
+
* // Do the magic
|
|
6783
|
+
* const res = await tagmanager.accounts.containers.variables.list({
|
|
6784
|
+
* // The GTM Account ID.
|
|
6785
|
+
* accountId: 'placeholder-value',
|
|
6786
|
+
* // The GTM Container ID.
|
|
6787
|
+
* containerId: 'placeholder-value',
|
|
6788
|
+
* });
|
|
6789
|
+
* console.log(res.data);
|
|
6790
|
+
*
|
|
6791
|
+
* // Example response
|
|
6792
|
+
* // {
|
|
6793
|
+
* // "variables": []
|
|
6794
|
+
* // }
|
|
6795
|
+
* }
|
|
6796
|
+
*
|
|
6797
|
+
* main().catch(e => {
|
|
6798
|
+
* console.error(e);
|
|
6799
|
+
* throw e;
|
|
6800
|
+
* });
|
|
6801
|
+
*
|
|
6802
|
+
* ```
|
|
4536
6803
|
*
|
|
4537
6804
|
* @param params - Parameters for request
|
|
4538
6805
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4626,6 +6893,90 @@ export namespace tagmanager_v1 {
|
|
|
4626
6893
|
|
|
4627
6894
|
/**
|
|
4628
6895
|
* Updates a GTM Variable.
|
|
6896
|
+
* @example
|
|
6897
|
+
* ```js
|
|
6898
|
+
* // Before running the sample:
|
|
6899
|
+
* // - Enable the API at:
|
|
6900
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
6901
|
+
* // - Login into gcloud by running:
|
|
6902
|
+
* // ```sh
|
|
6903
|
+
* // $ gcloud auth application-default login
|
|
6904
|
+
* // ```
|
|
6905
|
+
* // - Install the npm module by running:
|
|
6906
|
+
* // ```sh
|
|
6907
|
+
* // $ npm install googleapis
|
|
6908
|
+
* // ```
|
|
6909
|
+
*
|
|
6910
|
+
* const {google} = require('googleapis');
|
|
6911
|
+
* const tagmanager = google.tagmanager('v1');
|
|
6912
|
+
*
|
|
6913
|
+
* async function main() {
|
|
6914
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6915
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6916
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
6917
|
+
* });
|
|
6918
|
+
*
|
|
6919
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6920
|
+
* const authClient = await auth.getClient();
|
|
6921
|
+
* google.options({auth: authClient});
|
|
6922
|
+
*
|
|
6923
|
+
* // Do the magic
|
|
6924
|
+
* const res = await tagmanager.accounts.containers.variables.update({
|
|
6925
|
+
* // The GTM Account ID.
|
|
6926
|
+
* accountId: 'placeholder-value',
|
|
6927
|
+
* // The GTM Container ID.
|
|
6928
|
+
* containerId: 'placeholder-value',
|
|
6929
|
+
* // When provided, this fingerprint must match the fingerprint of the variable in storage.
|
|
6930
|
+
* fingerprint: 'placeholder-value',
|
|
6931
|
+
* // The GTM Variable ID.
|
|
6932
|
+
* variableId: 'placeholder-value',
|
|
6933
|
+
*
|
|
6934
|
+
* // Request body metadata
|
|
6935
|
+
* requestBody: {
|
|
6936
|
+
* // request body parameters
|
|
6937
|
+
* // {
|
|
6938
|
+
* // "accountId": "my_accountId",
|
|
6939
|
+
* // "containerId": "my_containerId",
|
|
6940
|
+
* // "disablingTriggerId": [],
|
|
6941
|
+
* // "enablingTriggerId": [],
|
|
6942
|
+
* // "fingerprint": "my_fingerprint",
|
|
6943
|
+
* // "name": "my_name",
|
|
6944
|
+
* // "notes": "my_notes",
|
|
6945
|
+
* // "parameter": [],
|
|
6946
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
6947
|
+
* // "scheduleEndMs": "my_scheduleEndMs",
|
|
6948
|
+
* // "scheduleStartMs": "my_scheduleStartMs",
|
|
6949
|
+
* // "type": "my_type",
|
|
6950
|
+
* // "variableId": "my_variableId"
|
|
6951
|
+
* // }
|
|
6952
|
+
* },
|
|
6953
|
+
* });
|
|
6954
|
+
* console.log(res.data);
|
|
6955
|
+
*
|
|
6956
|
+
* // Example response
|
|
6957
|
+
* // {
|
|
6958
|
+
* // "accountId": "my_accountId",
|
|
6959
|
+
* // "containerId": "my_containerId",
|
|
6960
|
+
* // "disablingTriggerId": [],
|
|
6961
|
+
* // "enablingTriggerId": [],
|
|
6962
|
+
* // "fingerprint": "my_fingerprint",
|
|
6963
|
+
* // "name": "my_name",
|
|
6964
|
+
* // "notes": "my_notes",
|
|
6965
|
+
* // "parameter": [],
|
|
6966
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
6967
|
+
* // "scheduleEndMs": "my_scheduleEndMs",
|
|
6968
|
+
* // "scheduleStartMs": "my_scheduleStartMs",
|
|
6969
|
+
* // "type": "my_type",
|
|
6970
|
+
* // "variableId": "my_variableId"
|
|
6971
|
+
* // }
|
|
6972
|
+
* }
|
|
6973
|
+
*
|
|
6974
|
+
* main().catch(e => {
|
|
6975
|
+
* console.error(e);
|
|
6976
|
+
* throw e;
|
|
6977
|
+
* });
|
|
6978
|
+
*
|
|
6979
|
+
* ```
|
|
4629
6980
|
*
|
|
4630
6981
|
* @param params - Parameters for request
|
|
4631
6982
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4806,6 +7157,67 @@ export namespace tagmanager_v1 {
|
|
|
4806
7157
|
|
|
4807
7158
|
/**
|
|
4808
7159
|
* Creates a Container Version.
|
|
7160
|
+
* @example
|
|
7161
|
+
* ```js
|
|
7162
|
+
* // Before running the sample:
|
|
7163
|
+
* // - Enable the API at:
|
|
7164
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
7165
|
+
* // - Login into gcloud by running:
|
|
7166
|
+
* // ```sh
|
|
7167
|
+
* // $ gcloud auth application-default login
|
|
7168
|
+
* // ```
|
|
7169
|
+
* // - Install the npm module by running:
|
|
7170
|
+
* // ```sh
|
|
7171
|
+
* // $ npm install googleapis
|
|
7172
|
+
* // ```
|
|
7173
|
+
*
|
|
7174
|
+
* const {google} = require('googleapis');
|
|
7175
|
+
* const tagmanager = google.tagmanager('v1');
|
|
7176
|
+
*
|
|
7177
|
+
* async function main() {
|
|
7178
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7179
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7180
|
+
* scopes: [
|
|
7181
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containerversions',
|
|
7182
|
+
* ],
|
|
7183
|
+
* });
|
|
7184
|
+
*
|
|
7185
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7186
|
+
* const authClient = await auth.getClient();
|
|
7187
|
+
* google.options({auth: authClient});
|
|
7188
|
+
*
|
|
7189
|
+
* // Do the magic
|
|
7190
|
+
* const res = await tagmanager.accounts.containers.versions.create({
|
|
7191
|
+
* // The GTM Account ID.
|
|
7192
|
+
* accountId: 'placeholder-value',
|
|
7193
|
+
* // The GTM Container ID.
|
|
7194
|
+
* containerId: 'placeholder-value',
|
|
7195
|
+
*
|
|
7196
|
+
* // Request body metadata
|
|
7197
|
+
* requestBody: {
|
|
7198
|
+
* // request body parameters
|
|
7199
|
+
* // {
|
|
7200
|
+
* // "name": "my_name",
|
|
7201
|
+
* // "notes": "my_notes",
|
|
7202
|
+
* // "quickPreview": false
|
|
7203
|
+
* // }
|
|
7204
|
+
* },
|
|
7205
|
+
* });
|
|
7206
|
+
* console.log(res.data);
|
|
7207
|
+
*
|
|
7208
|
+
* // Example response
|
|
7209
|
+
* // {
|
|
7210
|
+
* // "compilerError": false,
|
|
7211
|
+
* // "containerVersion": {}
|
|
7212
|
+
* // }
|
|
7213
|
+
* }
|
|
7214
|
+
*
|
|
7215
|
+
* main().catch(e => {
|
|
7216
|
+
* console.error(e);
|
|
7217
|
+
* throw e;
|
|
7218
|
+
* });
|
|
7219
|
+
*
|
|
7220
|
+
* ```
|
|
4809
7221
|
*
|
|
4810
7222
|
* @param params - Parameters for request
|
|
4811
7223
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4903,6 +7315,53 @@ export namespace tagmanager_v1 {
|
|
|
4903
7315
|
|
|
4904
7316
|
/**
|
|
4905
7317
|
* Deletes a Container Version.
|
|
7318
|
+
* @example
|
|
7319
|
+
* ```js
|
|
7320
|
+
* // Before running the sample:
|
|
7321
|
+
* // - Enable the API at:
|
|
7322
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
7323
|
+
* // - Login into gcloud by running:
|
|
7324
|
+
* // ```sh
|
|
7325
|
+
* // $ gcloud auth application-default login
|
|
7326
|
+
* // ```
|
|
7327
|
+
* // - Install the npm module by running:
|
|
7328
|
+
* // ```sh
|
|
7329
|
+
* // $ npm install googleapis
|
|
7330
|
+
* // ```
|
|
7331
|
+
*
|
|
7332
|
+
* const {google} = require('googleapis');
|
|
7333
|
+
* const tagmanager = google.tagmanager('v1');
|
|
7334
|
+
*
|
|
7335
|
+
* async function main() {
|
|
7336
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7337
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7338
|
+
* scopes: [
|
|
7339
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containerversions',
|
|
7340
|
+
* ],
|
|
7341
|
+
* });
|
|
7342
|
+
*
|
|
7343
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7344
|
+
* const authClient = await auth.getClient();
|
|
7345
|
+
* google.options({auth: authClient});
|
|
7346
|
+
*
|
|
7347
|
+
* // Do the magic
|
|
7348
|
+
* const res = await tagmanager.accounts.containers.versions.delete({
|
|
7349
|
+
* // The GTM Account ID.
|
|
7350
|
+
* accountId: 'placeholder-value',
|
|
7351
|
+
* // The GTM Container ID.
|
|
7352
|
+
* containerId: 'placeholder-value',
|
|
7353
|
+
* // The GTM Container Version ID.
|
|
7354
|
+
* containerVersionId: 'placeholder-value',
|
|
7355
|
+
* });
|
|
7356
|
+
* console.log(res.data);
|
|
7357
|
+
* }
|
|
7358
|
+
*
|
|
7359
|
+
* main().catch(e => {
|
|
7360
|
+
* console.error(e);
|
|
7361
|
+
* throw e;
|
|
7362
|
+
* });
|
|
7363
|
+
*
|
|
7364
|
+
* ```
|
|
4906
7365
|
*
|
|
4907
7366
|
* @param params - Parameters for request
|
|
4908
7367
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4992,6 +7451,71 @@ export namespace tagmanager_v1 {
|
|
|
4992
7451
|
|
|
4993
7452
|
/**
|
|
4994
7453
|
* Gets a Container Version.
|
|
7454
|
+
* @example
|
|
7455
|
+
* ```js
|
|
7456
|
+
* // Before running the sample:
|
|
7457
|
+
* // - Enable the API at:
|
|
7458
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
7459
|
+
* // - Login into gcloud by running:
|
|
7460
|
+
* // ```sh
|
|
7461
|
+
* // $ gcloud auth application-default login
|
|
7462
|
+
* // ```
|
|
7463
|
+
* // - Install the npm module by running:
|
|
7464
|
+
* // ```sh
|
|
7465
|
+
* // $ npm install googleapis
|
|
7466
|
+
* // ```
|
|
7467
|
+
*
|
|
7468
|
+
* const {google} = require('googleapis');
|
|
7469
|
+
* const tagmanager = google.tagmanager('v1');
|
|
7470
|
+
*
|
|
7471
|
+
* async function main() {
|
|
7472
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7473
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7474
|
+
* scopes: [
|
|
7475
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
7476
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containerversions',
|
|
7477
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
7478
|
+
* ],
|
|
7479
|
+
* });
|
|
7480
|
+
*
|
|
7481
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7482
|
+
* const authClient = await auth.getClient();
|
|
7483
|
+
* google.options({auth: authClient});
|
|
7484
|
+
*
|
|
7485
|
+
* // Do the magic
|
|
7486
|
+
* const res = await tagmanager.accounts.containers.versions.get({
|
|
7487
|
+
* // The GTM Account ID.
|
|
7488
|
+
* accountId: 'placeholder-value',
|
|
7489
|
+
* // The GTM Container ID.
|
|
7490
|
+
* containerId: 'placeholder-value',
|
|
7491
|
+
* // The GTM Container Version ID. Specify published to retrieve the currently published version.
|
|
7492
|
+
* containerVersionId: 'placeholder-value',
|
|
7493
|
+
* });
|
|
7494
|
+
* console.log(res.data);
|
|
7495
|
+
*
|
|
7496
|
+
* // Example response
|
|
7497
|
+
* // {
|
|
7498
|
+
* // "accountId": "my_accountId",
|
|
7499
|
+
* // "container": {},
|
|
7500
|
+
* // "containerId": "my_containerId",
|
|
7501
|
+
* // "containerVersionId": "my_containerVersionId",
|
|
7502
|
+
* // "deleted": false,
|
|
7503
|
+
* // "fingerprint": "my_fingerprint",
|
|
7504
|
+
* // "folder": [],
|
|
7505
|
+
* // "name": "my_name",
|
|
7506
|
+
* // "notes": "my_notes",
|
|
7507
|
+
* // "tag": [],
|
|
7508
|
+
* // "trigger": [],
|
|
7509
|
+
* // "variable": []
|
|
7510
|
+
* // }
|
|
7511
|
+
* }
|
|
7512
|
+
*
|
|
7513
|
+
* main().catch(e => {
|
|
7514
|
+
* console.error(e);
|
|
7515
|
+
* throw e;
|
|
7516
|
+
* });
|
|
7517
|
+
*
|
|
7518
|
+
* ```
|
|
4995
7519
|
*
|
|
4996
7520
|
* @param params - Parameters for request
|
|
4997
7521
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5083,6 +7607,63 @@ export namespace tagmanager_v1 {
|
|
|
5083
7607
|
|
|
5084
7608
|
/**
|
|
5085
7609
|
* Lists all Container Versions of a GTM Container.
|
|
7610
|
+
* @example
|
|
7611
|
+
* ```js
|
|
7612
|
+
* // Before running the sample:
|
|
7613
|
+
* // - Enable the API at:
|
|
7614
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
7615
|
+
* // - Login into gcloud by running:
|
|
7616
|
+
* // ```sh
|
|
7617
|
+
* // $ gcloud auth application-default login
|
|
7618
|
+
* // ```
|
|
7619
|
+
* // - Install the npm module by running:
|
|
7620
|
+
* // ```sh
|
|
7621
|
+
* // $ npm install googleapis
|
|
7622
|
+
* // ```
|
|
7623
|
+
*
|
|
7624
|
+
* const {google} = require('googleapis');
|
|
7625
|
+
* const tagmanager = google.tagmanager('v1');
|
|
7626
|
+
*
|
|
7627
|
+
* async function main() {
|
|
7628
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7629
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7630
|
+
* scopes: [
|
|
7631
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
7632
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containerversions',
|
|
7633
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
7634
|
+
* ],
|
|
7635
|
+
* });
|
|
7636
|
+
*
|
|
7637
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7638
|
+
* const authClient = await auth.getClient();
|
|
7639
|
+
* google.options({auth: authClient});
|
|
7640
|
+
*
|
|
7641
|
+
* // Do the magic
|
|
7642
|
+
* const res = await tagmanager.accounts.containers.versions.list({
|
|
7643
|
+
* // The GTM Account ID.
|
|
7644
|
+
* accountId: 'placeholder-value',
|
|
7645
|
+
* // The GTM Container ID.
|
|
7646
|
+
* containerId: 'placeholder-value',
|
|
7647
|
+
* // Retrieve headers only when true.
|
|
7648
|
+
* headers: 'placeholder-value',
|
|
7649
|
+
* // Also retrieve deleted (archived) versions when true.
|
|
7650
|
+
* includeDeleted: 'placeholder-value',
|
|
7651
|
+
* });
|
|
7652
|
+
* console.log(res.data);
|
|
7653
|
+
*
|
|
7654
|
+
* // Example response
|
|
7655
|
+
* // {
|
|
7656
|
+
* // "containerVersion": [],
|
|
7657
|
+
* // "containerVersionHeader": []
|
|
7658
|
+
* // }
|
|
7659
|
+
* }
|
|
7660
|
+
*
|
|
7661
|
+
* main().catch(e => {
|
|
7662
|
+
* console.error(e);
|
|
7663
|
+
* throw e;
|
|
7664
|
+
* });
|
|
7665
|
+
*
|
|
7666
|
+
* ```
|
|
5086
7667
|
*
|
|
5087
7668
|
* @param params - Parameters for request
|
|
5088
7669
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5180,6 +7761,59 @@ export namespace tagmanager_v1 {
|
|
|
5180
7761
|
|
|
5181
7762
|
/**
|
|
5182
7763
|
* Publishes a Container Version.
|
|
7764
|
+
* @example
|
|
7765
|
+
* ```js
|
|
7766
|
+
* // Before running the sample:
|
|
7767
|
+
* // - Enable the API at:
|
|
7768
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
7769
|
+
* // - Login into gcloud by running:
|
|
7770
|
+
* // ```sh
|
|
7771
|
+
* // $ gcloud auth application-default login
|
|
7772
|
+
* // ```
|
|
7773
|
+
* // - Install the npm module by running:
|
|
7774
|
+
* // ```sh
|
|
7775
|
+
* // $ npm install googleapis
|
|
7776
|
+
* // ```
|
|
7777
|
+
*
|
|
7778
|
+
* const {google} = require('googleapis');
|
|
7779
|
+
* const tagmanager = google.tagmanager('v1');
|
|
7780
|
+
*
|
|
7781
|
+
* async function main() {
|
|
7782
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7783
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7784
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.publish'],
|
|
7785
|
+
* });
|
|
7786
|
+
*
|
|
7787
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7788
|
+
* const authClient = await auth.getClient();
|
|
7789
|
+
* google.options({auth: authClient});
|
|
7790
|
+
*
|
|
7791
|
+
* // Do the magic
|
|
7792
|
+
* const res = await tagmanager.accounts.containers.versions.publish({
|
|
7793
|
+
* // The GTM Account ID.
|
|
7794
|
+
* accountId: 'placeholder-value',
|
|
7795
|
+
* // The GTM Container ID.
|
|
7796
|
+
* containerId: 'placeholder-value',
|
|
7797
|
+
* // The GTM Container Version ID.
|
|
7798
|
+
* containerVersionId: 'placeholder-value',
|
|
7799
|
+
* // When provided, this fingerprint must match the fingerprint of the container version in storage.
|
|
7800
|
+
* fingerprint: 'placeholder-value',
|
|
7801
|
+
* });
|
|
7802
|
+
* console.log(res.data);
|
|
7803
|
+
*
|
|
7804
|
+
* // Example response
|
|
7805
|
+
* // {
|
|
7806
|
+
* // "compilerError": false,
|
|
7807
|
+
* // "containerVersion": {}
|
|
7808
|
+
* // }
|
|
7809
|
+
* }
|
|
7810
|
+
*
|
|
7811
|
+
* main().catch(e => {
|
|
7812
|
+
* console.error(e);
|
|
7813
|
+
* throw e;
|
|
7814
|
+
* });
|
|
7815
|
+
*
|
|
7816
|
+
* ```
|
|
5183
7817
|
*
|
|
5184
7818
|
* @param params - Parameters for request
|
|
5185
7819
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5277,6 +7911,67 @@ export namespace tagmanager_v1 {
|
|
|
5277
7911
|
|
|
5278
7912
|
/**
|
|
5279
7913
|
* Restores a Container Version. This will overwrite the container's current configuration (including its variables, triggers and tags). The operation will not have any effect on the version that is being served (i.e. the published version).
|
|
7914
|
+
* @example
|
|
7915
|
+
* ```js
|
|
7916
|
+
* // Before running the sample:
|
|
7917
|
+
* // - Enable the API at:
|
|
7918
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
7919
|
+
* // - Login into gcloud by running:
|
|
7920
|
+
* // ```sh
|
|
7921
|
+
* // $ gcloud auth application-default login
|
|
7922
|
+
* // ```
|
|
7923
|
+
* // - Install the npm module by running:
|
|
7924
|
+
* // ```sh
|
|
7925
|
+
* // $ npm install googleapis
|
|
7926
|
+
* // ```
|
|
7927
|
+
*
|
|
7928
|
+
* const {google} = require('googleapis');
|
|
7929
|
+
* const tagmanager = google.tagmanager('v1');
|
|
7930
|
+
*
|
|
7931
|
+
* async function main() {
|
|
7932
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7933
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7934
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
7935
|
+
* });
|
|
7936
|
+
*
|
|
7937
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7938
|
+
* const authClient = await auth.getClient();
|
|
7939
|
+
* google.options({auth: authClient});
|
|
7940
|
+
*
|
|
7941
|
+
* // Do the magic
|
|
7942
|
+
* const res = await tagmanager.accounts.containers.versions.restore({
|
|
7943
|
+
* // The GTM Account ID.
|
|
7944
|
+
* accountId: 'placeholder-value',
|
|
7945
|
+
* // The GTM Container ID.
|
|
7946
|
+
* containerId: 'placeholder-value',
|
|
7947
|
+
* // The GTM Container Version ID.
|
|
7948
|
+
* containerVersionId: 'placeholder-value',
|
|
7949
|
+
* });
|
|
7950
|
+
* console.log(res.data);
|
|
7951
|
+
*
|
|
7952
|
+
* // Example response
|
|
7953
|
+
* // {
|
|
7954
|
+
* // "accountId": "my_accountId",
|
|
7955
|
+
* // "container": {},
|
|
7956
|
+
* // "containerId": "my_containerId",
|
|
7957
|
+
* // "containerVersionId": "my_containerVersionId",
|
|
7958
|
+
* // "deleted": false,
|
|
7959
|
+
* // "fingerprint": "my_fingerprint",
|
|
7960
|
+
* // "folder": [],
|
|
7961
|
+
* // "name": "my_name",
|
|
7962
|
+
* // "notes": "my_notes",
|
|
7963
|
+
* // "tag": [],
|
|
7964
|
+
* // "trigger": [],
|
|
7965
|
+
* // "variable": []
|
|
7966
|
+
* // }
|
|
7967
|
+
* }
|
|
7968
|
+
*
|
|
7969
|
+
* main().catch(e => {
|
|
7970
|
+
* console.error(e);
|
|
7971
|
+
* throw e;
|
|
7972
|
+
* });
|
|
7973
|
+
*
|
|
7974
|
+
* ```
|
|
5280
7975
|
*
|
|
5281
7976
|
* @param params - Parameters for request
|
|
5282
7977
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5368,6 +8063,69 @@ export namespace tagmanager_v1 {
|
|
|
5368
8063
|
|
|
5369
8064
|
/**
|
|
5370
8065
|
* Undeletes a Container Version.
|
|
8066
|
+
* @example
|
|
8067
|
+
* ```js
|
|
8068
|
+
* // Before running the sample:
|
|
8069
|
+
* // - Enable the API at:
|
|
8070
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
8071
|
+
* // - Login into gcloud by running:
|
|
8072
|
+
* // ```sh
|
|
8073
|
+
* // $ gcloud auth application-default login
|
|
8074
|
+
* // ```
|
|
8075
|
+
* // - Install the npm module by running:
|
|
8076
|
+
* // ```sh
|
|
8077
|
+
* // $ npm install googleapis
|
|
8078
|
+
* // ```
|
|
8079
|
+
*
|
|
8080
|
+
* const {google} = require('googleapis');
|
|
8081
|
+
* const tagmanager = google.tagmanager('v1');
|
|
8082
|
+
*
|
|
8083
|
+
* async function main() {
|
|
8084
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8085
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8086
|
+
* scopes: [
|
|
8087
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containerversions',
|
|
8088
|
+
* ],
|
|
8089
|
+
* });
|
|
8090
|
+
*
|
|
8091
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8092
|
+
* const authClient = await auth.getClient();
|
|
8093
|
+
* google.options({auth: authClient});
|
|
8094
|
+
*
|
|
8095
|
+
* // Do the magic
|
|
8096
|
+
* const res = await tagmanager.accounts.containers.versions.undelete({
|
|
8097
|
+
* // The GTM Account ID.
|
|
8098
|
+
* accountId: 'placeholder-value',
|
|
8099
|
+
* // The GTM Container ID.
|
|
8100
|
+
* containerId: 'placeholder-value',
|
|
8101
|
+
* // The GTM Container Version ID.
|
|
8102
|
+
* containerVersionId: 'placeholder-value',
|
|
8103
|
+
* });
|
|
8104
|
+
* console.log(res.data);
|
|
8105
|
+
*
|
|
8106
|
+
* // Example response
|
|
8107
|
+
* // {
|
|
8108
|
+
* // "accountId": "my_accountId",
|
|
8109
|
+
* // "container": {},
|
|
8110
|
+
* // "containerId": "my_containerId",
|
|
8111
|
+
* // "containerVersionId": "my_containerVersionId",
|
|
8112
|
+
* // "deleted": false,
|
|
8113
|
+
* // "fingerprint": "my_fingerprint",
|
|
8114
|
+
* // "folder": [],
|
|
8115
|
+
* // "name": "my_name",
|
|
8116
|
+
* // "notes": "my_notes",
|
|
8117
|
+
* // "tag": [],
|
|
8118
|
+
* // "trigger": [],
|
|
8119
|
+
* // "variable": []
|
|
8120
|
+
* // }
|
|
8121
|
+
* }
|
|
8122
|
+
*
|
|
8123
|
+
* main().catch(e => {
|
|
8124
|
+
* console.error(e);
|
|
8125
|
+
* throw e;
|
|
8126
|
+
* });
|
|
8127
|
+
*
|
|
8128
|
+
* ```
|
|
5371
8129
|
*
|
|
5372
8130
|
* @param params - Parameters for request
|
|
5373
8131
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5459,6 +8217,90 @@ export namespace tagmanager_v1 {
|
|
|
5459
8217
|
|
|
5460
8218
|
/**
|
|
5461
8219
|
* Updates a Container Version.
|
|
8220
|
+
* @example
|
|
8221
|
+
* ```js
|
|
8222
|
+
* // Before running the sample:
|
|
8223
|
+
* // - Enable the API at:
|
|
8224
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
8225
|
+
* // - Login into gcloud by running:
|
|
8226
|
+
* // ```sh
|
|
8227
|
+
* // $ gcloud auth application-default login
|
|
8228
|
+
* // ```
|
|
8229
|
+
* // - Install the npm module by running:
|
|
8230
|
+
* // ```sh
|
|
8231
|
+
* // $ npm install googleapis
|
|
8232
|
+
* // ```
|
|
8233
|
+
*
|
|
8234
|
+
* const {google} = require('googleapis');
|
|
8235
|
+
* const tagmanager = google.tagmanager('v1');
|
|
8236
|
+
*
|
|
8237
|
+
* async function main() {
|
|
8238
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8239
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8240
|
+
* scopes: [
|
|
8241
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containerversions',
|
|
8242
|
+
* ],
|
|
8243
|
+
* });
|
|
8244
|
+
*
|
|
8245
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8246
|
+
* const authClient = await auth.getClient();
|
|
8247
|
+
* google.options({auth: authClient});
|
|
8248
|
+
*
|
|
8249
|
+
* // Do the magic
|
|
8250
|
+
* const res = await tagmanager.accounts.containers.versions.update({
|
|
8251
|
+
* // The GTM Account ID.
|
|
8252
|
+
* accountId: 'placeholder-value',
|
|
8253
|
+
* // The GTM Container ID.
|
|
8254
|
+
* containerId: 'placeholder-value',
|
|
8255
|
+
* // The GTM Container Version ID.
|
|
8256
|
+
* containerVersionId: 'placeholder-value',
|
|
8257
|
+
* // When provided, this fingerprint must match the fingerprint of the container version in storage.
|
|
8258
|
+
* fingerprint: 'placeholder-value',
|
|
8259
|
+
*
|
|
8260
|
+
* // Request body metadata
|
|
8261
|
+
* requestBody: {
|
|
8262
|
+
* // request body parameters
|
|
8263
|
+
* // {
|
|
8264
|
+
* // "accountId": "my_accountId",
|
|
8265
|
+
* // "container": {},
|
|
8266
|
+
* // "containerId": "my_containerId",
|
|
8267
|
+
* // "containerVersionId": "my_containerVersionId",
|
|
8268
|
+
* // "deleted": false,
|
|
8269
|
+
* // "fingerprint": "my_fingerprint",
|
|
8270
|
+
* // "folder": [],
|
|
8271
|
+
* // "name": "my_name",
|
|
8272
|
+
* // "notes": "my_notes",
|
|
8273
|
+
* // "tag": [],
|
|
8274
|
+
* // "trigger": [],
|
|
8275
|
+
* // "variable": []
|
|
8276
|
+
* // }
|
|
8277
|
+
* },
|
|
8278
|
+
* });
|
|
8279
|
+
* console.log(res.data);
|
|
8280
|
+
*
|
|
8281
|
+
* // Example response
|
|
8282
|
+
* // {
|
|
8283
|
+
* // "accountId": "my_accountId",
|
|
8284
|
+
* // "container": {},
|
|
8285
|
+
* // "containerId": "my_containerId",
|
|
8286
|
+
* // "containerVersionId": "my_containerVersionId",
|
|
8287
|
+
* // "deleted": false,
|
|
8288
|
+
* // "fingerprint": "my_fingerprint",
|
|
8289
|
+
* // "folder": [],
|
|
8290
|
+
* // "name": "my_name",
|
|
8291
|
+
* // "notes": "my_notes",
|
|
8292
|
+
* // "tag": [],
|
|
8293
|
+
* // "trigger": [],
|
|
8294
|
+
* // "variable": []
|
|
8295
|
+
* // }
|
|
8296
|
+
* }
|
|
8297
|
+
*
|
|
8298
|
+
* main().catch(e => {
|
|
8299
|
+
* console.error(e);
|
|
8300
|
+
* throw e;
|
|
8301
|
+
* });
|
|
8302
|
+
*
|
|
8303
|
+
* ```
|
|
5462
8304
|
*
|
|
5463
8305
|
* @param params - Parameters for request
|
|
5464
8306
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5696,6 +8538,68 @@ export namespace tagmanager_v1 {
|
|
|
5696
8538
|
|
|
5697
8539
|
/**
|
|
5698
8540
|
* Creates a user's Account & Container Permissions.
|
|
8541
|
+
* @example
|
|
8542
|
+
* ```js
|
|
8543
|
+
* // Before running the sample:
|
|
8544
|
+
* // - Enable the API at:
|
|
8545
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
8546
|
+
* // - Login into gcloud by running:
|
|
8547
|
+
* // ```sh
|
|
8548
|
+
* // $ gcloud auth application-default login
|
|
8549
|
+
* // ```
|
|
8550
|
+
* // - Install the npm module by running:
|
|
8551
|
+
* // ```sh
|
|
8552
|
+
* // $ npm install googleapis
|
|
8553
|
+
* // ```
|
|
8554
|
+
*
|
|
8555
|
+
* const {google} = require('googleapis');
|
|
8556
|
+
* const tagmanager = google.tagmanager('v1');
|
|
8557
|
+
*
|
|
8558
|
+
* async function main() {
|
|
8559
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8560
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8561
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.manage.users'],
|
|
8562
|
+
* });
|
|
8563
|
+
*
|
|
8564
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8565
|
+
* const authClient = await auth.getClient();
|
|
8566
|
+
* google.options({auth: authClient});
|
|
8567
|
+
*
|
|
8568
|
+
* // Do the magic
|
|
8569
|
+
* const res = await tagmanager.accounts.permissions.create({
|
|
8570
|
+
* // The GTM Account ID.
|
|
8571
|
+
* accountId: 'placeholder-value',
|
|
8572
|
+
*
|
|
8573
|
+
* // Request body metadata
|
|
8574
|
+
* requestBody: {
|
|
8575
|
+
* // request body parameters
|
|
8576
|
+
* // {
|
|
8577
|
+
* // "accountAccess": {},
|
|
8578
|
+
* // "accountId": "my_accountId",
|
|
8579
|
+
* // "containerAccess": [],
|
|
8580
|
+
* // "emailAddress": "my_emailAddress",
|
|
8581
|
+
* // "permissionId": "my_permissionId"
|
|
8582
|
+
* // }
|
|
8583
|
+
* },
|
|
8584
|
+
* });
|
|
8585
|
+
* console.log(res.data);
|
|
8586
|
+
*
|
|
8587
|
+
* // Example response
|
|
8588
|
+
* // {
|
|
8589
|
+
* // "accountAccess": {},
|
|
8590
|
+
* // "accountId": "my_accountId",
|
|
8591
|
+
* // "containerAccess": [],
|
|
8592
|
+
* // "emailAddress": "my_emailAddress",
|
|
8593
|
+
* // "permissionId": "my_permissionId"
|
|
8594
|
+
* // }
|
|
8595
|
+
* }
|
|
8596
|
+
*
|
|
8597
|
+
* main().catch(e => {
|
|
8598
|
+
* console.error(e);
|
|
8599
|
+
* throw e;
|
|
8600
|
+
* });
|
|
8601
|
+
*
|
|
8602
|
+
* ```
|
|
5699
8603
|
*
|
|
5700
8604
|
* @param params - Parameters for request
|
|
5701
8605
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5786,6 +8690,49 @@ export namespace tagmanager_v1 {
|
|
|
5786
8690
|
|
|
5787
8691
|
/**
|
|
5788
8692
|
* Removes a user from the account, revoking access to it and all of its containers.
|
|
8693
|
+
* @example
|
|
8694
|
+
* ```js
|
|
8695
|
+
* // Before running the sample:
|
|
8696
|
+
* // - Enable the API at:
|
|
8697
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
8698
|
+
* // - Login into gcloud by running:
|
|
8699
|
+
* // ```sh
|
|
8700
|
+
* // $ gcloud auth application-default login
|
|
8701
|
+
* // ```
|
|
8702
|
+
* // - Install the npm module by running:
|
|
8703
|
+
* // ```sh
|
|
8704
|
+
* // $ npm install googleapis
|
|
8705
|
+
* // ```
|
|
8706
|
+
*
|
|
8707
|
+
* const {google} = require('googleapis');
|
|
8708
|
+
* const tagmanager = google.tagmanager('v1');
|
|
8709
|
+
*
|
|
8710
|
+
* async function main() {
|
|
8711
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8712
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8713
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.manage.users'],
|
|
8714
|
+
* });
|
|
8715
|
+
*
|
|
8716
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8717
|
+
* const authClient = await auth.getClient();
|
|
8718
|
+
* google.options({auth: authClient});
|
|
8719
|
+
*
|
|
8720
|
+
* // Do the magic
|
|
8721
|
+
* const res = await tagmanager.accounts.permissions.delete({
|
|
8722
|
+
* // The GTM Account ID.
|
|
8723
|
+
* accountId: 'placeholder-value',
|
|
8724
|
+
* // The GTM User ID.
|
|
8725
|
+
* permissionId: 'placeholder-value',
|
|
8726
|
+
* });
|
|
8727
|
+
* console.log(res.data);
|
|
8728
|
+
* }
|
|
8729
|
+
*
|
|
8730
|
+
* main().catch(e => {
|
|
8731
|
+
* console.error(e);
|
|
8732
|
+
* throw e;
|
|
8733
|
+
* });
|
|
8734
|
+
*
|
|
8735
|
+
* ```
|
|
5789
8736
|
*
|
|
5790
8737
|
* @param params - Parameters for request
|
|
5791
8738
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5875,6 +8822,58 @@ export namespace tagmanager_v1 {
|
|
|
5875
8822
|
|
|
5876
8823
|
/**
|
|
5877
8824
|
* Gets a user's Account & Container Permissions.
|
|
8825
|
+
* @example
|
|
8826
|
+
* ```js
|
|
8827
|
+
* // Before running the sample:
|
|
8828
|
+
* // - Enable the API at:
|
|
8829
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
8830
|
+
* // - Login into gcloud by running:
|
|
8831
|
+
* // ```sh
|
|
8832
|
+
* // $ gcloud auth application-default login
|
|
8833
|
+
* // ```
|
|
8834
|
+
* // - Install the npm module by running:
|
|
8835
|
+
* // ```sh
|
|
8836
|
+
* // $ npm install googleapis
|
|
8837
|
+
* // ```
|
|
8838
|
+
*
|
|
8839
|
+
* const {google} = require('googleapis');
|
|
8840
|
+
* const tagmanager = google.tagmanager('v1');
|
|
8841
|
+
*
|
|
8842
|
+
* async function main() {
|
|
8843
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8844
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8845
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.manage.users'],
|
|
8846
|
+
* });
|
|
8847
|
+
*
|
|
8848
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8849
|
+
* const authClient = await auth.getClient();
|
|
8850
|
+
* google.options({auth: authClient});
|
|
8851
|
+
*
|
|
8852
|
+
* // Do the magic
|
|
8853
|
+
* const res = await tagmanager.accounts.permissions.get({
|
|
8854
|
+
* // The GTM Account ID.
|
|
8855
|
+
* accountId: 'placeholder-value',
|
|
8856
|
+
* // The GTM User ID.
|
|
8857
|
+
* permissionId: 'placeholder-value',
|
|
8858
|
+
* });
|
|
8859
|
+
* console.log(res.data);
|
|
8860
|
+
*
|
|
8861
|
+
* // Example response
|
|
8862
|
+
* // {
|
|
8863
|
+
* // "accountAccess": {},
|
|
8864
|
+
* // "accountId": "my_accountId",
|
|
8865
|
+
* // "containerAccess": [],
|
|
8866
|
+
* // "emailAddress": "my_emailAddress",
|
|
8867
|
+
* // "permissionId": "my_permissionId"
|
|
8868
|
+
* // }
|
|
8869
|
+
* }
|
|
8870
|
+
*
|
|
8871
|
+
* main().catch(e => {
|
|
8872
|
+
* console.error(e);
|
|
8873
|
+
* throw e;
|
|
8874
|
+
* });
|
|
8875
|
+
*
|
|
8876
|
+
* ```
|
|
5878
8877
|
*
|
|
5879
8878
|
* @param params - Parameters for request
|
|
5880
8879
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5966,6 +8965,52 @@ export namespace tagmanager_v1 {
|
|
|
5966
8965
|
|
|
5967
8966
|
/**
|
|
5968
8967
|
* List all users that have access to the account along with Account and Container Permissions granted to each of them.
|
|
8968
|
+
* @example
|
|
8969
|
+
* ```js
|
|
8970
|
+
* // Before running the sample:
|
|
8971
|
+
* // - Enable the API at:
|
|
8972
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
8973
|
+
* // - Login into gcloud by running:
|
|
8974
|
+
* // ```sh
|
|
8975
|
+
* // $ gcloud auth application-default login
|
|
8976
|
+
* // ```
|
|
8977
|
+
* // - Install the npm module by running:
|
|
8978
|
+
* // ```sh
|
|
8979
|
+
* // $ npm install googleapis
|
|
8980
|
+
* // ```
|
|
8981
|
+
*
|
|
8982
|
+
* const {google} = require('googleapis');
|
|
8983
|
+
* const tagmanager = google.tagmanager('v1');
|
|
8984
|
+
*
|
|
8985
|
+
* async function main() {
|
|
8986
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8987
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8988
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.manage.users'],
|
|
8989
|
+
* });
|
|
8990
|
+
*
|
|
8991
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8992
|
+
* const authClient = await auth.getClient();
|
|
8993
|
+
* google.options({auth: authClient});
|
|
8994
|
+
*
|
|
8995
|
+
* // Do the magic
|
|
8996
|
+
* const res = await tagmanager.accounts.permissions.list({
|
|
8997
|
+
* // The GTM Account ID.
|
|
8998
|
+
* accountId: 'placeholder-value',
|
|
8999
|
+
* });
|
|
9000
|
+
* console.log(res.data);
|
|
9001
|
+
*
|
|
9002
|
+
* // Example response
|
|
9003
|
+
* // {
|
|
9004
|
+
* // "userAccess": []
|
|
9005
|
+
* // }
|
|
9006
|
+
* }
|
|
9007
|
+
*
|
|
9008
|
+
* main().catch(e => {
|
|
9009
|
+
* console.error(e);
|
|
9010
|
+
* throw e;
|
|
9011
|
+
* });
|
|
9012
|
+
*
|
|
9013
|
+
* ```
|
|
5969
9014
|
*
|
|
5970
9015
|
* @param params - Parameters for request
|
|
5971
9016
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6058,6 +9103,70 @@ export namespace tagmanager_v1 {
|
|
|
6058
9103
|
|
|
6059
9104
|
/**
|
|
6060
9105
|
* Updates a user's Account & Container Permissions.
|
|
9106
|
+
* @example
|
|
9107
|
+
* ```js
|
|
9108
|
+
* // Before running the sample:
|
|
9109
|
+
* // - Enable the API at:
|
|
9110
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
9111
|
+
* // - Login into gcloud by running:
|
|
9112
|
+
* // ```sh
|
|
9113
|
+
* // $ gcloud auth application-default login
|
|
9114
|
+
* // ```
|
|
9115
|
+
* // - Install the npm module by running:
|
|
9116
|
+
* // ```sh
|
|
9117
|
+
* // $ npm install googleapis
|
|
9118
|
+
* // ```
|
|
9119
|
+
*
|
|
9120
|
+
* const {google} = require('googleapis');
|
|
9121
|
+
* const tagmanager = google.tagmanager('v1');
|
|
9122
|
+
*
|
|
9123
|
+
* async function main() {
|
|
9124
|
+
* const auth = new google.auth.GoogleAuth({
|
|
9125
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
9126
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.manage.users'],
|
|
9127
|
+
* });
|
|
9128
|
+
*
|
|
9129
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
9130
|
+
* const authClient = await auth.getClient();
|
|
9131
|
+
* google.options({auth: authClient});
|
|
9132
|
+
*
|
|
9133
|
+
* // Do the magic
|
|
9134
|
+
* const res = await tagmanager.accounts.permissions.update({
|
|
9135
|
+
* // The GTM Account ID.
|
|
9136
|
+
* accountId: 'placeholder-value',
|
|
9137
|
+
* // The GTM User ID.
|
|
9138
|
+
* permissionId: 'placeholder-value',
|
|
9139
|
+
*
|
|
9140
|
+
* // Request body metadata
|
|
9141
|
+
* requestBody: {
|
|
9142
|
+
* // request body parameters
|
|
9143
|
+
* // {
|
|
9144
|
+
* // "accountAccess": {},
|
|
9145
|
+
* // "accountId": "my_accountId",
|
|
9146
|
+
* // "containerAccess": [],
|
|
9147
|
+
* // "emailAddress": "my_emailAddress",
|
|
9148
|
+
* // "permissionId": "my_permissionId"
|
|
9149
|
+
* // }
|
|
9150
|
+
* },
|
|
9151
|
+
* });
|
|
9152
|
+
* console.log(res.data);
|
|
9153
|
+
*
|
|
9154
|
+
* // Example response
|
|
9155
|
+
* // {
|
|
9156
|
+
* // "accountAccess": {},
|
|
9157
|
+
* // "accountId": "my_accountId",
|
|
9158
|
+
* // "containerAccess": [],
|
|
9159
|
+
* // "emailAddress": "my_emailAddress",
|
|
9160
|
+
* // "permissionId": "my_permissionId"
|
|
9161
|
+
* // }
|
|
9162
|
+
* }
|
|
9163
|
+
*
|
|
9164
|
+
* main().catch(e => {
|
|
9165
|
+
* console.error(e);
|
|
9166
|
+
* throw e;
|
|
9167
|
+
* });
|
|
9168
|
+
*
|
|
9169
|
+
* ```
|
|
6061
9170
|
*
|
|
6062
9171
|
* @param params - Parameters for request
|
|
6063
9172
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|