@googleapis/tagmanager 11.0.1 → 12.0.1
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 +27 -0
- package/build/v1.d.ts +3109 -0
- package/build/v1.js.map +1 -1
- package/build/v2.d.ts +6417 -6
- package/build/v2.js.map +1 -1
- package/package.json +1 -1
- package/v1.ts +3109 -0
- package/v2.ts +6417 -6
package/build/v1.d.ts
CHANGED
|
@@ -818,6 +818,59 @@ export declare namespace tagmanager_v1 {
|
|
|
818
818
|
constructor(context: APIRequestContext);
|
|
819
819
|
/**
|
|
820
820
|
* Gets a GTM Account.
|
|
821
|
+
* @example
|
|
822
|
+
* ```js
|
|
823
|
+
* // Before running the sample:
|
|
824
|
+
* // - Enable the API at:
|
|
825
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
826
|
+
* // - Login into gcloud by running:
|
|
827
|
+
* // ```sh
|
|
828
|
+
* // $ gcloud auth application-default login
|
|
829
|
+
* // ```
|
|
830
|
+
* // - Install the npm module by running:
|
|
831
|
+
* // ```sh
|
|
832
|
+
* // $ npm install googleapis
|
|
833
|
+
* // ```
|
|
834
|
+
*
|
|
835
|
+
* const {google} = require('googleapis');
|
|
836
|
+
* const tagmanager = google.tagmanager('v1');
|
|
837
|
+
*
|
|
838
|
+
* async function main() {
|
|
839
|
+
* const auth = new google.auth.GoogleAuth({
|
|
840
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
841
|
+
* scopes: [
|
|
842
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
843
|
+
* 'https://www.googleapis.com/auth/tagmanager.manage.accounts',
|
|
844
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
845
|
+
* ],
|
|
846
|
+
* });
|
|
847
|
+
*
|
|
848
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
849
|
+
* const authClient = await auth.getClient();
|
|
850
|
+
* google.options({auth: authClient});
|
|
851
|
+
*
|
|
852
|
+
* // Do the magic
|
|
853
|
+
* const res = await tagmanager.accounts.get({
|
|
854
|
+
* // The GTM Account ID.
|
|
855
|
+
* accountId: 'placeholder-value',
|
|
856
|
+
* });
|
|
857
|
+
* console.log(res.data);
|
|
858
|
+
*
|
|
859
|
+
* // Example response
|
|
860
|
+
* // {
|
|
861
|
+
* // "accountId": "my_accountId",
|
|
862
|
+
* // "fingerprint": "my_fingerprint",
|
|
863
|
+
* // "name": "my_name",
|
|
864
|
+
* // "shareData": false
|
|
865
|
+
* // }
|
|
866
|
+
* }
|
|
867
|
+
*
|
|
868
|
+
* main().catch(e => {
|
|
869
|
+
* console.error(e);
|
|
870
|
+
* throw e;
|
|
871
|
+
* });
|
|
872
|
+
*
|
|
873
|
+
* ```
|
|
821
874
|
*
|
|
822
875
|
* @param params - Parameters for request
|
|
823
876
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -832,6 +885,53 @@ export declare namespace tagmanager_v1 {
|
|
|
832
885
|
get(callback: BodyResponseCallback<Schema$Account>): void;
|
|
833
886
|
/**
|
|
834
887
|
* Lists all GTM Accounts that a user has access to.
|
|
888
|
+
* @example
|
|
889
|
+
* ```js
|
|
890
|
+
* // Before running the sample:
|
|
891
|
+
* // - Enable the API at:
|
|
892
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
893
|
+
* // - Login into gcloud by running:
|
|
894
|
+
* // ```sh
|
|
895
|
+
* // $ gcloud auth application-default login
|
|
896
|
+
* // ```
|
|
897
|
+
* // - Install the npm module by running:
|
|
898
|
+
* // ```sh
|
|
899
|
+
* // $ npm install googleapis
|
|
900
|
+
* // ```
|
|
901
|
+
*
|
|
902
|
+
* const {google} = require('googleapis');
|
|
903
|
+
* const tagmanager = google.tagmanager('v1');
|
|
904
|
+
*
|
|
905
|
+
* async function main() {
|
|
906
|
+
* const auth = new google.auth.GoogleAuth({
|
|
907
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
908
|
+
* scopes: [
|
|
909
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
910
|
+
* 'https://www.googleapis.com/auth/tagmanager.manage.accounts',
|
|
911
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
912
|
+
* ],
|
|
913
|
+
* });
|
|
914
|
+
*
|
|
915
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
916
|
+
* const authClient = await auth.getClient();
|
|
917
|
+
* google.options({auth: authClient});
|
|
918
|
+
*
|
|
919
|
+
* // Do the magic
|
|
920
|
+
* const res = await tagmanager.accounts.list({});
|
|
921
|
+
* console.log(res.data);
|
|
922
|
+
*
|
|
923
|
+
* // Example response
|
|
924
|
+
* // {
|
|
925
|
+
* // "accounts": []
|
|
926
|
+
* // }
|
|
927
|
+
* }
|
|
928
|
+
*
|
|
929
|
+
* main().catch(e => {
|
|
930
|
+
* console.error(e);
|
|
931
|
+
* throw e;
|
|
932
|
+
* });
|
|
933
|
+
*
|
|
934
|
+
* ```
|
|
835
935
|
*
|
|
836
936
|
* @param params - Parameters for request
|
|
837
937
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -846,6 +946,68 @@ export declare namespace tagmanager_v1 {
|
|
|
846
946
|
list(callback: BodyResponseCallback<Schema$ListAccountsResponse>): void;
|
|
847
947
|
/**
|
|
848
948
|
* Updates a GTM Account.
|
|
949
|
+
* @example
|
|
950
|
+
* ```js
|
|
951
|
+
* // Before running the sample:
|
|
952
|
+
* // - Enable the API at:
|
|
953
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
954
|
+
* // - Login into gcloud by running:
|
|
955
|
+
* // ```sh
|
|
956
|
+
* // $ gcloud auth application-default login
|
|
957
|
+
* // ```
|
|
958
|
+
* // - Install the npm module by running:
|
|
959
|
+
* // ```sh
|
|
960
|
+
* // $ npm install googleapis
|
|
961
|
+
* // ```
|
|
962
|
+
*
|
|
963
|
+
* const {google} = require('googleapis');
|
|
964
|
+
* const tagmanager = google.tagmanager('v1');
|
|
965
|
+
*
|
|
966
|
+
* async function main() {
|
|
967
|
+
* const auth = new google.auth.GoogleAuth({
|
|
968
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
969
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.manage.accounts'],
|
|
970
|
+
* });
|
|
971
|
+
*
|
|
972
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
973
|
+
* const authClient = await auth.getClient();
|
|
974
|
+
* google.options({auth: authClient});
|
|
975
|
+
*
|
|
976
|
+
* // Do the magic
|
|
977
|
+
* const res = await tagmanager.accounts.update({
|
|
978
|
+
* // The GTM Account ID.
|
|
979
|
+
* accountId: 'placeholder-value',
|
|
980
|
+
* // When provided, this fingerprint must match the fingerprint of the account in storage.
|
|
981
|
+
* fingerprint: 'placeholder-value',
|
|
982
|
+
*
|
|
983
|
+
* // Request body metadata
|
|
984
|
+
* requestBody: {
|
|
985
|
+
* // request body parameters
|
|
986
|
+
* // {
|
|
987
|
+
* // "accountId": "my_accountId",
|
|
988
|
+
* // "fingerprint": "my_fingerprint",
|
|
989
|
+
* // "name": "my_name",
|
|
990
|
+
* // "shareData": false
|
|
991
|
+
* // }
|
|
992
|
+
* },
|
|
993
|
+
* });
|
|
994
|
+
* console.log(res.data);
|
|
995
|
+
*
|
|
996
|
+
* // Example response
|
|
997
|
+
* // {
|
|
998
|
+
* // "accountId": "my_accountId",
|
|
999
|
+
* // "fingerprint": "my_fingerprint",
|
|
1000
|
+
* // "name": "my_name",
|
|
1001
|
+
* // "shareData": false
|
|
1002
|
+
* // }
|
|
1003
|
+
* }
|
|
1004
|
+
*
|
|
1005
|
+
* main().catch(e => {
|
|
1006
|
+
* console.error(e);
|
|
1007
|
+
* throw e;
|
|
1008
|
+
* });
|
|
1009
|
+
*
|
|
1010
|
+
* ```
|
|
849
1011
|
*
|
|
850
1012
|
* @param params - Parameters for request
|
|
851
1013
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -894,6 +1056,80 @@ export declare namespace tagmanager_v1 {
|
|
|
894
1056
|
constructor(context: APIRequestContext);
|
|
895
1057
|
/**
|
|
896
1058
|
* Creates a Container.
|
|
1059
|
+
* @example
|
|
1060
|
+
* ```js
|
|
1061
|
+
* // Before running the sample:
|
|
1062
|
+
* // - Enable the API at:
|
|
1063
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
1064
|
+
* // - Login into gcloud by running:
|
|
1065
|
+
* // ```sh
|
|
1066
|
+
* // $ gcloud auth application-default login
|
|
1067
|
+
* // ```
|
|
1068
|
+
* // - Install the npm module by running:
|
|
1069
|
+
* // ```sh
|
|
1070
|
+
* // $ npm install googleapis
|
|
1071
|
+
* // ```
|
|
1072
|
+
*
|
|
1073
|
+
* const {google} = require('googleapis');
|
|
1074
|
+
* const tagmanager = google.tagmanager('v1');
|
|
1075
|
+
*
|
|
1076
|
+
* async function main() {
|
|
1077
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1078
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1079
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
1080
|
+
* });
|
|
1081
|
+
*
|
|
1082
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1083
|
+
* const authClient = await auth.getClient();
|
|
1084
|
+
* google.options({auth: authClient});
|
|
1085
|
+
*
|
|
1086
|
+
* // Do the magic
|
|
1087
|
+
* const res = await tagmanager.accounts.containers.create({
|
|
1088
|
+
* // The GTM Account ID.
|
|
1089
|
+
* accountId: 'placeholder-value',
|
|
1090
|
+
*
|
|
1091
|
+
* // Request body metadata
|
|
1092
|
+
* requestBody: {
|
|
1093
|
+
* // request body parameters
|
|
1094
|
+
* // {
|
|
1095
|
+
* // "accountId": "my_accountId",
|
|
1096
|
+
* // "containerId": "my_containerId",
|
|
1097
|
+
* // "domainName": [],
|
|
1098
|
+
* // "enabledBuiltInVariable": [],
|
|
1099
|
+
* // "fingerprint": "my_fingerprint",
|
|
1100
|
+
* // "name": "my_name",
|
|
1101
|
+
* // "notes": "my_notes",
|
|
1102
|
+
* // "publicId": "my_publicId",
|
|
1103
|
+
* // "timeZoneCountryId": "my_timeZoneCountryId",
|
|
1104
|
+
* // "timeZoneId": "my_timeZoneId",
|
|
1105
|
+
* // "usageContext": []
|
|
1106
|
+
* // }
|
|
1107
|
+
* },
|
|
1108
|
+
* });
|
|
1109
|
+
* console.log(res.data);
|
|
1110
|
+
*
|
|
1111
|
+
* // Example response
|
|
1112
|
+
* // {
|
|
1113
|
+
* // "accountId": "my_accountId",
|
|
1114
|
+
* // "containerId": "my_containerId",
|
|
1115
|
+
* // "domainName": [],
|
|
1116
|
+
* // "enabledBuiltInVariable": [],
|
|
1117
|
+
* // "fingerprint": "my_fingerprint",
|
|
1118
|
+
* // "name": "my_name",
|
|
1119
|
+
* // "notes": "my_notes",
|
|
1120
|
+
* // "publicId": "my_publicId",
|
|
1121
|
+
* // "timeZoneCountryId": "my_timeZoneCountryId",
|
|
1122
|
+
* // "timeZoneId": "my_timeZoneId",
|
|
1123
|
+
* // "usageContext": []
|
|
1124
|
+
* // }
|
|
1125
|
+
* }
|
|
1126
|
+
*
|
|
1127
|
+
* main().catch(e => {
|
|
1128
|
+
* console.error(e);
|
|
1129
|
+
* throw e;
|
|
1130
|
+
* });
|
|
1131
|
+
*
|
|
1132
|
+
* ```
|
|
897
1133
|
*
|
|
898
1134
|
* @param params - Parameters for request
|
|
899
1135
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -908,6 +1144,49 @@ export declare namespace tagmanager_v1 {
|
|
|
908
1144
|
create(callback: BodyResponseCallback<Schema$Container>): void;
|
|
909
1145
|
/**
|
|
910
1146
|
* Deletes a Container.
|
|
1147
|
+
* @example
|
|
1148
|
+
* ```js
|
|
1149
|
+
* // Before running the sample:
|
|
1150
|
+
* // - Enable the API at:
|
|
1151
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
1152
|
+
* // - Login into gcloud by running:
|
|
1153
|
+
* // ```sh
|
|
1154
|
+
* // $ gcloud auth application-default login
|
|
1155
|
+
* // ```
|
|
1156
|
+
* // - Install the npm module by running:
|
|
1157
|
+
* // ```sh
|
|
1158
|
+
* // $ npm install googleapis
|
|
1159
|
+
* // ```
|
|
1160
|
+
*
|
|
1161
|
+
* const {google} = require('googleapis');
|
|
1162
|
+
* const tagmanager = google.tagmanager('v1');
|
|
1163
|
+
*
|
|
1164
|
+
* async function main() {
|
|
1165
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1166
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1167
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.delete.containers'],
|
|
1168
|
+
* });
|
|
1169
|
+
*
|
|
1170
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1171
|
+
* const authClient = await auth.getClient();
|
|
1172
|
+
* google.options({auth: authClient});
|
|
1173
|
+
*
|
|
1174
|
+
* // Do the magic
|
|
1175
|
+
* const res = await tagmanager.accounts.containers.delete({
|
|
1176
|
+
* // The GTM Account ID.
|
|
1177
|
+
* accountId: 'placeholder-value',
|
|
1178
|
+
* // The GTM Container ID.
|
|
1179
|
+
* containerId: 'placeholder-value',
|
|
1180
|
+
* });
|
|
1181
|
+
* console.log(res.data);
|
|
1182
|
+
* }
|
|
1183
|
+
*
|
|
1184
|
+
* main().catch(e => {
|
|
1185
|
+
* console.error(e);
|
|
1186
|
+
* throw e;
|
|
1187
|
+
* });
|
|
1188
|
+
*
|
|
1189
|
+
* ```
|
|
911
1190
|
*
|
|
912
1191
|
* @param params - Parameters for request
|
|
913
1192
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -922,6 +1201,67 @@ export declare namespace tagmanager_v1 {
|
|
|
922
1201
|
delete(callback: BodyResponseCallback<void>): void;
|
|
923
1202
|
/**
|
|
924
1203
|
* Gets a Container.
|
|
1204
|
+
* @example
|
|
1205
|
+
* ```js
|
|
1206
|
+
* // Before running the sample:
|
|
1207
|
+
* // - Enable the API at:
|
|
1208
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
1209
|
+
* // - Login into gcloud by running:
|
|
1210
|
+
* // ```sh
|
|
1211
|
+
* // $ gcloud auth application-default login
|
|
1212
|
+
* // ```
|
|
1213
|
+
* // - Install the npm module by running:
|
|
1214
|
+
* // ```sh
|
|
1215
|
+
* // $ npm install googleapis
|
|
1216
|
+
* // ```
|
|
1217
|
+
*
|
|
1218
|
+
* const {google} = require('googleapis');
|
|
1219
|
+
* const tagmanager = google.tagmanager('v1');
|
|
1220
|
+
*
|
|
1221
|
+
* async function main() {
|
|
1222
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1223
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1224
|
+
* scopes: [
|
|
1225
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
1226
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
1227
|
+
* ],
|
|
1228
|
+
* });
|
|
1229
|
+
*
|
|
1230
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1231
|
+
* const authClient = await auth.getClient();
|
|
1232
|
+
* google.options({auth: authClient});
|
|
1233
|
+
*
|
|
1234
|
+
* // Do the magic
|
|
1235
|
+
* const res = await tagmanager.accounts.containers.get({
|
|
1236
|
+
* // The GTM Account ID.
|
|
1237
|
+
* accountId: 'placeholder-value',
|
|
1238
|
+
* // The GTM Container ID.
|
|
1239
|
+
* containerId: 'placeholder-value',
|
|
1240
|
+
* });
|
|
1241
|
+
* console.log(res.data);
|
|
1242
|
+
*
|
|
1243
|
+
* // Example response
|
|
1244
|
+
* // {
|
|
1245
|
+
* // "accountId": "my_accountId",
|
|
1246
|
+
* // "containerId": "my_containerId",
|
|
1247
|
+
* // "domainName": [],
|
|
1248
|
+
* // "enabledBuiltInVariable": [],
|
|
1249
|
+
* // "fingerprint": "my_fingerprint",
|
|
1250
|
+
* // "name": "my_name",
|
|
1251
|
+
* // "notes": "my_notes",
|
|
1252
|
+
* // "publicId": "my_publicId",
|
|
1253
|
+
* // "timeZoneCountryId": "my_timeZoneCountryId",
|
|
1254
|
+
* // "timeZoneId": "my_timeZoneId",
|
|
1255
|
+
* // "usageContext": []
|
|
1256
|
+
* // }
|
|
1257
|
+
* }
|
|
1258
|
+
*
|
|
1259
|
+
* main().catch(e => {
|
|
1260
|
+
* console.error(e);
|
|
1261
|
+
* throw e;
|
|
1262
|
+
* });
|
|
1263
|
+
*
|
|
1264
|
+
* ```
|
|
925
1265
|
*
|
|
926
1266
|
* @param params - Parameters for request
|
|
927
1267
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -936,6 +1276,55 @@ export declare namespace tagmanager_v1 {
|
|
|
936
1276
|
get(callback: BodyResponseCallback<Schema$Container>): void;
|
|
937
1277
|
/**
|
|
938
1278
|
* Lists all Containers that belongs to a GTM Account.
|
|
1279
|
+
* @example
|
|
1280
|
+
* ```js
|
|
1281
|
+
* // Before running the sample:
|
|
1282
|
+
* // - Enable the API at:
|
|
1283
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
1284
|
+
* // - Login into gcloud by running:
|
|
1285
|
+
* // ```sh
|
|
1286
|
+
* // $ gcloud auth application-default login
|
|
1287
|
+
* // ```
|
|
1288
|
+
* // - Install the npm module by running:
|
|
1289
|
+
* // ```sh
|
|
1290
|
+
* // $ npm install googleapis
|
|
1291
|
+
* // ```
|
|
1292
|
+
*
|
|
1293
|
+
* const {google} = require('googleapis');
|
|
1294
|
+
* const tagmanager = google.tagmanager('v1');
|
|
1295
|
+
*
|
|
1296
|
+
* async function main() {
|
|
1297
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1298
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1299
|
+
* scopes: [
|
|
1300
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
1301
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
1302
|
+
* ],
|
|
1303
|
+
* });
|
|
1304
|
+
*
|
|
1305
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1306
|
+
* const authClient = await auth.getClient();
|
|
1307
|
+
* google.options({auth: authClient});
|
|
1308
|
+
*
|
|
1309
|
+
* // Do the magic
|
|
1310
|
+
* const res = await tagmanager.accounts.containers.list({
|
|
1311
|
+
* // The GTM Account ID.
|
|
1312
|
+
* accountId: 'placeholder-value',
|
|
1313
|
+
* });
|
|
1314
|
+
* console.log(res.data);
|
|
1315
|
+
*
|
|
1316
|
+
* // Example response
|
|
1317
|
+
* // {
|
|
1318
|
+
* // "containers": []
|
|
1319
|
+
* // }
|
|
1320
|
+
* }
|
|
1321
|
+
*
|
|
1322
|
+
* main().catch(e => {
|
|
1323
|
+
* console.error(e);
|
|
1324
|
+
* throw e;
|
|
1325
|
+
* });
|
|
1326
|
+
*
|
|
1327
|
+
* ```
|
|
939
1328
|
*
|
|
940
1329
|
* @param params - Parameters for request
|
|
941
1330
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -950,6 +1339,84 @@ export declare namespace tagmanager_v1 {
|
|
|
950
1339
|
list(callback: BodyResponseCallback<Schema$ListContainersResponse>): void;
|
|
951
1340
|
/**
|
|
952
1341
|
* Updates a Container.
|
|
1342
|
+
* @example
|
|
1343
|
+
* ```js
|
|
1344
|
+
* // Before running the sample:
|
|
1345
|
+
* // - Enable the API at:
|
|
1346
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
1347
|
+
* // - Login into gcloud by running:
|
|
1348
|
+
* // ```sh
|
|
1349
|
+
* // $ gcloud auth application-default login
|
|
1350
|
+
* // ```
|
|
1351
|
+
* // - Install the npm module by running:
|
|
1352
|
+
* // ```sh
|
|
1353
|
+
* // $ npm install googleapis
|
|
1354
|
+
* // ```
|
|
1355
|
+
*
|
|
1356
|
+
* const {google} = require('googleapis');
|
|
1357
|
+
* const tagmanager = google.tagmanager('v1');
|
|
1358
|
+
*
|
|
1359
|
+
* async function main() {
|
|
1360
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1361
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1362
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
1363
|
+
* });
|
|
1364
|
+
*
|
|
1365
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1366
|
+
* const authClient = await auth.getClient();
|
|
1367
|
+
* google.options({auth: authClient});
|
|
1368
|
+
*
|
|
1369
|
+
* // Do the magic
|
|
1370
|
+
* const res = await tagmanager.accounts.containers.update({
|
|
1371
|
+
* // The GTM Account ID.
|
|
1372
|
+
* accountId: 'placeholder-value',
|
|
1373
|
+
* // The GTM Container ID.
|
|
1374
|
+
* containerId: 'placeholder-value',
|
|
1375
|
+
* // When provided, this fingerprint must match the fingerprint of the container in storage.
|
|
1376
|
+
* fingerprint: 'placeholder-value',
|
|
1377
|
+
*
|
|
1378
|
+
* // Request body metadata
|
|
1379
|
+
* requestBody: {
|
|
1380
|
+
* // request body parameters
|
|
1381
|
+
* // {
|
|
1382
|
+
* // "accountId": "my_accountId",
|
|
1383
|
+
* // "containerId": "my_containerId",
|
|
1384
|
+
* // "domainName": [],
|
|
1385
|
+
* // "enabledBuiltInVariable": [],
|
|
1386
|
+
* // "fingerprint": "my_fingerprint",
|
|
1387
|
+
* // "name": "my_name",
|
|
1388
|
+
* // "notes": "my_notes",
|
|
1389
|
+
* // "publicId": "my_publicId",
|
|
1390
|
+
* // "timeZoneCountryId": "my_timeZoneCountryId",
|
|
1391
|
+
* // "timeZoneId": "my_timeZoneId",
|
|
1392
|
+
* // "usageContext": []
|
|
1393
|
+
* // }
|
|
1394
|
+
* },
|
|
1395
|
+
* });
|
|
1396
|
+
* console.log(res.data);
|
|
1397
|
+
*
|
|
1398
|
+
* // Example response
|
|
1399
|
+
* // {
|
|
1400
|
+
* // "accountId": "my_accountId",
|
|
1401
|
+
* // "containerId": "my_containerId",
|
|
1402
|
+
* // "domainName": [],
|
|
1403
|
+
* // "enabledBuiltInVariable": [],
|
|
1404
|
+
* // "fingerprint": "my_fingerprint",
|
|
1405
|
+
* // "name": "my_name",
|
|
1406
|
+
* // "notes": "my_notes",
|
|
1407
|
+
* // "publicId": "my_publicId",
|
|
1408
|
+
* // "timeZoneCountryId": "my_timeZoneCountryId",
|
|
1409
|
+
* // "timeZoneId": "my_timeZoneId",
|
|
1410
|
+
* // "usageContext": []
|
|
1411
|
+
* // }
|
|
1412
|
+
* }
|
|
1413
|
+
*
|
|
1414
|
+
* main().catch(e => {
|
|
1415
|
+
* console.error(e);
|
|
1416
|
+
* throw e;
|
|
1417
|
+
* });
|
|
1418
|
+
*
|
|
1419
|
+
* ```
|
|
953
1420
|
*
|
|
954
1421
|
* @param params - Parameters for request
|
|
955
1422
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1022,6 +1489,84 @@ export declare namespace tagmanager_v1 {
|
|
|
1022
1489
|
constructor(context: APIRequestContext);
|
|
1023
1490
|
/**
|
|
1024
1491
|
* Creates a GTM Environment.
|
|
1492
|
+
* @example
|
|
1493
|
+
* ```js
|
|
1494
|
+
* // Before running the sample:
|
|
1495
|
+
* // - Enable the API at:
|
|
1496
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
1497
|
+
* // - Login into gcloud by running:
|
|
1498
|
+
* // ```sh
|
|
1499
|
+
* // $ gcloud auth application-default login
|
|
1500
|
+
* // ```
|
|
1501
|
+
* // - Install the npm module by running:
|
|
1502
|
+
* // ```sh
|
|
1503
|
+
* // $ npm install googleapis
|
|
1504
|
+
* // ```
|
|
1505
|
+
*
|
|
1506
|
+
* const {google} = require('googleapis');
|
|
1507
|
+
* const tagmanager = google.tagmanager('v1');
|
|
1508
|
+
*
|
|
1509
|
+
* async function main() {
|
|
1510
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1511
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1512
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
1513
|
+
* });
|
|
1514
|
+
*
|
|
1515
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1516
|
+
* const authClient = await auth.getClient();
|
|
1517
|
+
* google.options({auth: authClient});
|
|
1518
|
+
*
|
|
1519
|
+
* // Do the magic
|
|
1520
|
+
* const res = await tagmanager.accounts.containers.environments.create({
|
|
1521
|
+
* // The GTM Account ID.
|
|
1522
|
+
* accountId: 'placeholder-value',
|
|
1523
|
+
* // The GTM Container ID.
|
|
1524
|
+
* containerId: 'placeholder-value',
|
|
1525
|
+
*
|
|
1526
|
+
* // Request body metadata
|
|
1527
|
+
* requestBody: {
|
|
1528
|
+
* // request body parameters
|
|
1529
|
+
* // {
|
|
1530
|
+
* // "accountId": "my_accountId",
|
|
1531
|
+
* // "authorizationCode": "my_authorizationCode",
|
|
1532
|
+
* // "authorizationTimestampMs": "my_authorizationTimestampMs",
|
|
1533
|
+
* // "containerId": "my_containerId",
|
|
1534
|
+
* // "containerVersionId": "my_containerVersionId",
|
|
1535
|
+
* // "description": "my_description",
|
|
1536
|
+
* // "enableDebug": false,
|
|
1537
|
+
* // "environmentId": "my_environmentId",
|
|
1538
|
+
* // "fingerprint": "my_fingerprint",
|
|
1539
|
+
* // "name": "my_name",
|
|
1540
|
+
* // "type": "my_type",
|
|
1541
|
+
* // "url": "my_url"
|
|
1542
|
+
* // }
|
|
1543
|
+
* },
|
|
1544
|
+
* });
|
|
1545
|
+
* console.log(res.data);
|
|
1546
|
+
*
|
|
1547
|
+
* // Example response
|
|
1548
|
+
* // {
|
|
1549
|
+
* // "accountId": "my_accountId",
|
|
1550
|
+
* // "authorizationCode": "my_authorizationCode",
|
|
1551
|
+
* // "authorizationTimestampMs": "my_authorizationTimestampMs",
|
|
1552
|
+
* // "containerId": "my_containerId",
|
|
1553
|
+
* // "containerVersionId": "my_containerVersionId",
|
|
1554
|
+
* // "description": "my_description",
|
|
1555
|
+
* // "enableDebug": false,
|
|
1556
|
+
* // "environmentId": "my_environmentId",
|
|
1557
|
+
* // "fingerprint": "my_fingerprint",
|
|
1558
|
+
* // "name": "my_name",
|
|
1559
|
+
* // "type": "my_type",
|
|
1560
|
+
* // "url": "my_url"
|
|
1561
|
+
* // }
|
|
1562
|
+
* }
|
|
1563
|
+
*
|
|
1564
|
+
* main().catch(e => {
|
|
1565
|
+
* console.error(e);
|
|
1566
|
+
* throw e;
|
|
1567
|
+
* });
|
|
1568
|
+
*
|
|
1569
|
+
* ```
|
|
1025
1570
|
*
|
|
1026
1571
|
* @param params - Parameters for request
|
|
1027
1572
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1036,6 +1581,51 @@ export declare namespace tagmanager_v1 {
|
|
|
1036
1581
|
create(callback: BodyResponseCallback<Schema$Environment>): void;
|
|
1037
1582
|
/**
|
|
1038
1583
|
* Deletes a GTM Environment.
|
|
1584
|
+
* @example
|
|
1585
|
+
* ```js
|
|
1586
|
+
* // Before running the sample:
|
|
1587
|
+
* // - Enable the API at:
|
|
1588
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
1589
|
+
* // - Login into gcloud by running:
|
|
1590
|
+
* // ```sh
|
|
1591
|
+
* // $ gcloud auth application-default login
|
|
1592
|
+
* // ```
|
|
1593
|
+
* // - Install the npm module by running:
|
|
1594
|
+
* // ```sh
|
|
1595
|
+
* // $ npm install googleapis
|
|
1596
|
+
* // ```
|
|
1597
|
+
*
|
|
1598
|
+
* const {google} = require('googleapis');
|
|
1599
|
+
* const tagmanager = google.tagmanager('v1');
|
|
1600
|
+
*
|
|
1601
|
+
* async function main() {
|
|
1602
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1603
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1604
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
1605
|
+
* });
|
|
1606
|
+
*
|
|
1607
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1608
|
+
* const authClient = await auth.getClient();
|
|
1609
|
+
* google.options({auth: authClient});
|
|
1610
|
+
*
|
|
1611
|
+
* // Do the magic
|
|
1612
|
+
* const res = await tagmanager.accounts.containers.environments.delete({
|
|
1613
|
+
* // The GTM Account ID.
|
|
1614
|
+
* accountId: 'placeholder-value',
|
|
1615
|
+
* // The GTM Container ID.
|
|
1616
|
+
* containerId: 'placeholder-value',
|
|
1617
|
+
* // The GTM Environment ID.
|
|
1618
|
+
* environmentId: 'placeholder-value',
|
|
1619
|
+
* });
|
|
1620
|
+
* console.log(res.data);
|
|
1621
|
+
* }
|
|
1622
|
+
*
|
|
1623
|
+
* main().catch(e => {
|
|
1624
|
+
* console.error(e);
|
|
1625
|
+
* throw e;
|
|
1626
|
+
* });
|
|
1627
|
+
*
|
|
1628
|
+
* ```
|
|
1039
1629
|
*
|
|
1040
1630
|
* @param params - Parameters for request
|
|
1041
1631
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1050,6 +1640,70 @@ export declare namespace tagmanager_v1 {
|
|
|
1050
1640
|
delete(callback: BodyResponseCallback<void>): void;
|
|
1051
1641
|
/**
|
|
1052
1642
|
* Gets a GTM Environment.
|
|
1643
|
+
* @example
|
|
1644
|
+
* ```js
|
|
1645
|
+
* // Before running the sample:
|
|
1646
|
+
* // - Enable the API at:
|
|
1647
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
1648
|
+
* // - Login into gcloud by running:
|
|
1649
|
+
* // ```sh
|
|
1650
|
+
* // $ gcloud auth application-default login
|
|
1651
|
+
* // ```
|
|
1652
|
+
* // - Install the npm module by running:
|
|
1653
|
+
* // ```sh
|
|
1654
|
+
* // $ npm install googleapis
|
|
1655
|
+
* // ```
|
|
1656
|
+
*
|
|
1657
|
+
* const {google} = require('googleapis');
|
|
1658
|
+
* const tagmanager = google.tagmanager('v1');
|
|
1659
|
+
*
|
|
1660
|
+
* async function main() {
|
|
1661
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1662
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1663
|
+
* scopes: [
|
|
1664
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
1665
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
1666
|
+
* ],
|
|
1667
|
+
* });
|
|
1668
|
+
*
|
|
1669
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1670
|
+
* const authClient = await auth.getClient();
|
|
1671
|
+
* google.options({auth: authClient});
|
|
1672
|
+
*
|
|
1673
|
+
* // Do the magic
|
|
1674
|
+
* const res = await tagmanager.accounts.containers.environments.get({
|
|
1675
|
+
* // The GTM Account ID.
|
|
1676
|
+
* accountId: 'placeholder-value',
|
|
1677
|
+
* // The GTM Container ID.
|
|
1678
|
+
* containerId: 'placeholder-value',
|
|
1679
|
+
* // The GTM Environment ID.
|
|
1680
|
+
* environmentId: 'placeholder-value',
|
|
1681
|
+
* });
|
|
1682
|
+
* console.log(res.data);
|
|
1683
|
+
*
|
|
1684
|
+
* // Example response
|
|
1685
|
+
* // {
|
|
1686
|
+
* // "accountId": "my_accountId",
|
|
1687
|
+
* // "authorizationCode": "my_authorizationCode",
|
|
1688
|
+
* // "authorizationTimestampMs": "my_authorizationTimestampMs",
|
|
1689
|
+
* // "containerId": "my_containerId",
|
|
1690
|
+
* // "containerVersionId": "my_containerVersionId",
|
|
1691
|
+
* // "description": "my_description",
|
|
1692
|
+
* // "enableDebug": false,
|
|
1693
|
+
* // "environmentId": "my_environmentId",
|
|
1694
|
+
* // "fingerprint": "my_fingerprint",
|
|
1695
|
+
* // "name": "my_name",
|
|
1696
|
+
* // "type": "my_type",
|
|
1697
|
+
* // "url": "my_url"
|
|
1698
|
+
* // }
|
|
1699
|
+
* }
|
|
1700
|
+
*
|
|
1701
|
+
* main().catch(e => {
|
|
1702
|
+
* console.error(e);
|
|
1703
|
+
* throw e;
|
|
1704
|
+
* });
|
|
1705
|
+
*
|
|
1706
|
+
* ```
|
|
1053
1707
|
*
|
|
1054
1708
|
* @param params - Parameters for request
|
|
1055
1709
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1064,6 +1718,57 @@ export declare namespace tagmanager_v1 {
|
|
|
1064
1718
|
get(callback: BodyResponseCallback<Schema$Environment>): void;
|
|
1065
1719
|
/**
|
|
1066
1720
|
* Lists all GTM Environments of a GTM Container.
|
|
1721
|
+
* @example
|
|
1722
|
+
* ```js
|
|
1723
|
+
* // Before running the sample:
|
|
1724
|
+
* // - Enable the API at:
|
|
1725
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
1726
|
+
* // - Login into gcloud by running:
|
|
1727
|
+
* // ```sh
|
|
1728
|
+
* // $ gcloud auth application-default login
|
|
1729
|
+
* // ```
|
|
1730
|
+
* // - Install the npm module by running:
|
|
1731
|
+
* // ```sh
|
|
1732
|
+
* // $ npm install googleapis
|
|
1733
|
+
* // ```
|
|
1734
|
+
*
|
|
1735
|
+
* const {google} = require('googleapis');
|
|
1736
|
+
* const tagmanager = google.tagmanager('v1');
|
|
1737
|
+
*
|
|
1738
|
+
* async function main() {
|
|
1739
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1740
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1741
|
+
* scopes: [
|
|
1742
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
1743
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
1744
|
+
* ],
|
|
1745
|
+
* });
|
|
1746
|
+
*
|
|
1747
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1748
|
+
* const authClient = await auth.getClient();
|
|
1749
|
+
* google.options({auth: authClient});
|
|
1750
|
+
*
|
|
1751
|
+
* // Do the magic
|
|
1752
|
+
* const res = await tagmanager.accounts.containers.environments.list({
|
|
1753
|
+
* // The GTM Account ID.
|
|
1754
|
+
* accountId: 'placeholder-value',
|
|
1755
|
+
* // The GTM Container ID.
|
|
1756
|
+
* containerId: 'placeholder-value',
|
|
1757
|
+
* });
|
|
1758
|
+
* console.log(res.data);
|
|
1759
|
+
*
|
|
1760
|
+
* // Example response
|
|
1761
|
+
* // {
|
|
1762
|
+
* // "environments": []
|
|
1763
|
+
* // }
|
|
1764
|
+
* }
|
|
1765
|
+
*
|
|
1766
|
+
* main().catch(e => {
|
|
1767
|
+
* console.error(e);
|
|
1768
|
+
* throw e;
|
|
1769
|
+
* });
|
|
1770
|
+
*
|
|
1771
|
+
* ```
|
|
1067
1772
|
*
|
|
1068
1773
|
* @param params - Parameters for request
|
|
1069
1774
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1078,6 +1783,88 @@ export declare namespace tagmanager_v1 {
|
|
|
1078
1783
|
list(callback: BodyResponseCallback<Schema$ListEnvironmentsResponse>): void;
|
|
1079
1784
|
/**
|
|
1080
1785
|
* Updates a GTM Environment.
|
|
1786
|
+
* @example
|
|
1787
|
+
* ```js
|
|
1788
|
+
* // Before running the sample:
|
|
1789
|
+
* // - Enable the API at:
|
|
1790
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
1791
|
+
* // - Login into gcloud by running:
|
|
1792
|
+
* // ```sh
|
|
1793
|
+
* // $ gcloud auth application-default login
|
|
1794
|
+
* // ```
|
|
1795
|
+
* // - Install the npm module by running:
|
|
1796
|
+
* // ```sh
|
|
1797
|
+
* // $ npm install googleapis
|
|
1798
|
+
* // ```
|
|
1799
|
+
*
|
|
1800
|
+
* const {google} = require('googleapis');
|
|
1801
|
+
* const tagmanager = google.tagmanager('v1');
|
|
1802
|
+
*
|
|
1803
|
+
* async function main() {
|
|
1804
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1805
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1806
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
1807
|
+
* });
|
|
1808
|
+
*
|
|
1809
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1810
|
+
* const authClient = await auth.getClient();
|
|
1811
|
+
* google.options({auth: authClient});
|
|
1812
|
+
*
|
|
1813
|
+
* // Do the magic
|
|
1814
|
+
* const res = await tagmanager.accounts.containers.environments.update({
|
|
1815
|
+
* // The GTM Account ID.
|
|
1816
|
+
* accountId: 'placeholder-value',
|
|
1817
|
+
* // The GTM Container ID.
|
|
1818
|
+
* containerId: 'placeholder-value',
|
|
1819
|
+
* // The GTM Environment ID.
|
|
1820
|
+
* environmentId: 'placeholder-value',
|
|
1821
|
+
* // When provided, this fingerprint must match the fingerprint of the environment in storage.
|
|
1822
|
+
* fingerprint: 'placeholder-value',
|
|
1823
|
+
*
|
|
1824
|
+
* // Request body metadata
|
|
1825
|
+
* requestBody: {
|
|
1826
|
+
* // request body parameters
|
|
1827
|
+
* // {
|
|
1828
|
+
* // "accountId": "my_accountId",
|
|
1829
|
+
* // "authorizationCode": "my_authorizationCode",
|
|
1830
|
+
* // "authorizationTimestampMs": "my_authorizationTimestampMs",
|
|
1831
|
+
* // "containerId": "my_containerId",
|
|
1832
|
+
* // "containerVersionId": "my_containerVersionId",
|
|
1833
|
+
* // "description": "my_description",
|
|
1834
|
+
* // "enableDebug": false,
|
|
1835
|
+
* // "environmentId": "my_environmentId",
|
|
1836
|
+
* // "fingerprint": "my_fingerprint",
|
|
1837
|
+
* // "name": "my_name",
|
|
1838
|
+
* // "type": "my_type",
|
|
1839
|
+
* // "url": "my_url"
|
|
1840
|
+
* // }
|
|
1841
|
+
* },
|
|
1842
|
+
* });
|
|
1843
|
+
* console.log(res.data);
|
|
1844
|
+
*
|
|
1845
|
+
* // Example response
|
|
1846
|
+
* // {
|
|
1847
|
+
* // "accountId": "my_accountId",
|
|
1848
|
+
* // "authorizationCode": "my_authorizationCode",
|
|
1849
|
+
* // "authorizationTimestampMs": "my_authorizationTimestampMs",
|
|
1850
|
+
* // "containerId": "my_containerId",
|
|
1851
|
+
* // "containerVersionId": "my_containerVersionId",
|
|
1852
|
+
* // "description": "my_description",
|
|
1853
|
+
* // "enableDebug": false,
|
|
1854
|
+
* // "environmentId": "my_environmentId",
|
|
1855
|
+
* // "fingerprint": "my_fingerprint",
|
|
1856
|
+
* // "name": "my_name",
|
|
1857
|
+
* // "type": "my_type",
|
|
1858
|
+
* // "url": "my_url"
|
|
1859
|
+
* // }
|
|
1860
|
+
* }
|
|
1861
|
+
*
|
|
1862
|
+
* main().catch(e => {
|
|
1863
|
+
* console.error(e);
|
|
1864
|
+
* throw e;
|
|
1865
|
+
* });
|
|
1866
|
+
*
|
|
1867
|
+
* ```
|
|
1081
1868
|
*
|
|
1082
1869
|
* @param params - Parameters for request
|
|
1083
1870
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1171,6 +1958,70 @@ export declare namespace tagmanager_v1 {
|
|
|
1171
1958
|
constructor(context: APIRequestContext);
|
|
1172
1959
|
/**
|
|
1173
1960
|
* Creates a GTM Folder.
|
|
1961
|
+
* @example
|
|
1962
|
+
* ```js
|
|
1963
|
+
* // Before running the sample:
|
|
1964
|
+
* // - Enable the API at:
|
|
1965
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
1966
|
+
* // - Login into gcloud by running:
|
|
1967
|
+
* // ```sh
|
|
1968
|
+
* // $ gcloud auth application-default login
|
|
1969
|
+
* // ```
|
|
1970
|
+
* // - Install the npm module by running:
|
|
1971
|
+
* // ```sh
|
|
1972
|
+
* // $ npm install googleapis
|
|
1973
|
+
* // ```
|
|
1974
|
+
*
|
|
1975
|
+
* const {google} = require('googleapis');
|
|
1976
|
+
* const tagmanager = google.tagmanager('v1');
|
|
1977
|
+
*
|
|
1978
|
+
* async function main() {
|
|
1979
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1980
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1981
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
1982
|
+
* });
|
|
1983
|
+
*
|
|
1984
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1985
|
+
* const authClient = await auth.getClient();
|
|
1986
|
+
* google.options({auth: authClient});
|
|
1987
|
+
*
|
|
1988
|
+
* // Do the magic
|
|
1989
|
+
* const res = await tagmanager.accounts.containers.folders.create({
|
|
1990
|
+
* // The GTM Account ID.
|
|
1991
|
+
* accountId: 'placeholder-value',
|
|
1992
|
+
* // The GTM Container ID.
|
|
1993
|
+
* containerId: 'placeholder-value',
|
|
1994
|
+
*
|
|
1995
|
+
* // Request body metadata
|
|
1996
|
+
* requestBody: {
|
|
1997
|
+
* // request body parameters
|
|
1998
|
+
* // {
|
|
1999
|
+
* // "accountId": "my_accountId",
|
|
2000
|
+
* // "containerId": "my_containerId",
|
|
2001
|
+
* // "fingerprint": "my_fingerprint",
|
|
2002
|
+
* // "folderId": "my_folderId",
|
|
2003
|
+
* // "name": "my_name"
|
|
2004
|
+
* // }
|
|
2005
|
+
* },
|
|
2006
|
+
* });
|
|
2007
|
+
* console.log(res.data);
|
|
2008
|
+
*
|
|
2009
|
+
* // Example response
|
|
2010
|
+
* // {
|
|
2011
|
+
* // "accountId": "my_accountId",
|
|
2012
|
+
* // "containerId": "my_containerId",
|
|
2013
|
+
* // "fingerprint": "my_fingerprint",
|
|
2014
|
+
* // "folderId": "my_folderId",
|
|
2015
|
+
* // "name": "my_name"
|
|
2016
|
+
* // }
|
|
2017
|
+
* }
|
|
2018
|
+
*
|
|
2019
|
+
* main().catch(e => {
|
|
2020
|
+
* console.error(e);
|
|
2021
|
+
* throw e;
|
|
2022
|
+
* });
|
|
2023
|
+
*
|
|
2024
|
+
* ```
|
|
1174
2025
|
*
|
|
1175
2026
|
* @param params - Parameters for request
|
|
1176
2027
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1185,6 +2036,51 @@ export declare namespace tagmanager_v1 {
|
|
|
1185
2036
|
create(callback: BodyResponseCallback<Schema$Folder>): void;
|
|
1186
2037
|
/**
|
|
1187
2038
|
* Deletes a GTM Folder.
|
|
2039
|
+
* @example
|
|
2040
|
+
* ```js
|
|
2041
|
+
* // Before running the sample:
|
|
2042
|
+
* // - Enable the API at:
|
|
2043
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
2044
|
+
* // - Login into gcloud by running:
|
|
2045
|
+
* // ```sh
|
|
2046
|
+
* // $ gcloud auth application-default login
|
|
2047
|
+
* // ```
|
|
2048
|
+
* // - Install the npm module by running:
|
|
2049
|
+
* // ```sh
|
|
2050
|
+
* // $ npm install googleapis
|
|
2051
|
+
* // ```
|
|
2052
|
+
*
|
|
2053
|
+
* const {google} = require('googleapis');
|
|
2054
|
+
* const tagmanager = google.tagmanager('v1');
|
|
2055
|
+
*
|
|
2056
|
+
* async function main() {
|
|
2057
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2058
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2059
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
2060
|
+
* });
|
|
2061
|
+
*
|
|
2062
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2063
|
+
* const authClient = await auth.getClient();
|
|
2064
|
+
* google.options({auth: authClient});
|
|
2065
|
+
*
|
|
2066
|
+
* // Do the magic
|
|
2067
|
+
* const res = await tagmanager.accounts.containers.folders.delete({
|
|
2068
|
+
* // The GTM Account ID.
|
|
2069
|
+
* accountId: 'placeholder-value',
|
|
2070
|
+
* // The GTM Container ID.
|
|
2071
|
+
* containerId: 'placeholder-value',
|
|
2072
|
+
* // The GTM Folder ID.
|
|
2073
|
+
* folderId: 'placeholder-value',
|
|
2074
|
+
* });
|
|
2075
|
+
* console.log(res.data);
|
|
2076
|
+
* }
|
|
2077
|
+
*
|
|
2078
|
+
* main().catch(e => {
|
|
2079
|
+
* console.error(e);
|
|
2080
|
+
* throw e;
|
|
2081
|
+
* });
|
|
2082
|
+
*
|
|
2083
|
+
* ```
|
|
1188
2084
|
*
|
|
1189
2085
|
* @param params - Parameters for request
|
|
1190
2086
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1199,6 +2095,63 @@ export declare namespace tagmanager_v1 {
|
|
|
1199
2095
|
delete(callback: BodyResponseCallback<void>): void;
|
|
1200
2096
|
/**
|
|
1201
2097
|
* Gets a GTM Folder.
|
|
2098
|
+
* @example
|
|
2099
|
+
* ```js
|
|
2100
|
+
* // Before running the sample:
|
|
2101
|
+
* // - Enable the API at:
|
|
2102
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
2103
|
+
* // - Login into gcloud by running:
|
|
2104
|
+
* // ```sh
|
|
2105
|
+
* // $ gcloud auth application-default login
|
|
2106
|
+
* // ```
|
|
2107
|
+
* // - Install the npm module by running:
|
|
2108
|
+
* // ```sh
|
|
2109
|
+
* // $ npm install googleapis
|
|
2110
|
+
* // ```
|
|
2111
|
+
*
|
|
2112
|
+
* const {google} = require('googleapis');
|
|
2113
|
+
* const tagmanager = google.tagmanager('v1');
|
|
2114
|
+
*
|
|
2115
|
+
* async function main() {
|
|
2116
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2117
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2118
|
+
* scopes: [
|
|
2119
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
2120
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
2121
|
+
* ],
|
|
2122
|
+
* });
|
|
2123
|
+
*
|
|
2124
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2125
|
+
* const authClient = await auth.getClient();
|
|
2126
|
+
* google.options({auth: authClient});
|
|
2127
|
+
*
|
|
2128
|
+
* // Do the magic
|
|
2129
|
+
* const res = await tagmanager.accounts.containers.folders.get({
|
|
2130
|
+
* // The GTM Account ID.
|
|
2131
|
+
* accountId: 'placeholder-value',
|
|
2132
|
+
* // The GTM Container ID.
|
|
2133
|
+
* containerId: 'placeholder-value',
|
|
2134
|
+
* // The GTM Folder ID.
|
|
2135
|
+
* folderId: 'placeholder-value',
|
|
2136
|
+
* });
|
|
2137
|
+
* console.log(res.data);
|
|
2138
|
+
*
|
|
2139
|
+
* // Example response
|
|
2140
|
+
* // {
|
|
2141
|
+
* // "accountId": "my_accountId",
|
|
2142
|
+
* // "containerId": "my_containerId",
|
|
2143
|
+
* // "fingerprint": "my_fingerprint",
|
|
2144
|
+
* // "folderId": "my_folderId",
|
|
2145
|
+
* // "name": "my_name"
|
|
2146
|
+
* // }
|
|
2147
|
+
* }
|
|
2148
|
+
*
|
|
2149
|
+
* main().catch(e => {
|
|
2150
|
+
* console.error(e);
|
|
2151
|
+
* throw e;
|
|
2152
|
+
* });
|
|
2153
|
+
*
|
|
2154
|
+
* ```
|
|
1202
2155
|
*
|
|
1203
2156
|
* @param params - Parameters for request
|
|
1204
2157
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1213,6 +2166,57 @@ export declare namespace tagmanager_v1 {
|
|
|
1213
2166
|
get(callback: BodyResponseCallback<Schema$Folder>): void;
|
|
1214
2167
|
/**
|
|
1215
2168
|
* Lists all GTM Folders of a Container.
|
|
2169
|
+
* @example
|
|
2170
|
+
* ```js
|
|
2171
|
+
* // Before running the sample:
|
|
2172
|
+
* // - Enable the API at:
|
|
2173
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
2174
|
+
* // - Login into gcloud by running:
|
|
2175
|
+
* // ```sh
|
|
2176
|
+
* // $ gcloud auth application-default login
|
|
2177
|
+
* // ```
|
|
2178
|
+
* // - Install the npm module by running:
|
|
2179
|
+
* // ```sh
|
|
2180
|
+
* // $ npm install googleapis
|
|
2181
|
+
* // ```
|
|
2182
|
+
*
|
|
2183
|
+
* const {google} = require('googleapis');
|
|
2184
|
+
* const tagmanager = google.tagmanager('v1');
|
|
2185
|
+
*
|
|
2186
|
+
* async function main() {
|
|
2187
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2188
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2189
|
+
* scopes: [
|
|
2190
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
2191
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
2192
|
+
* ],
|
|
2193
|
+
* });
|
|
2194
|
+
*
|
|
2195
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2196
|
+
* const authClient = await auth.getClient();
|
|
2197
|
+
* google.options({auth: authClient});
|
|
2198
|
+
*
|
|
2199
|
+
* // Do the magic
|
|
2200
|
+
* const res = await tagmanager.accounts.containers.folders.list({
|
|
2201
|
+
* // The GTM Account ID.
|
|
2202
|
+
* accountId: 'placeholder-value',
|
|
2203
|
+
* // The GTM Container ID.
|
|
2204
|
+
* containerId: 'placeholder-value',
|
|
2205
|
+
* });
|
|
2206
|
+
* console.log(res.data);
|
|
2207
|
+
*
|
|
2208
|
+
* // Example response
|
|
2209
|
+
* // {
|
|
2210
|
+
* // "folders": []
|
|
2211
|
+
* // }
|
|
2212
|
+
* }
|
|
2213
|
+
*
|
|
2214
|
+
* main().catch(e => {
|
|
2215
|
+
* console.error(e);
|
|
2216
|
+
* throw e;
|
|
2217
|
+
* });
|
|
2218
|
+
*
|
|
2219
|
+
* ```
|
|
1216
2220
|
*
|
|
1217
2221
|
* @param params - Parameters for request
|
|
1218
2222
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1227,6 +2231,74 @@ export declare namespace tagmanager_v1 {
|
|
|
1227
2231
|
list(callback: BodyResponseCallback<Schema$ListFoldersResponse>): void;
|
|
1228
2232
|
/**
|
|
1229
2233
|
* Updates a GTM Folder.
|
|
2234
|
+
* @example
|
|
2235
|
+
* ```js
|
|
2236
|
+
* // Before running the sample:
|
|
2237
|
+
* // - Enable the API at:
|
|
2238
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
2239
|
+
* // - Login into gcloud by running:
|
|
2240
|
+
* // ```sh
|
|
2241
|
+
* // $ gcloud auth application-default login
|
|
2242
|
+
* // ```
|
|
2243
|
+
* // - Install the npm module by running:
|
|
2244
|
+
* // ```sh
|
|
2245
|
+
* // $ npm install googleapis
|
|
2246
|
+
* // ```
|
|
2247
|
+
*
|
|
2248
|
+
* const {google} = require('googleapis');
|
|
2249
|
+
* const tagmanager = google.tagmanager('v1');
|
|
2250
|
+
*
|
|
2251
|
+
* async function main() {
|
|
2252
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2253
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2254
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
2255
|
+
* });
|
|
2256
|
+
*
|
|
2257
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2258
|
+
* const authClient = await auth.getClient();
|
|
2259
|
+
* google.options({auth: authClient});
|
|
2260
|
+
*
|
|
2261
|
+
* // Do the magic
|
|
2262
|
+
* const res = await tagmanager.accounts.containers.folders.update({
|
|
2263
|
+
* // The GTM Account ID.
|
|
2264
|
+
* accountId: 'placeholder-value',
|
|
2265
|
+
* // The GTM Container ID.
|
|
2266
|
+
* containerId: 'placeholder-value',
|
|
2267
|
+
* // When provided, this fingerprint must match the fingerprint of the folder in storage.
|
|
2268
|
+
* fingerprint: 'placeholder-value',
|
|
2269
|
+
* // The GTM Folder ID.
|
|
2270
|
+
* folderId: 'placeholder-value',
|
|
2271
|
+
*
|
|
2272
|
+
* // Request body metadata
|
|
2273
|
+
* requestBody: {
|
|
2274
|
+
* // request body parameters
|
|
2275
|
+
* // {
|
|
2276
|
+
* // "accountId": "my_accountId",
|
|
2277
|
+
* // "containerId": "my_containerId",
|
|
2278
|
+
* // "fingerprint": "my_fingerprint",
|
|
2279
|
+
* // "folderId": "my_folderId",
|
|
2280
|
+
* // "name": "my_name"
|
|
2281
|
+
* // }
|
|
2282
|
+
* },
|
|
2283
|
+
* });
|
|
2284
|
+
* console.log(res.data);
|
|
2285
|
+
*
|
|
2286
|
+
* // Example response
|
|
2287
|
+
* // {
|
|
2288
|
+
* // "accountId": "my_accountId",
|
|
2289
|
+
* // "containerId": "my_containerId",
|
|
2290
|
+
* // "fingerprint": "my_fingerprint",
|
|
2291
|
+
* // "folderId": "my_folderId",
|
|
2292
|
+
* // "name": "my_name"
|
|
2293
|
+
* // }
|
|
2294
|
+
* }
|
|
2295
|
+
*
|
|
2296
|
+
* main().catch(e => {
|
|
2297
|
+
* console.error(e);
|
|
2298
|
+
* throw e;
|
|
2299
|
+
* });
|
|
2300
|
+
*
|
|
2301
|
+
* ```
|
|
1230
2302
|
*
|
|
1231
2303
|
* @param params - Parameters for request
|
|
1232
2304
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1319,6 +2391,61 @@ export declare namespace tagmanager_v1 {
|
|
|
1319
2391
|
constructor(context: APIRequestContext);
|
|
1320
2392
|
/**
|
|
1321
2393
|
* List all entities in a GTM Folder.
|
|
2394
|
+
* @example
|
|
2395
|
+
* ```js
|
|
2396
|
+
* // Before running the sample:
|
|
2397
|
+
* // - Enable the API at:
|
|
2398
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
2399
|
+
* // - Login into gcloud by running:
|
|
2400
|
+
* // ```sh
|
|
2401
|
+
* // $ gcloud auth application-default login
|
|
2402
|
+
* // ```
|
|
2403
|
+
* // - Install the npm module by running:
|
|
2404
|
+
* // ```sh
|
|
2405
|
+
* // $ npm install googleapis
|
|
2406
|
+
* // ```
|
|
2407
|
+
*
|
|
2408
|
+
* const {google} = require('googleapis');
|
|
2409
|
+
* const tagmanager = google.tagmanager('v1');
|
|
2410
|
+
*
|
|
2411
|
+
* async function main() {
|
|
2412
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2413
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2414
|
+
* scopes: [
|
|
2415
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
2416
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
2417
|
+
* ],
|
|
2418
|
+
* });
|
|
2419
|
+
*
|
|
2420
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2421
|
+
* const authClient = await auth.getClient();
|
|
2422
|
+
* google.options({auth: authClient});
|
|
2423
|
+
*
|
|
2424
|
+
* // Do the magic
|
|
2425
|
+
* const res = await tagmanager.accounts.containers.folders.entities.list({
|
|
2426
|
+
* // The GTM Account ID.
|
|
2427
|
+
* accountId: 'placeholder-value',
|
|
2428
|
+
* // The GTM Container ID.
|
|
2429
|
+
* containerId: 'placeholder-value',
|
|
2430
|
+
* // The GTM Folder ID.
|
|
2431
|
+
* folderId: 'placeholder-value',
|
|
2432
|
+
* });
|
|
2433
|
+
* console.log(res.data);
|
|
2434
|
+
*
|
|
2435
|
+
* // Example response
|
|
2436
|
+
* // {
|
|
2437
|
+
* // "tag": [],
|
|
2438
|
+
* // "trigger": [],
|
|
2439
|
+
* // "variable": []
|
|
2440
|
+
* // }
|
|
2441
|
+
* }
|
|
2442
|
+
*
|
|
2443
|
+
* main().catch(e => {
|
|
2444
|
+
* console.error(e);
|
|
2445
|
+
* throw e;
|
|
2446
|
+
* });
|
|
2447
|
+
*
|
|
2448
|
+
* ```
|
|
1322
2449
|
*
|
|
1323
2450
|
* @param params - Parameters for request
|
|
1324
2451
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1351,6 +2478,69 @@ export declare namespace tagmanager_v1 {
|
|
|
1351
2478
|
constructor(context: APIRequestContext);
|
|
1352
2479
|
/**
|
|
1353
2480
|
* Moves entities to a GTM Folder.
|
|
2481
|
+
* @example
|
|
2482
|
+
* ```js
|
|
2483
|
+
* // Before running the sample:
|
|
2484
|
+
* // - Enable the API at:
|
|
2485
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
2486
|
+
* // - Login into gcloud by running:
|
|
2487
|
+
* // ```sh
|
|
2488
|
+
* // $ gcloud auth application-default login
|
|
2489
|
+
* // ```
|
|
2490
|
+
* // - Install the npm module by running:
|
|
2491
|
+
* // ```sh
|
|
2492
|
+
* // $ npm install googleapis
|
|
2493
|
+
* // ```
|
|
2494
|
+
*
|
|
2495
|
+
* const {google} = require('googleapis');
|
|
2496
|
+
* const tagmanager = google.tagmanager('v1');
|
|
2497
|
+
*
|
|
2498
|
+
* async function main() {
|
|
2499
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2500
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2501
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
2502
|
+
* });
|
|
2503
|
+
*
|
|
2504
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2505
|
+
* const authClient = await auth.getClient();
|
|
2506
|
+
* google.options({auth: authClient});
|
|
2507
|
+
*
|
|
2508
|
+
* // Do the magic
|
|
2509
|
+
* const res = await tagmanager.accounts.containers.move_folders.update({
|
|
2510
|
+
* // The GTM Account ID.
|
|
2511
|
+
* accountId: 'placeholder-value',
|
|
2512
|
+
* // The GTM Container ID.
|
|
2513
|
+
* containerId: 'placeholder-value',
|
|
2514
|
+
* // The GTM Folder ID.
|
|
2515
|
+
* folderId: 'placeholder-value',
|
|
2516
|
+
* // The tags to be moved to the folder.
|
|
2517
|
+
* tagId: 'placeholder-value',
|
|
2518
|
+
* // The triggers to be moved to the folder.
|
|
2519
|
+
* triggerId: 'placeholder-value',
|
|
2520
|
+
* // The variables to be moved to the folder.
|
|
2521
|
+
* variableId: 'placeholder-value',
|
|
2522
|
+
*
|
|
2523
|
+
* // Request body metadata
|
|
2524
|
+
* requestBody: {
|
|
2525
|
+
* // request body parameters
|
|
2526
|
+
* // {
|
|
2527
|
+
* // "accountId": "my_accountId",
|
|
2528
|
+
* // "containerId": "my_containerId",
|
|
2529
|
+
* // "fingerprint": "my_fingerprint",
|
|
2530
|
+
* // "folderId": "my_folderId",
|
|
2531
|
+
* // "name": "my_name"
|
|
2532
|
+
* // }
|
|
2533
|
+
* },
|
|
2534
|
+
* });
|
|
2535
|
+
* console.log(res.data);
|
|
2536
|
+
* }
|
|
2537
|
+
*
|
|
2538
|
+
* main().catch(e => {
|
|
2539
|
+
* console.error(e);
|
|
2540
|
+
* throw e;
|
|
2541
|
+
* });
|
|
2542
|
+
*
|
|
2543
|
+
* ```
|
|
1354
2544
|
*
|
|
1355
2545
|
* @param params - Parameters for request
|
|
1356
2546
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1399,6 +2589,87 @@ export declare namespace tagmanager_v1 {
|
|
|
1399
2589
|
constructor(context: APIRequestContext);
|
|
1400
2590
|
/**
|
|
1401
2591
|
* Re-generates the authorization code for a GTM Environment.
|
|
2592
|
+
* @example
|
|
2593
|
+
* ```js
|
|
2594
|
+
* // Before running the sample:
|
|
2595
|
+
* // - Enable the API at:
|
|
2596
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
2597
|
+
* // - Login into gcloud by running:
|
|
2598
|
+
* // ```sh
|
|
2599
|
+
* // $ gcloud auth application-default login
|
|
2600
|
+
* // ```
|
|
2601
|
+
* // - Install the npm module by running:
|
|
2602
|
+
* // ```sh
|
|
2603
|
+
* // $ npm install googleapis
|
|
2604
|
+
* // ```
|
|
2605
|
+
*
|
|
2606
|
+
* const {google} = require('googleapis');
|
|
2607
|
+
* const tagmanager = google.tagmanager('v1');
|
|
2608
|
+
*
|
|
2609
|
+
* async function main() {
|
|
2610
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2611
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2612
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.publish'],
|
|
2613
|
+
* });
|
|
2614
|
+
*
|
|
2615
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2616
|
+
* const authClient = await auth.getClient();
|
|
2617
|
+
* google.options({auth: authClient});
|
|
2618
|
+
*
|
|
2619
|
+
* // Do the magic
|
|
2620
|
+
* const res =
|
|
2621
|
+
* await tagmanager.accounts.containers.reauthorize_environments.update({
|
|
2622
|
+
* // The GTM Account ID.
|
|
2623
|
+
* accountId: 'placeholder-value',
|
|
2624
|
+
* // The GTM Container ID.
|
|
2625
|
+
* containerId: 'placeholder-value',
|
|
2626
|
+
* // The GTM Environment ID.
|
|
2627
|
+
* environmentId: 'placeholder-value',
|
|
2628
|
+
*
|
|
2629
|
+
* // Request body metadata
|
|
2630
|
+
* requestBody: {
|
|
2631
|
+
* // request body parameters
|
|
2632
|
+
* // {
|
|
2633
|
+
* // "accountId": "my_accountId",
|
|
2634
|
+
* // "authorizationCode": "my_authorizationCode",
|
|
2635
|
+
* // "authorizationTimestampMs": "my_authorizationTimestampMs",
|
|
2636
|
+
* // "containerId": "my_containerId",
|
|
2637
|
+
* // "containerVersionId": "my_containerVersionId",
|
|
2638
|
+
* // "description": "my_description",
|
|
2639
|
+
* // "enableDebug": false,
|
|
2640
|
+
* // "environmentId": "my_environmentId",
|
|
2641
|
+
* // "fingerprint": "my_fingerprint",
|
|
2642
|
+
* // "name": "my_name",
|
|
2643
|
+
* // "type": "my_type",
|
|
2644
|
+
* // "url": "my_url"
|
|
2645
|
+
* // }
|
|
2646
|
+
* },
|
|
2647
|
+
* });
|
|
2648
|
+
* console.log(res.data);
|
|
2649
|
+
*
|
|
2650
|
+
* // Example response
|
|
2651
|
+
* // {
|
|
2652
|
+
* // "accountId": "my_accountId",
|
|
2653
|
+
* // "authorizationCode": "my_authorizationCode",
|
|
2654
|
+
* // "authorizationTimestampMs": "my_authorizationTimestampMs",
|
|
2655
|
+
* // "containerId": "my_containerId",
|
|
2656
|
+
* // "containerVersionId": "my_containerVersionId",
|
|
2657
|
+
* // "description": "my_description",
|
|
2658
|
+
* // "enableDebug": false,
|
|
2659
|
+
* // "environmentId": "my_environmentId",
|
|
2660
|
+
* // "fingerprint": "my_fingerprint",
|
|
2661
|
+
* // "name": "my_name",
|
|
2662
|
+
* // "type": "my_type",
|
|
2663
|
+
* // "url": "my_url"
|
|
2664
|
+
* // }
|
|
2665
|
+
* }
|
|
2666
|
+
*
|
|
2667
|
+
* main().catch(e => {
|
|
2668
|
+
* console.error(e);
|
|
2669
|
+
* throw e;
|
|
2670
|
+
* });
|
|
2671
|
+
*
|
|
2672
|
+
* ```
|
|
1402
2673
|
*
|
|
1403
2674
|
* @param params - Parameters for request
|
|
1404
2675
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1435,6 +2706,98 @@ export declare namespace tagmanager_v1 {
|
|
|
1435
2706
|
constructor(context: APIRequestContext);
|
|
1436
2707
|
/**
|
|
1437
2708
|
* Creates a GTM Tag.
|
|
2709
|
+
* @example
|
|
2710
|
+
* ```js
|
|
2711
|
+
* // Before running the sample:
|
|
2712
|
+
* // - Enable the API at:
|
|
2713
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
2714
|
+
* // - Login into gcloud by running:
|
|
2715
|
+
* // ```sh
|
|
2716
|
+
* // $ gcloud auth application-default login
|
|
2717
|
+
* // ```
|
|
2718
|
+
* // - Install the npm module by running:
|
|
2719
|
+
* // ```sh
|
|
2720
|
+
* // $ npm install googleapis
|
|
2721
|
+
* // ```
|
|
2722
|
+
*
|
|
2723
|
+
* const {google} = require('googleapis');
|
|
2724
|
+
* const tagmanager = google.tagmanager('v1');
|
|
2725
|
+
*
|
|
2726
|
+
* async function main() {
|
|
2727
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2728
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2729
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
2730
|
+
* });
|
|
2731
|
+
*
|
|
2732
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2733
|
+
* const authClient = await auth.getClient();
|
|
2734
|
+
* google.options({auth: authClient});
|
|
2735
|
+
*
|
|
2736
|
+
* // Do the magic
|
|
2737
|
+
* const res = await tagmanager.accounts.containers.tags.create({
|
|
2738
|
+
* // The GTM Account ID.
|
|
2739
|
+
* accountId: 'placeholder-value',
|
|
2740
|
+
* // The GTM Container ID.
|
|
2741
|
+
* containerId: 'placeholder-value',
|
|
2742
|
+
*
|
|
2743
|
+
* // Request body metadata
|
|
2744
|
+
* requestBody: {
|
|
2745
|
+
* // request body parameters
|
|
2746
|
+
* // {
|
|
2747
|
+
* // "accountId": "my_accountId",
|
|
2748
|
+
* // "blockingTriggerId": [],
|
|
2749
|
+
* // "containerId": "my_containerId",
|
|
2750
|
+
* // "fingerprint": "my_fingerprint",
|
|
2751
|
+
* // "firingTriggerId": [],
|
|
2752
|
+
* // "liveOnly": false,
|
|
2753
|
+
* // "name": "my_name",
|
|
2754
|
+
* // "notes": "my_notes",
|
|
2755
|
+
* // "parameter": [],
|
|
2756
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
2757
|
+
* // "paused": false,
|
|
2758
|
+
* // "priority": {},
|
|
2759
|
+
* // "scheduleEndMs": "my_scheduleEndMs",
|
|
2760
|
+
* // "scheduleStartMs": "my_scheduleStartMs",
|
|
2761
|
+
* // "setupTag": [],
|
|
2762
|
+
* // "tagFiringOption": "my_tagFiringOption",
|
|
2763
|
+
* // "tagId": "my_tagId",
|
|
2764
|
+
* // "teardownTag": [],
|
|
2765
|
+
* // "type": "my_type"
|
|
2766
|
+
* // }
|
|
2767
|
+
* },
|
|
2768
|
+
* });
|
|
2769
|
+
* console.log(res.data);
|
|
2770
|
+
*
|
|
2771
|
+
* // Example response
|
|
2772
|
+
* // {
|
|
2773
|
+
* // "accountId": "my_accountId",
|
|
2774
|
+
* // "blockingTriggerId": [],
|
|
2775
|
+
* // "containerId": "my_containerId",
|
|
2776
|
+
* // "fingerprint": "my_fingerprint",
|
|
2777
|
+
* // "firingTriggerId": [],
|
|
2778
|
+
* // "liveOnly": false,
|
|
2779
|
+
* // "name": "my_name",
|
|
2780
|
+
* // "notes": "my_notes",
|
|
2781
|
+
* // "parameter": [],
|
|
2782
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
2783
|
+
* // "paused": false,
|
|
2784
|
+
* // "priority": {},
|
|
2785
|
+
* // "scheduleEndMs": "my_scheduleEndMs",
|
|
2786
|
+
* // "scheduleStartMs": "my_scheduleStartMs",
|
|
2787
|
+
* // "setupTag": [],
|
|
2788
|
+
* // "tagFiringOption": "my_tagFiringOption",
|
|
2789
|
+
* // "tagId": "my_tagId",
|
|
2790
|
+
* // "teardownTag": [],
|
|
2791
|
+
* // "type": "my_type"
|
|
2792
|
+
* // }
|
|
2793
|
+
* }
|
|
2794
|
+
*
|
|
2795
|
+
* main().catch(e => {
|
|
2796
|
+
* console.error(e);
|
|
2797
|
+
* throw e;
|
|
2798
|
+
* });
|
|
2799
|
+
*
|
|
2800
|
+
* ```
|
|
1438
2801
|
*
|
|
1439
2802
|
* @param params - Parameters for request
|
|
1440
2803
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1449,6 +2812,51 @@ export declare namespace tagmanager_v1 {
|
|
|
1449
2812
|
create(callback: BodyResponseCallback<Schema$Tag>): void;
|
|
1450
2813
|
/**
|
|
1451
2814
|
* Deletes a GTM Tag.
|
|
2815
|
+
* @example
|
|
2816
|
+
* ```js
|
|
2817
|
+
* // Before running the sample:
|
|
2818
|
+
* // - Enable the API at:
|
|
2819
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
2820
|
+
* // - Login into gcloud by running:
|
|
2821
|
+
* // ```sh
|
|
2822
|
+
* // $ gcloud auth application-default login
|
|
2823
|
+
* // ```
|
|
2824
|
+
* // - Install the npm module by running:
|
|
2825
|
+
* // ```sh
|
|
2826
|
+
* // $ npm install googleapis
|
|
2827
|
+
* // ```
|
|
2828
|
+
*
|
|
2829
|
+
* const {google} = require('googleapis');
|
|
2830
|
+
* const tagmanager = google.tagmanager('v1');
|
|
2831
|
+
*
|
|
2832
|
+
* async function main() {
|
|
2833
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2834
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2835
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
2836
|
+
* });
|
|
2837
|
+
*
|
|
2838
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2839
|
+
* const authClient = await auth.getClient();
|
|
2840
|
+
* google.options({auth: authClient});
|
|
2841
|
+
*
|
|
2842
|
+
* // Do the magic
|
|
2843
|
+
* const res = await tagmanager.accounts.containers.tags.delete({
|
|
2844
|
+
* // The GTM Account ID.
|
|
2845
|
+
* accountId: 'placeholder-value',
|
|
2846
|
+
* // The GTM Container ID.
|
|
2847
|
+
* containerId: 'placeholder-value',
|
|
2848
|
+
* // The GTM Tag ID.
|
|
2849
|
+
* tagId: 'placeholder-value',
|
|
2850
|
+
* });
|
|
2851
|
+
* console.log(res.data);
|
|
2852
|
+
* }
|
|
2853
|
+
*
|
|
2854
|
+
* main().catch(e => {
|
|
2855
|
+
* console.error(e);
|
|
2856
|
+
* throw e;
|
|
2857
|
+
* });
|
|
2858
|
+
*
|
|
2859
|
+
* ```
|
|
1452
2860
|
*
|
|
1453
2861
|
* @param params - Parameters for request
|
|
1454
2862
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1463,6 +2871,77 @@ export declare namespace tagmanager_v1 {
|
|
|
1463
2871
|
delete(callback: BodyResponseCallback<void>): void;
|
|
1464
2872
|
/**
|
|
1465
2873
|
* Gets a GTM Tag.
|
|
2874
|
+
* @example
|
|
2875
|
+
* ```js
|
|
2876
|
+
* // Before running the sample:
|
|
2877
|
+
* // - Enable the API at:
|
|
2878
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
2879
|
+
* // - Login into gcloud by running:
|
|
2880
|
+
* // ```sh
|
|
2881
|
+
* // $ gcloud auth application-default login
|
|
2882
|
+
* // ```
|
|
2883
|
+
* // - Install the npm module by running:
|
|
2884
|
+
* // ```sh
|
|
2885
|
+
* // $ npm install googleapis
|
|
2886
|
+
* // ```
|
|
2887
|
+
*
|
|
2888
|
+
* const {google} = require('googleapis');
|
|
2889
|
+
* const tagmanager = google.tagmanager('v1');
|
|
2890
|
+
*
|
|
2891
|
+
* async function main() {
|
|
2892
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2893
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2894
|
+
* scopes: [
|
|
2895
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
2896
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
2897
|
+
* ],
|
|
2898
|
+
* });
|
|
2899
|
+
*
|
|
2900
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2901
|
+
* const authClient = await auth.getClient();
|
|
2902
|
+
* google.options({auth: authClient});
|
|
2903
|
+
*
|
|
2904
|
+
* // Do the magic
|
|
2905
|
+
* const res = await tagmanager.accounts.containers.tags.get({
|
|
2906
|
+
* // The GTM Account ID.
|
|
2907
|
+
* accountId: 'placeholder-value',
|
|
2908
|
+
* // The GTM Container ID.
|
|
2909
|
+
* containerId: 'placeholder-value',
|
|
2910
|
+
* // The GTM Tag ID.
|
|
2911
|
+
* tagId: 'placeholder-value',
|
|
2912
|
+
* });
|
|
2913
|
+
* console.log(res.data);
|
|
2914
|
+
*
|
|
2915
|
+
* // Example response
|
|
2916
|
+
* // {
|
|
2917
|
+
* // "accountId": "my_accountId",
|
|
2918
|
+
* // "blockingTriggerId": [],
|
|
2919
|
+
* // "containerId": "my_containerId",
|
|
2920
|
+
* // "fingerprint": "my_fingerprint",
|
|
2921
|
+
* // "firingTriggerId": [],
|
|
2922
|
+
* // "liveOnly": false,
|
|
2923
|
+
* // "name": "my_name",
|
|
2924
|
+
* // "notes": "my_notes",
|
|
2925
|
+
* // "parameter": [],
|
|
2926
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
2927
|
+
* // "paused": false,
|
|
2928
|
+
* // "priority": {},
|
|
2929
|
+
* // "scheduleEndMs": "my_scheduleEndMs",
|
|
2930
|
+
* // "scheduleStartMs": "my_scheduleStartMs",
|
|
2931
|
+
* // "setupTag": [],
|
|
2932
|
+
* // "tagFiringOption": "my_tagFiringOption",
|
|
2933
|
+
* // "tagId": "my_tagId",
|
|
2934
|
+
* // "teardownTag": [],
|
|
2935
|
+
* // "type": "my_type"
|
|
2936
|
+
* // }
|
|
2937
|
+
* }
|
|
2938
|
+
*
|
|
2939
|
+
* main().catch(e => {
|
|
2940
|
+
* console.error(e);
|
|
2941
|
+
* throw e;
|
|
2942
|
+
* });
|
|
2943
|
+
*
|
|
2944
|
+
* ```
|
|
1466
2945
|
*
|
|
1467
2946
|
* @param params - Parameters for request
|
|
1468
2947
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1477,6 +2956,57 @@ export declare namespace tagmanager_v1 {
|
|
|
1477
2956
|
get(callback: BodyResponseCallback<Schema$Tag>): void;
|
|
1478
2957
|
/**
|
|
1479
2958
|
* Lists all GTM Tags of a Container.
|
|
2959
|
+
* @example
|
|
2960
|
+
* ```js
|
|
2961
|
+
* // Before running the sample:
|
|
2962
|
+
* // - Enable the API at:
|
|
2963
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
2964
|
+
* // - Login into gcloud by running:
|
|
2965
|
+
* // ```sh
|
|
2966
|
+
* // $ gcloud auth application-default login
|
|
2967
|
+
* // ```
|
|
2968
|
+
* // - Install the npm module by running:
|
|
2969
|
+
* // ```sh
|
|
2970
|
+
* // $ npm install googleapis
|
|
2971
|
+
* // ```
|
|
2972
|
+
*
|
|
2973
|
+
* const {google} = require('googleapis');
|
|
2974
|
+
* const tagmanager = google.tagmanager('v1');
|
|
2975
|
+
*
|
|
2976
|
+
* async function main() {
|
|
2977
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2978
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2979
|
+
* scopes: [
|
|
2980
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
2981
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
2982
|
+
* ],
|
|
2983
|
+
* });
|
|
2984
|
+
*
|
|
2985
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2986
|
+
* const authClient = await auth.getClient();
|
|
2987
|
+
* google.options({auth: authClient});
|
|
2988
|
+
*
|
|
2989
|
+
* // Do the magic
|
|
2990
|
+
* const res = await tagmanager.accounts.containers.tags.list({
|
|
2991
|
+
* // The GTM Account ID.
|
|
2992
|
+
* accountId: 'placeholder-value',
|
|
2993
|
+
* // The GTM Container ID.
|
|
2994
|
+
* containerId: 'placeholder-value',
|
|
2995
|
+
* });
|
|
2996
|
+
* console.log(res.data);
|
|
2997
|
+
*
|
|
2998
|
+
* // Example response
|
|
2999
|
+
* // {
|
|
3000
|
+
* // "tags": []
|
|
3001
|
+
* // }
|
|
3002
|
+
* }
|
|
3003
|
+
*
|
|
3004
|
+
* main().catch(e => {
|
|
3005
|
+
* console.error(e);
|
|
3006
|
+
* throw e;
|
|
3007
|
+
* });
|
|
3008
|
+
*
|
|
3009
|
+
* ```
|
|
1480
3010
|
*
|
|
1481
3011
|
* @param params - Parameters for request
|
|
1482
3012
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1491,6 +3021,102 @@ export declare namespace tagmanager_v1 {
|
|
|
1491
3021
|
list(callback: BodyResponseCallback<Schema$ListTagsResponse>): void;
|
|
1492
3022
|
/**
|
|
1493
3023
|
* Updates a GTM Tag.
|
|
3024
|
+
* @example
|
|
3025
|
+
* ```js
|
|
3026
|
+
* // Before running the sample:
|
|
3027
|
+
* // - Enable the API at:
|
|
3028
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
3029
|
+
* // - Login into gcloud by running:
|
|
3030
|
+
* // ```sh
|
|
3031
|
+
* // $ gcloud auth application-default login
|
|
3032
|
+
* // ```
|
|
3033
|
+
* // - Install the npm module by running:
|
|
3034
|
+
* // ```sh
|
|
3035
|
+
* // $ npm install googleapis
|
|
3036
|
+
* // ```
|
|
3037
|
+
*
|
|
3038
|
+
* const {google} = require('googleapis');
|
|
3039
|
+
* const tagmanager = google.tagmanager('v1');
|
|
3040
|
+
*
|
|
3041
|
+
* async function main() {
|
|
3042
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3043
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3044
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
3045
|
+
* });
|
|
3046
|
+
*
|
|
3047
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3048
|
+
* const authClient = await auth.getClient();
|
|
3049
|
+
* google.options({auth: authClient});
|
|
3050
|
+
*
|
|
3051
|
+
* // Do the magic
|
|
3052
|
+
* const res = await tagmanager.accounts.containers.tags.update({
|
|
3053
|
+
* // The GTM Account ID.
|
|
3054
|
+
* accountId: 'placeholder-value',
|
|
3055
|
+
* // The GTM Container ID.
|
|
3056
|
+
* containerId: 'placeholder-value',
|
|
3057
|
+
* // When provided, this fingerprint must match the fingerprint of the tag in storage.
|
|
3058
|
+
* fingerprint: 'placeholder-value',
|
|
3059
|
+
* // The GTM Tag ID.
|
|
3060
|
+
* tagId: 'placeholder-value',
|
|
3061
|
+
*
|
|
3062
|
+
* // Request body metadata
|
|
3063
|
+
* requestBody: {
|
|
3064
|
+
* // request body parameters
|
|
3065
|
+
* // {
|
|
3066
|
+
* // "accountId": "my_accountId",
|
|
3067
|
+
* // "blockingTriggerId": [],
|
|
3068
|
+
* // "containerId": "my_containerId",
|
|
3069
|
+
* // "fingerprint": "my_fingerprint",
|
|
3070
|
+
* // "firingTriggerId": [],
|
|
3071
|
+
* // "liveOnly": false,
|
|
3072
|
+
* // "name": "my_name",
|
|
3073
|
+
* // "notes": "my_notes",
|
|
3074
|
+
* // "parameter": [],
|
|
3075
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
3076
|
+
* // "paused": false,
|
|
3077
|
+
* // "priority": {},
|
|
3078
|
+
* // "scheduleEndMs": "my_scheduleEndMs",
|
|
3079
|
+
* // "scheduleStartMs": "my_scheduleStartMs",
|
|
3080
|
+
* // "setupTag": [],
|
|
3081
|
+
* // "tagFiringOption": "my_tagFiringOption",
|
|
3082
|
+
* // "tagId": "my_tagId",
|
|
3083
|
+
* // "teardownTag": [],
|
|
3084
|
+
* // "type": "my_type"
|
|
3085
|
+
* // }
|
|
3086
|
+
* },
|
|
3087
|
+
* });
|
|
3088
|
+
* console.log(res.data);
|
|
3089
|
+
*
|
|
3090
|
+
* // Example response
|
|
3091
|
+
* // {
|
|
3092
|
+
* // "accountId": "my_accountId",
|
|
3093
|
+
* // "blockingTriggerId": [],
|
|
3094
|
+
* // "containerId": "my_containerId",
|
|
3095
|
+
* // "fingerprint": "my_fingerprint",
|
|
3096
|
+
* // "firingTriggerId": [],
|
|
3097
|
+
* // "liveOnly": false,
|
|
3098
|
+
* // "name": "my_name",
|
|
3099
|
+
* // "notes": "my_notes",
|
|
3100
|
+
* // "parameter": [],
|
|
3101
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
3102
|
+
* // "paused": false,
|
|
3103
|
+
* // "priority": {},
|
|
3104
|
+
* // "scheduleEndMs": "my_scheduleEndMs",
|
|
3105
|
+
* // "scheduleStartMs": "my_scheduleStartMs",
|
|
3106
|
+
* // "setupTag": [],
|
|
3107
|
+
* // "tagFiringOption": "my_tagFiringOption",
|
|
3108
|
+
* // "tagId": "my_tagId",
|
|
3109
|
+
* // "teardownTag": [],
|
|
3110
|
+
* // "type": "my_type"
|
|
3111
|
+
* // }
|
|
3112
|
+
* }
|
|
3113
|
+
*
|
|
3114
|
+
* main().catch(e => {
|
|
3115
|
+
* console.error(e);
|
|
3116
|
+
* throw e;
|
|
3117
|
+
* });
|
|
3118
|
+
*
|
|
3119
|
+
* ```
|
|
1494
3120
|
*
|
|
1495
3121
|
* @param params - Parameters for request
|
|
1496
3122
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1583,6 +3209,116 @@ export declare namespace tagmanager_v1 {
|
|
|
1583
3209
|
constructor(context: APIRequestContext);
|
|
1584
3210
|
/**
|
|
1585
3211
|
* Creates a GTM Trigger.
|
|
3212
|
+
* @example
|
|
3213
|
+
* ```js
|
|
3214
|
+
* // Before running the sample:
|
|
3215
|
+
* // - Enable the API at:
|
|
3216
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
3217
|
+
* // - Login into gcloud by running:
|
|
3218
|
+
* // ```sh
|
|
3219
|
+
* // $ gcloud auth application-default login
|
|
3220
|
+
* // ```
|
|
3221
|
+
* // - Install the npm module by running:
|
|
3222
|
+
* // ```sh
|
|
3223
|
+
* // $ npm install googleapis
|
|
3224
|
+
* // ```
|
|
3225
|
+
*
|
|
3226
|
+
* const {google} = require('googleapis');
|
|
3227
|
+
* const tagmanager = google.tagmanager('v1');
|
|
3228
|
+
*
|
|
3229
|
+
* async function main() {
|
|
3230
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3231
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3232
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
3233
|
+
* });
|
|
3234
|
+
*
|
|
3235
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3236
|
+
* const authClient = await auth.getClient();
|
|
3237
|
+
* google.options({auth: authClient});
|
|
3238
|
+
*
|
|
3239
|
+
* // Do the magic
|
|
3240
|
+
* const res = await tagmanager.accounts.containers.triggers.create({
|
|
3241
|
+
* // The GTM Account ID.
|
|
3242
|
+
* accountId: 'placeholder-value',
|
|
3243
|
+
* // The GTM Container ID.
|
|
3244
|
+
* containerId: 'placeholder-value',
|
|
3245
|
+
*
|
|
3246
|
+
* // Request body metadata
|
|
3247
|
+
* requestBody: {
|
|
3248
|
+
* // request body parameters
|
|
3249
|
+
* // {
|
|
3250
|
+
* // "accountId": "my_accountId",
|
|
3251
|
+
* // "autoEventFilter": [],
|
|
3252
|
+
* // "checkValidation": {},
|
|
3253
|
+
* // "containerId": "my_containerId",
|
|
3254
|
+
* // "continuousTimeMinMilliseconds": {},
|
|
3255
|
+
* // "customEventFilter": [],
|
|
3256
|
+
* // "eventName": {},
|
|
3257
|
+
* // "filter": [],
|
|
3258
|
+
* // "fingerprint": "my_fingerprint",
|
|
3259
|
+
* // "horizontalScrollPercentageList": {},
|
|
3260
|
+
* // "interval": {},
|
|
3261
|
+
* // "intervalSeconds": {},
|
|
3262
|
+
* // "limit": {},
|
|
3263
|
+
* // "maxTimerLengthSeconds": {},
|
|
3264
|
+
* // "name": "my_name",
|
|
3265
|
+
* // "parameter": [],
|
|
3266
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
3267
|
+
* // "selector": {},
|
|
3268
|
+
* // "totalTimeMinMilliseconds": {},
|
|
3269
|
+
* // "triggerId": "my_triggerId",
|
|
3270
|
+
* // "type": "my_type",
|
|
3271
|
+
* // "uniqueTriggerId": {},
|
|
3272
|
+
* // "verticalScrollPercentageList": {},
|
|
3273
|
+
* // "visibilitySelector": {},
|
|
3274
|
+
* // "visiblePercentageMax": {},
|
|
3275
|
+
* // "visiblePercentageMin": {},
|
|
3276
|
+
* // "waitForTags": {},
|
|
3277
|
+
* // "waitForTagsTimeout": {}
|
|
3278
|
+
* // }
|
|
3279
|
+
* },
|
|
3280
|
+
* });
|
|
3281
|
+
* console.log(res.data);
|
|
3282
|
+
*
|
|
3283
|
+
* // Example response
|
|
3284
|
+
* // {
|
|
3285
|
+
* // "accountId": "my_accountId",
|
|
3286
|
+
* // "autoEventFilter": [],
|
|
3287
|
+
* // "checkValidation": {},
|
|
3288
|
+
* // "containerId": "my_containerId",
|
|
3289
|
+
* // "continuousTimeMinMilliseconds": {},
|
|
3290
|
+
* // "customEventFilter": [],
|
|
3291
|
+
* // "eventName": {},
|
|
3292
|
+
* // "filter": [],
|
|
3293
|
+
* // "fingerprint": "my_fingerprint",
|
|
3294
|
+
* // "horizontalScrollPercentageList": {},
|
|
3295
|
+
* // "interval": {},
|
|
3296
|
+
* // "intervalSeconds": {},
|
|
3297
|
+
* // "limit": {},
|
|
3298
|
+
* // "maxTimerLengthSeconds": {},
|
|
3299
|
+
* // "name": "my_name",
|
|
3300
|
+
* // "parameter": [],
|
|
3301
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
3302
|
+
* // "selector": {},
|
|
3303
|
+
* // "totalTimeMinMilliseconds": {},
|
|
3304
|
+
* // "triggerId": "my_triggerId",
|
|
3305
|
+
* // "type": "my_type",
|
|
3306
|
+
* // "uniqueTriggerId": {},
|
|
3307
|
+
* // "verticalScrollPercentageList": {},
|
|
3308
|
+
* // "visibilitySelector": {},
|
|
3309
|
+
* // "visiblePercentageMax": {},
|
|
3310
|
+
* // "visiblePercentageMin": {},
|
|
3311
|
+
* // "waitForTags": {},
|
|
3312
|
+
* // "waitForTagsTimeout": {}
|
|
3313
|
+
* // }
|
|
3314
|
+
* }
|
|
3315
|
+
*
|
|
3316
|
+
* main().catch(e => {
|
|
3317
|
+
* console.error(e);
|
|
3318
|
+
* throw e;
|
|
3319
|
+
* });
|
|
3320
|
+
*
|
|
3321
|
+
* ```
|
|
1586
3322
|
*
|
|
1587
3323
|
* @param params - Parameters for request
|
|
1588
3324
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1597,6 +3333,51 @@ export declare namespace tagmanager_v1 {
|
|
|
1597
3333
|
create(callback: BodyResponseCallback<Schema$Trigger>): void;
|
|
1598
3334
|
/**
|
|
1599
3335
|
* Deletes a GTM Trigger.
|
|
3336
|
+
* @example
|
|
3337
|
+
* ```js
|
|
3338
|
+
* // Before running the sample:
|
|
3339
|
+
* // - Enable the API at:
|
|
3340
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
3341
|
+
* // - Login into gcloud by running:
|
|
3342
|
+
* // ```sh
|
|
3343
|
+
* // $ gcloud auth application-default login
|
|
3344
|
+
* // ```
|
|
3345
|
+
* // - Install the npm module by running:
|
|
3346
|
+
* // ```sh
|
|
3347
|
+
* // $ npm install googleapis
|
|
3348
|
+
* // ```
|
|
3349
|
+
*
|
|
3350
|
+
* const {google} = require('googleapis');
|
|
3351
|
+
* const tagmanager = google.tagmanager('v1');
|
|
3352
|
+
*
|
|
3353
|
+
* async function main() {
|
|
3354
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3355
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3356
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
3357
|
+
* });
|
|
3358
|
+
*
|
|
3359
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3360
|
+
* const authClient = await auth.getClient();
|
|
3361
|
+
* google.options({auth: authClient});
|
|
3362
|
+
*
|
|
3363
|
+
* // Do the magic
|
|
3364
|
+
* const res = await tagmanager.accounts.containers.triggers.delete({
|
|
3365
|
+
* // The GTM Account ID.
|
|
3366
|
+
* accountId: 'placeholder-value',
|
|
3367
|
+
* // The GTM Container ID.
|
|
3368
|
+
* containerId: 'placeholder-value',
|
|
3369
|
+
* // The GTM Trigger ID.
|
|
3370
|
+
* triggerId: 'placeholder-value',
|
|
3371
|
+
* });
|
|
3372
|
+
* console.log(res.data);
|
|
3373
|
+
* }
|
|
3374
|
+
*
|
|
3375
|
+
* main().catch(e => {
|
|
3376
|
+
* console.error(e);
|
|
3377
|
+
* throw e;
|
|
3378
|
+
* });
|
|
3379
|
+
*
|
|
3380
|
+
* ```
|
|
1600
3381
|
*
|
|
1601
3382
|
* @param params - Parameters for request
|
|
1602
3383
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1611,6 +3392,86 @@ export declare namespace tagmanager_v1 {
|
|
|
1611
3392
|
delete(callback: BodyResponseCallback<void>): void;
|
|
1612
3393
|
/**
|
|
1613
3394
|
* Gets a GTM Trigger.
|
|
3395
|
+
* @example
|
|
3396
|
+
* ```js
|
|
3397
|
+
* // Before running the sample:
|
|
3398
|
+
* // - Enable the API at:
|
|
3399
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
3400
|
+
* // - Login into gcloud by running:
|
|
3401
|
+
* // ```sh
|
|
3402
|
+
* // $ gcloud auth application-default login
|
|
3403
|
+
* // ```
|
|
3404
|
+
* // - Install the npm module by running:
|
|
3405
|
+
* // ```sh
|
|
3406
|
+
* // $ npm install googleapis
|
|
3407
|
+
* // ```
|
|
3408
|
+
*
|
|
3409
|
+
* const {google} = require('googleapis');
|
|
3410
|
+
* const tagmanager = google.tagmanager('v1');
|
|
3411
|
+
*
|
|
3412
|
+
* async function main() {
|
|
3413
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3414
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3415
|
+
* scopes: [
|
|
3416
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
3417
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
3418
|
+
* ],
|
|
3419
|
+
* });
|
|
3420
|
+
*
|
|
3421
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3422
|
+
* const authClient = await auth.getClient();
|
|
3423
|
+
* google.options({auth: authClient});
|
|
3424
|
+
*
|
|
3425
|
+
* // Do the magic
|
|
3426
|
+
* const res = await tagmanager.accounts.containers.triggers.get({
|
|
3427
|
+
* // The GTM Account ID.
|
|
3428
|
+
* accountId: 'placeholder-value',
|
|
3429
|
+
* // The GTM Container ID.
|
|
3430
|
+
* containerId: 'placeholder-value',
|
|
3431
|
+
* // The GTM Trigger ID.
|
|
3432
|
+
* triggerId: 'placeholder-value',
|
|
3433
|
+
* });
|
|
3434
|
+
* console.log(res.data);
|
|
3435
|
+
*
|
|
3436
|
+
* // Example response
|
|
3437
|
+
* // {
|
|
3438
|
+
* // "accountId": "my_accountId",
|
|
3439
|
+
* // "autoEventFilter": [],
|
|
3440
|
+
* // "checkValidation": {},
|
|
3441
|
+
* // "containerId": "my_containerId",
|
|
3442
|
+
* // "continuousTimeMinMilliseconds": {},
|
|
3443
|
+
* // "customEventFilter": [],
|
|
3444
|
+
* // "eventName": {},
|
|
3445
|
+
* // "filter": [],
|
|
3446
|
+
* // "fingerprint": "my_fingerprint",
|
|
3447
|
+
* // "horizontalScrollPercentageList": {},
|
|
3448
|
+
* // "interval": {},
|
|
3449
|
+
* // "intervalSeconds": {},
|
|
3450
|
+
* // "limit": {},
|
|
3451
|
+
* // "maxTimerLengthSeconds": {},
|
|
3452
|
+
* // "name": "my_name",
|
|
3453
|
+
* // "parameter": [],
|
|
3454
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
3455
|
+
* // "selector": {},
|
|
3456
|
+
* // "totalTimeMinMilliseconds": {},
|
|
3457
|
+
* // "triggerId": "my_triggerId",
|
|
3458
|
+
* // "type": "my_type",
|
|
3459
|
+
* // "uniqueTriggerId": {},
|
|
3460
|
+
* // "verticalScrollPercentageList": {},
|
|
3461
|
+
* // "visibilitySelector": {},
|
|
3462
|
+
* // "visiblePercentageMax": {},
|
|
3463
|
+
* // "visiblePercentageMin": {},
|
|
3464
|
+
* // "waitForTags": {},
|
|
3465
|
+
* // "waitForTagsTimeout": {}
|
|
3466
|
+
* // }
|
|
3467
|
+
* }
|
|
3468
|
+
*
|
|
3469
|
+
* main().catch(e => {
|
|
3470
|
+
* console.error(e);
|
|
3471
|
+
* throw e;
|
|
3472
|
+
* });
|
|
3473
|
+
*
|
|
3474
|
+
* ```
|
|
1614
3475
|
*
|
|
1615
3476
|
* @param params - Parameters for request
|
|
1616
3477
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1625,6 +3486,57 @@ export declare namespace tagmanager_v1 {
|
|
|
1625
3486
|
get(callback: BodyResponseCallback<Schema$Trigger>): void;
|
|
1626
3487
|
/**
|
|
1627
3488
|
* Lists all GTM Triggers of a Container.
|
|
3489
|
+
* @example
|
|
3490
|
+
* ```js
|
|
3491
|
+
* // Before running the sample:
|
|
3492
|
+
* // - Enable the API at:
|
|
3493
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
3494
|
+
* // - Login into gcloud by running:
|
|
3495
|
+
* // ```sh
|
|
3496
|
+
* // $ gcloud auth application-default login
|
|
3497
|
+
* // ```
|
|
3498
|
+
* // - Install the npm module by running:
|
|
3499
|
+
* // ```sh
|
|
3500
|
+
* // $ npm install googleapis
|
|
3501
|
+
* // ```
|
|
3502
|
+
*
|
|
3503
|
+
* const {google} = require('googleapis');
|
|
3504
|
+
* const tagmanager = google.tagmanager('v1');
|
|
3505
|
+
*
|
|
3506
|
+
* async function main() {
|
|
3507
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3508
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3509
|
+
* scopes: [
|
|
3510
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
3511
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
3512
|
+
* ],
|
|
3513
|
+
* });
|
|
3514
|
+
*
|
|
3515
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3516
|
+
* const authClient = await auth.getClient();
|
|
3517
|
+
* google.options({auth: authClient});
|
|
3518
|
+
*
|
|
3519
|
+
* // Do the magic
|
|
3520
|
+
* const res = await tagmanager.accounts.containers.triggers.list({
|
|
3521
|
+
* // The GTM Account ID.
|
|
3522
|
+
* accountId: 'placeholder-value',
|
|
3523
|
+
* // The GTM Container ID.
|
|
3524
|
+
* containerId: 'placeholder-value',
|
|
3525
|
+
* });
|
|
3526
|
+
* console.log(res.data);
|
|
3527
|
+
*
|
|
3528
|
+
* // Example response
|
|
3529
|
+
* // {
|
|
3530
|
+
* // "triggers": []
|
|
3531
|
+
* // }
|
|
3532
|
+
* }
|
|
3533
|
+
*
|
|
3534
|
+
* main().catch(e => {
|
|
3535
|
+
* console.error(e);
|
|
3536
|
+
* throw e;
|
|
3537
|
+
* });
|
|
3538
|
+
*
|
|
3539
|
+
* ```
|
|
1628
3540
|
*
|
|
1629
3541
|
* @param params - Parameters for request
|
|
1630
3542
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1639,6 +3551,120 @@ export declare namespace tagmanager_v1 {
|
|
|
1639
3551
|
list(callback: BodyResponseCallback<Schema$ListTriggersResponse>): void;
|
|
1640
3552
|
/**
|
|
1641
3553
|
* Updates a GTM Trigger.
|
|
3554
|
+
* @example
|
|
3555
|
+
* ```js
|
|
3556
|
+
* // Before running the sample:
|
|
3557
|
+
* // - Enable the API at:
|
|
3558
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
3559
|
+
* // - Login into gcloud by running:
|
|
3560
|
+
* // ```sh
|
|
3561
|
+
* // $ gcloud auth application-default login
|
|
3562
|
+
* // ```
|
|
3563
|
+
* // - Install the npm module by running:
|
|
3564
|
+
* // ```sh
|
|
3565
|
+
* // $ npm install googleapis
|
|
3566
|
+
* // ```
|
|
3567
|
+
*
|
|
3568
|
+
* const {google} = require('googleapis');
|
|
3569
|
+
* const tagmanager = google.tagmanager('v1');
|
|
3570
|
+
*
|
|
3571
|
+
* async function main() {
|
|
3572
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3573
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3574
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
3575
|
+
* });
|
|
3576
|
+
*
|
|
3577
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3578
|
+
* const authClient = await auth.getClient();
|
|
3579
|
+
* google.options({auth: authClient});
|
|
3580
|
+
*
|
|
3581
|
+
* // Do the magic
|
|
3582
|
+
* const res = await tagmanager.accounts.containers.triggers.update({
|
|
3583
|
+
* // The GTM Account ID.
|
|
3584
|
+
* accountId: 'placeholder-value',
|
|
3585
|
+
* // The GTM Container ID.
|
|
3586
|
+
* containerId: 'placeholder-value',
|
|
3587
|
+
* // When provided, this fingerprint must match the fingerprint of the trigger in storage.
|
|
3588
|
+
* fingerprint: 'placeholder-value',
|
|
3589
|
+
* // The GTM Trigger ID.
|
|
3590
|
+
* triggerId: 'placeholder-value',
|
|
3591
|
+
*
|
|
3592
|
+
* // Request body metadata
|
|
3593
|
+
* requestBody: {
|
|
3594
|
+
* // request body parameters
|
|
3595
|
+
* // {
|
|
3596
|
+
* // "accountId": "my_accountId",
|
|
3597
|
+
* // "autoEventFilter": [],
|
|
3598
|
+
* // "checkValidation": {},
|
|
3599
|
+
* // "containerId": "my_containerId",
|
|
3600
|
+
* // "continuousTimeMinMilliseconds": {},
|
|
3601
|
+
* // "customEventFilter": [],
|
|
3602
|
+
* // "eventName": {},
|
|
3603
|
+
* // "filter": [],
|
|
3604
|
+
* // "fingerprint": "my_fingerprint",
|
|
3605
|
+
* // "horizontalScrollPercentageList": {},
|
|
3606
|
+
* // "interval": {},
|
|
3607
|
+
* // "intervalSeconds": {},
|
|
3608
|
+
* // "limit": {},
|
|
3609
|
+
* // "maxTimerLengthSeconds": {},
|
|
3610
|
+
* // "name": "my_name",
|
|
3611
|
+
* // "parameter": [],
|
|
3612
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
3613
|
+
* // "selector": {},
|
|
3614
|
+
* // "totalTimeMinMilliseconds": {},
|
|
3615
|
+
* // "triggerId": "my_triggerId",
|
|
3616
|
+
* // "type": "my_type",
|
|
3617
|
+
* // "uniqueTriggerId": {},
|
|
3618
|
+
* // "verticalScrollPercentageList": {},
|
|
3619
|
+
* // "visibilitySelector": {},
|
|
3620
|
+
* // "visiblePercentageMax": {},
|
|
3621
|
+
* // "visiblePercentageMin": {},
|
|
3622
|
+
* // "waitForTags": {},
|
|
3623
|
+
* // "waitForTagsTimeout": {}
|
|
3624
|
+
* // }
|
|
3625
|
+
* },
|
|
3626
|
+
* });
|
|
3627
|
+
* console.log(res.data);
|
|
3628
|
+
*
|
|
3629
|
+
* // Example response
|
|
3630
|
+
* // {
|
|
3631
|
+
* // "accountId": "my_accountId",
|
|
3632
|
+
* // "autoEventFilter": [],
|
|
3633
|
+
* // "checkValidation": {},
|
|
3634
|
+
* // "containerId": "my_containerId",
|
|
3635
|
+
* // "continuousTimeMinMilliseconds": {},
|
|
3636
|
+
* // "customEventFilter": [],
|
|
3637
|
+
* // "eventName": {},
|
|
3638
|
+
* // "filter": [],
|
|
3639
|
+
* // "fingerprint": "my_fingerprint",
|
|
3640
|
+
* // "horizontalScrollPercentageList": {},
|
|
3641
|
+
* // "interval": {},
|
|
3642
|
+
* // "intervalSeconds": {},
|
|
3643
|
+
* // "limit": {},
|
|
3644
|
+
* // "maxTimerLengthSeconds": {},
|
|
3645
|
+
* // "name": "my_name",
|
|
3646
|
+
* // "parameter": [],
|
|
3647
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
3648
|
+
* // "selector": {},
|
|
3649
|
+
* // "totalTimeMinMilliseconds": {},
|
|
3650
|
+
* // "triggerId": "my_triggerId",
|
|
3651
|
+
* // "type": "my_type",
|
|
3652
|
+
* // "uniqueTriggerId": {},
|
|
3653
|
+
* // "verticalScrollPercentageList": {},
|
|
3654
|
+
* // "visibilitySelector": {},
|
|
3655
|
+
* // "visiblePercentageMax": {},
|
|
3656
|
+
* // "visiblePercentageMin": {},
|
|
3657
|
+
* // "waitForTags": {},
|
|
3658
|
+
* // "waitForTagsTimeout": {}
|
|
3659
|
+
* // }
|
|
3660
|
+
* }
|
|
3661
|
+
*
|
|
3662
|
+
* main().catch(e => {
|
|
3663
|
+
* console.error(e);
|
|
3664
|
+
* throw e;
|
|
3665
|
+
* });
|
|
3666
|
+
*
|
|
3667
|
+
* ```
|
|
1642
3668
|
*
|
|
1643
3669
|
* @param params - Parameters for request
|
|
1644
3670
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1731,6 +3757,86 @@ export declare namespace tagmanager_v1 {
|
|
|
1731
3757
|
constructor(context: APIRequestContext);
|
|
1732
3758
|
/**
|
|
1733
3759
|
* Creates a GTM Variable.
|
|
3760
|
+
* @example
|
|
3761
|
+
* ```js
|
|
3762
|
+
* // Before running the sample:
|
|
3763
|
+
* // - Enable the API at:
|
|
3764
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
3765
|
+
* // - Login into gcloud by running:
|
|
3766
|
+
* // ```sh
|
|
3767
|
+
* // $ gcloud auth application-default login
|
|
3768
|
+
* // ```
|
|
3769
|
+
* // - Install the npm module by running:
|
|
3770
|
+
* // ```sh
|
|
3771
|
+
* // $ npm install googleapis
|
|
3772
|
+
* // ```
|
|
3773
|
+
*
|
|
3774
|
+
* const {google} = require('googleapis');
|
|
3775
|
+
* const tagmanager = google.tagmanager('v1');
|
|
3776
|
+
*
|
|
3777
|
+
* async function main() {
|
|
3778
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3779
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3780
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
3781
|
+
* });
|
|
3782
|
+
*
|
|
3783
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3784
|
+
* const authClient = await auth.getClient();
|
|
3785
|
+
* google.options({auth: authClient});
|
|
3786
|
+
*
|
|
3787
|
+
* // Do the magic
|
|
3788
|
+
* const res = await tagmanager.accounts.containers.variables.create({
|
|
3789
|
+
* // The GTM Account ID.
|
|
3790
|
+
* accountId: 'placeholder-value',
|
|
3791
|
+
* // The GTM Container ID.
|
|
3792
|
+
* containerId: 'placeholder-value',
|
|
3793
|
+
*
|
|
3794
|
+
* // Request body metadata
|
|
3795
|
+
* requestBody: {
|
|
3796
|
+
* // request body parameters
|
|
3797
|
+
* // {
|
|
3798
|
+
* // "accountId": "my_accountId",
|
|
3799
|
+
* // "containerId": "my_containerId",
|
|
3800
|
+
* // "disablingTriggerId": [],
|
|
3801
|
+
* // "enablingTriggerId": [],
|
|
3802
|
+
* // "fingerprint": "my_fingerprint",
|
|
3803
|
+
* // "name": "my_name",
|
|
3804
|
+
* // "notes": "my_notes",
|
|
3805
|
+
* // "parameter": [],
|
|
3806
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
3807
|
+
* // "scheduleEndMs": "my_scheduleEndMs",
|
|
3808
|
+
* // "scheduleStartMs": "my_scheduleStartMs",
|
|
3809
|
+
* // "type": "my_type",
|
|
3810
|
+
* // "variableId": "my_variableId"
|
|
3811
|
+
* // }
|
|
3812
|
+
* },
|
|
3813
|
+
* });
|
|
3814
|
+
* console.log(res.data);
|
|
3815
|
+
*
|
|
3816
|
+
* // Example response
|
|
3817
|
+
* // {
|
|
3818
|
+
* // "accountId": "my_accountId",
|
|
3819
|
+
* // "containerId": "my_containerId",
|
|
3820
|
+
* // "disablingTriggerId": [],
|
|
3821
|
+
* // "enablingTriggerId": [],
|
|
3822
|
+
* // "fingerprint": "my_fingerprint",
|
|
3823
|
+
* // "name": "my_name",
|
|
3824
|
+
* // "notes": "my_notes",
|
|
3825
|
+
* // "parameter": [],
|
|
3826
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
3827
|
+
* // "scheduleEndMs": "my_scheduleEndMs",
|
|
3828
|
+
* // "scheduleStartMs": "my_scheduleStartMs",
|
|
3829
|
+
* // "type": "my_type",
|
|
3830
|
+
* // "variableId": "my_variableId"
|
|
3831
|
+
* // }
|
|
3832
|
+
* }
|
|
3833
|
+
*
|
|
3834
|
+
* main().catch(e => {
|
|
3835
|
+
* console.error(e);
|
|
3836
|
+
* throw e;
|
|
3837
|
+
* });
|
|
3838
|
+
*
|
|
3839
|
+
* ```
|
|
1734
3840
|
*
|
|
1735
3841
|
* @param params - Parameters for request
|
|
1736
3842
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1745,6 +3851,51 @@ export declare namespace tagmanager_v1 {
|
|
|
1745
3851
|
create(callback: BodyResponseCallback<Schema$Variable>): void;
|
|
1746
3852
|
/**
|
|
1747
3853
|
* Deletes a GTM Variable.
|
|
3854
|
+
* @example
|
|
3855
|
+
* ```js
|
|
3856
|
+
* // Before running the sample:
|
|
3857
|
+
* // - Enable the API at:
|
|
3858
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
3859
|
+
* // - Login into gcloud by running:
|
|
3860
|
+
* // ```sh
|
|
3861
|
+
* // $ gcloud auth application-default login
|
|
3862
|
+
* // ```
|
|
3863
|
+
* // - Install the npm module by running:
|
|
3864
|
+
* // ```sh
|
|
3865
|
+
* // $ npm install googleapis
|
|
3866
|
+
* // ```
|
|
3867
|
+
*
|
|
3868
|
+
* const {google} = require('googleapis');
|
|
3869
|
+
* const tagmanager = google.tagmanager('v1');
|
|
3870
|
+
*
|
|
3871
|
+
* async function main() {
|
|
3872
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3873
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3874
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
3875
|
+
* });
|
|
3876
|
+
*
|
|
3877
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3878
|
+
* const authClient = await auth.getClient();
|
|
3879
|
+
* google.options({auth: authClient});
|
|
3880
|
+
*
|
|
3881
|
+
* // Do the magic
|
|
3882
|
+
* const res = await tagmanager.accounts.containers.variables.delete({
|
|
3883
|
+
* // The GTM Account ID.
|
|
3884
|
+
* accountId: 'placeholder-value',
|
|
3885
|
+
* // The GTM Container ID.
|
|
3886
|
+
* containerId: 'placeholder-value',
|
|
3887
|
+
* // The GTM Variable ID.
|
|
3888
|
+
* variableId: 'placeholder-value',
|
|
3889
|
+
* });
|
|
3890
|
+
* console.log(res.data);
|
|
3891
|
+
* }
|
|
3892
|
+
*
|
|
3893
|
+
* main().catch(e => {
|
|
3894
|
+
* console.error(e);
|
|
3895
|
+
* throw e;
|
|
3896
|
+
* });
|
|
3897
|
+
*
|
|
3898
|
+
* ```
|
|
1748
3899
|
*
|
|
1749
3900
|
* @param params - Parameters for request
|
|
1750
3901
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1759,6 +3910,71 @@ export declare namespace tagmanager_v1 {
|
|
|
1759
3910
|
delete(callback: BodyResponseCallback<void>): void;
|
|
1760
3911
|
/**
|
|
1761
3912
|
* Gets a GTM Variable.
|
|
3913
|
+
* @example
|
|
3914
|
+
* ```js
|
|
3915
|
+
* // Before running the sample:
|
|
3916
|
+
* // - Enable the API at:
|
|
3917
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
3918
|
+
* // - Login into gcloud by running:
|
|
3919
|
+
* // ```sh
|
|
3920
|
+
* // $ gcloud auth application-default login
|
|
3921
|
+
* // ```
|
|
3922
|
+
* // - Install the npm module by running:
|
|
3923
|
+
* // ```sh
|
|
3924
|
+
* // $ npm install googleapis
|
|
3925
|
+
* // ```
|
|
3926
|
+
*
|
|
3927
|
+
* const {google} = require('googleapis');
|
|
3928
|
+
* const tagmanager = google.tagmanager('v1');
|
|
3929
|
+
*
|
|
3930
|
+
* async function main() {
|
|
3931
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3932
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3933
|
+
* scopes: [
|
|
3934
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
3935
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
3936
|
+
* ],
|
|
3937
|
+
* });
|
|
3938
|
+
*
|
|
3939
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3940
|
+
* const authClient = await auth.getClient();
|
|
3941
|
+
* google.options({auth: authClient});
|
|
3942
|
+
*
|
|
3943
|
+
* // Do the magic
|
|
3944
|
+
* const res = await tagmanager.accounts.containers.variables.get({
|
|
3945
|
+
* // The GTM Account ID.
|
|
3946
|
+
* accountId: 'placeholder-value',
|
|
3947
|
+
* // The GTM Container ID.
|
|
3948
|
+
* containerId: 'placeholder-value',
|
|
3949
|
+
* // The GTM Variable ID.
|
|
3950
|
+
* variableId: 'placeholder-value',
|
|
3951
|
+
* });
|
|
3952
|
+
* console.log(res.data);
|
|
3953
|
+
*
|
|
3954
|
+
* // Example response
|
|
3955
|
+
* // {
|
|
3956
|
+
* // "accountId": "my_accountId",
|
|
3957
|
+
* // "containerId": "my_containerId",
|
|
3958
|
+
* // "disablingTriggerId": [],
|
|
3959
|
+
* // "enablingTriggerId": [],
|
|
3960
|
+
* // "fingerprint": "my_fingerprint",
|
|
3961
|
+
* // "name": "my_name",
|
|
3962
|
+
* // "notes": "my_notes",
|
|
3963
|
+
* // "parameter": [],
|
|
3964
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
3965
|
+
* // "scheduleEndMs": "my_scheduleEndMs",
|
|
3966
|
+
* // "scheduleStartMs": "my_scheduleStartMs",
|
|
3967
|
+
* // "type": "my_type",
|
|
3968
|
+
* // "variableId": "my_variableId"
|
|
3969
|
+
* // }
|
|
3970
|
+
* }
|
|
3971
|
+
*
|
|
3972
|
+
* main().catch(e => {
|
|
3973
|
+
* console.error(e);
|
|
3974
|
+
* throw e;
|
|
3975
|
+
* });
|
|
3976
|
+
*
|
|
3977
|
+
* ```
|
|
1762
3978
|
*
|
|
1763
3979
|
* @param params - Parameters for request
|
|
1764
3980
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1773,6 +3989,57 @@ export declare namespace tagmanager_v1 {
|
|
|
1773
3989
|
get(callback: BodyResponseCallback<Schema$Variable>): void;
|
|
1774
3990
|
/**
|
|
1775
3991
|
* Lists all GTM Variables of a Container.
|
|
3992
|
+
* @example
|
|
3993
|
+
* ```js
|
|
3994
|
+
* // Before running the sample:
|
|
3995
|
+
* // - Enable the API at:
|
|
3996
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
3997
|
+
* // - Login into gcloud by running:
|
|
3998
|
+
* // ```sh
|
|
3999
|
+
* // $ gcloud auth application-default login
|
|
4000
|
+
* // ```
|
|
4001
|
+
* // - Install the npm module by running:
|
|
4002
|
+
* // ```sh
|
|
4003
|
+
* // $ npm install googleapis
|
|
4004
|
+
* // ```
|
|
4005
|
+
*
|
|
4006
|
+
* const {google} = require('googleapis');
|
|
4007
|
+
* const tagmanager = google.tagmanager('v1');
|
|
4008
|
+
*
|
|
4009
|
+
* async function main() {
|
|
4010
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4011
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4012
|
+
* scopes: [
|
|
4013
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
4014
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
4015
|
+
* ],
|
|
4016
|
+
* });
|
|
4017
|
+
*
|
|
4018
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4019
|
+
* const authClient = await auth.getClient();
|
|
4020
|
+
* google.options({auth: authClient});
|
|
4021
|
+
*
|
|
4022
|
+
* // Do the magic
|
|
4023
|
+
* const res = await tagmanager.accounts.containers.variables.list({
|
|
4024
|
+
* // The GTM Account ID.
|
|
4025
|
+
* accountId: 'placeholder-value',
|
|
4026
|
+
* // The GTM Container ID.
|
|
4027
|
+
* containerId: 'placeholder-value',
|
|
4028
|
+
* });
|
|
4029
|
+
* console.log(res.data);
|
|
4030
|
+
*
|
|
4031
|
+
* // Example response
|
|
4032
|
+
* // {
|
|
4033
|
+
* // "variables": []
|
|
4034
|
+
* // }
|
|
4035
|
+
* }
|
|
4036
|
+
*
|
|
4037
|
+
* main().catch(e => {
|
|
4038
|
+
* console.error(e);
|
|
4039
|
+
* throw e;
|
|
4040
|
+
* });
|
|
4041
|
+
*
|
|
4042
|
+
* ```
|
|
1776
4043
|
*
|
|
1777
4044
|
* @param params - Parameters for request
|
|
1778
4045
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1787,6 +4054,90 @@ export declare namespace tagmanager_v1 {
|
|
|
1787
4054
|
list(callback: BodyResponseCallback<Schema$ListVariablesResponse>): void;
|
|
1788
4055
|
/**
|
|
1789
4056
|
* Updates a GTM Variable.
|
|
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.variables.update({
|
|
4086
|
+
* // The GTM Account ID.
|
|
4087
|
+
* accountId: 'placeholder-value',
|
|
4088
|
+
* // The GTM Container ID.
|
|
4089
|
+
* containerId: 'placeholder-value',
|
|
4090
|
+
* // When provided, this fingerprint must match the fingerprint of the variable in storage.
|
|
4091
|
+
* fingerprint: 'placeholder-value',
|
|
4092
|
+
* // The GTM Variable ID.
|
|
4093
|
+
* variableId: 'placeholder-value',
|
|
4094
|
+
*
|
|
4095
|
+
* // Request body metadata
|
|
4096
|
+
* requestBody: {
|
|
4097
|
+
* // request body parameters
|
|
4098
|
+
* // {
|
|
4099
|
+
* // "accountId": "my_accountId",
|
|
4100
|
+
* // "containerId": "my_containerId",
|
|
4101
|
+
* // "disablingTriggerId": [],
|
|
4102
|
+
* // "enablingTriggerId": [],
|
|
4103
|
+
* // "fingerprint": "my_fingerprint",
|
|
4104
|
+
* // "name": "my_name",
|
|
4105
|
+
* // "notes": "my_notes",
|
|
4106
|
+
* // "parameter": [],
|
|
4107
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
4108
|
+
* // "scheduleEndMs": "my_scheduleEndMs",
|
|
4109
|
+
* // "scheduleStartMs": "my_scheduleStartMs",
|
|
4110
|
+
* // "type": "my_type",
|
|
4111
|
+
* // "variableId": "my_variableId"
|
|
4112
|
+
* // }
|
|
4113
|
+
* },
|
|
4114
|
+
* });
|
|
4115
|
+
* console.log(res.data);
|
|
4116
|
+
*
|
|
4117
|
+
* // Example response
|
|
4118
|
+
* // {
|
|
4119
|
+
* // "accountId": "my_accountId",
|
|
4120
|
+
* // "containerId": "my_containerId",
|
|
4121
|
+
* // "disablingTriggerId": [],
|
|
4122
|
+
* // "enablingTriggerId": [],
|
|
4123
|
+
* // "fingerprint": "my_fingerprint",
|
|
4124
|
+
* // "name": "my_name",
|
|
4125
|
+
* // "notes": "my_notes",
|
|
4126
|
+
* // "parameter": [],
|
|
4127
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
4128
|
+
* // "scheduleEndMs": "my_scheduleEndMs",
|
|
4129
|
+
* // "scheduleStartMs": "my_scheduleStartMs",
|
|
4130
|
+
* // "type": "my_type",
|
|
4131
|
+
* // "variableId": "my_variableId"
|
|
4132
|
+
* // }
|
|
4133
|
+
* }
|
|
4134
|
+
*
|
|
4135
|
+
* main().catch(e => {
|
|
4136
|
+
* console.error(e);
|
|
4137
|
+
* throw e;
|
|
4138
|
+
* });
|
|
4139
|
+
*
|
|
4140
|
+
* ```
|
|
1790
4141
|
*
|
|
1791
4142
|
* @param params - Parameters for request
|
|
1792
4143
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1879,6 +4230,67 @@ export declare namespace tagmanager_v1 {
|
|
|
1879
4230
|
constructor(context: APIRequestContext);
|
|
1880
4231
|
/**
|
|
1881
4232
|
* Creates a Container Version.
|
|
4233
|
+
* @example
|
|
4234
|
+
* ```js
|
|
4235
|
+
* // Before running the sample:
|
|
4236
|
+
* // - Enable the API at:
|
|
4237
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
4238
|
+
* // - Login into gcloud by running:
|
|
4239
|
+
* // ```sh
|
|
4240
|
+
* // $ gcloud auth application-default login
|
|
4241
|
+
* // ```
|
|
4242
|
+
* // - Install the npm module by running:
|
|
4243
|
+
* // ```sh
|
|
4244
|
+
* // $ npm install googleapis
|
|
4245
|
+
* // ```
|
|
4246
|
+
*
|
|
4247
|
+
* const {google} = require('googleapis');
|
|
4248
|
+
* const tagmanager = google.tagmanager('v1');
|
|
4249
|
+
*
|
|
4250
|
+
* async function main() {
|
|
4251
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4252
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4253
|
+
* scopes: [
|
|
4254
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containerversions',
|
|
4255
|
+
* ],
|
|
4256
|
+
* });
|
|
4257
|
+
*
|
|
4258
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4259
|
+
* const authClient = await auth.getClient();
|
|
4260
|
+
* google.options({auth: authClient});
|
|
4261
|
+
*
|
|
4262
|
+
* // Do the magic
|
|
4263
|
+
* const res = await tagmanager.accounts.containers.versions.create({
|
|
4264
|
+
* // The GTM Account ID.
|
|
4265
|
+
* accountId: 'placeholder-value',
|
|
4266
|
+
* // The GTM Container ID.
|
|
4267
|
+
* containerId: 'placeholder-value',
|
|
4268
|
+
*
|
|
4269
|
+
* // Request body metadata
|
|
4270
|
+
* requestBody: {
|
|
4271
|
+
* // request body parameters
|
|
4272
|
+
* // {
|
|
4273
|
+
* // "name": "my_name",
|
|
4274
|
+
* // "notes": "my_notes",
|
|
4275
|
+
* // "quickPreview": false
|
|
4276
|
+
* // }
|
|
4277
|
+
* },
|
|
4278
|
+
* });
|
|
4279
|
+
* console.log(res.data);
|
|
4280
|
+
*
|
|
4281
|
+
* // Example response
|
|
4282
|
+
* // {
|
|
4283
|
+
* // "compilerError": false,
|
|
4284
|
+
* // "containerVersion": {}
|
|
4285
|
+
* // }
|
|
4286
|
+
* }
|
|
4287
|
+
*
|
|
4288
|
+
* main().catch(e => {
|
|
4289
|
+
* console.error(e);
|
|
4290
|
+
* throw e;
|
|
4291
|
+
* });
|
|
4292
|
+
*
|
|
4293
|
+
* ```
|
|
1882
4294
|
*
|
|
1883
4295
|
* @param params - Parameters for request
|
|
1884
4296
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1893,6 +4305,53 @@ export declare namespace tagmanager_v1 {
|
|
|
1893
4305
|
create(callback: BodyResponseCallback<Schema$CreateContainerVersionResponse>): void;
|
|
1894
4306
|
/**
|
|
1895
4307
|
* Deletes a Container Version.
|
|
4308
|
+
* @example
|
|
4309
|
+
* ```js
|
|
4310
|
+
* // Before running the sample:
|
|
4311
|
+
* // - Enable the API at:
|
|
4312
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
4313
|
+
* // - Login into gcloud by running:
|
|
4314
|
+
* // ```sh
|
|
4315
|
+
* // $ gcloud auth application-default login
|
|
4316
|
+
* // ```
|
|
4317
|
+
* // - Install the npm module by running:
|
|
4318
|
+
* // ```sh
|
|
4319
|
+
* // $ npm install googleapis
|
|
4320
|
+
* // ```
|
|
4321
|
+
*
|
|
4322
|
+
* const {google} = require('googleapis');
|
|
4323
|
+
* const tagmanager = google.tagmanager('v1');
|
|
4324
|
+
*
|
|
4325
|
+
* async function main() {
|
|
4326
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4327
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4328
|
+
* scopes: [
|
|
4329
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containerversions',
|
|
4330
|
+
* ],
|
|
4331
|
+
* });
|
|
4332
|
+
*
|
|
4333
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4334
|
+
* const authClient = await auth.getClient();
|
|
4335
|
+
* google.options({auth: authClient});
|
|
4336
|
+
*
|
|
4337
|
+
* // Do the magic
|
|
4338
|
+
* const res = await tagmanager.accounts.containers.versions.delete({
|
|
4339
|
+
* // The GTM Account ID.
|
|
4340
|
+
* accountId: 'placeholder-value',
|
|
4341
|
+
* // The GTM Container ID.
|
|
4342
|
+
* containerId: 'placeholder-value',
|
|
4343
|
+
* // The GTM Container Version ID.
|
|
4344
|
+
* containerVersionId: 'placeholder-value',
|
|
4345
|
+
* });
|
|
4346
|
+
* console.log(res.data);
|
|
4347
|
+
* }
|
|
4348
|
+
*
|
|
4349
|
+
* main().catch(e => {
|
|
4350
|
+
* console.error(e);
|
|
4351
|
+
* throw e;
|
|
4352
|
+
* });
|
|
4353
|
+
*
|
|
4354
|
+
* ```
|
|
1896
4355
|
*
|
|
1897
4356
|
* @param params - Parameters for request
|
|
1898
4357
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1907,6 +4366,71 @@ export declare namespace tagmanager_v1 {
|
|
|
1907
4366
|
delete(callback: BodyResponseCallback<void>): void;
|
|
1908
4367
|
/**
|
|
1909
4368
|
* Gets a Container Version.
|
|
4369
|
+
* @example
|
|
4370
|
+
* ```js
|
|
4371
|
+
* // Before running the sample:
|
|
4372
|
+
* // - Enable the API at:
|
|
4373
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
4374
|
+
* // - Login into gcloud by running:
|
|
4375
|
+
* // ```sh
|
|
4376
|
+
* // $ gcloud auth application-default login
|
|
4377
|
+
* // ```
|
|
4378
|
+
* // - Install the npm module by running:
|
|
4379
|
+
* // ```sh
|
|
4380
|
+
* // $ npm install googleapis
|
|
4381
|
+
* // ```
|
|
4382
|
+
*
|
|
4383
|
+
* const {google} = require('googleapis');
|
|
4384
|
+
* const tagmanager = google.tagmanager('v1');
|
|
4385
|
+
*
|
|
4386
|
+
* async function main() {
|
|
4387
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4388
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4389
|
+
* scopes: [
|
|
4390
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
4391
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containerversions',
|
|
4392
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
4393
|
+
* ],
|
|
4394
|
+
* });
|
|
4395
|
+
*
|
|
4396
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4397
|
+
* const authClient = await auth.getClient();
|
|
4398
|
+
* google.options({auth: authClient});
|
|
4399
|
+
*
|
|
4400
|
+
* // Do the magic
|
|
4401
|
+
* const res = await tagmanager.accounts.containers.versions.get({
|
|
4402
|
+
* // The GTM Account ID.
|
|
4403
|
+
* accountId: 'placeholder-value',
|
|
4404
|
+
* // The GTM Container ID.
|
|
4405
|
+
* containerId: 'placeholder-value',
|
|
4406
|
+
* // The GTM Container Version ID. Specify published to retrieve the currently published version.
|
|
4407
|
+
* containerVersionId: 'placeholder-value',
|
|
4408
|
+
* });
|
|
4409
|
+
* console.log(res.data);
|
|
4410
|
+
*
|
|
4411
|
+
* // Example response
|
|
4412
|
+
* // {
|
|
4413
|
+
* // "accountId": "my_accountId",
|
|
4414
|
+
* // "container": {},
|
|
4415
|
+
* // "containerId": "my_containerId",
|
|
4416
|
+
* // "containerVersionId": "my_containerVersionId",
|
|
4417
|
+
* // "deleted": false,
|
|
4418
|
+
* // "fingerprint": "my_fingerprint",
|
|
4419
|
+
* // "folder": [],
|
|
4420
|
+
* // "name": "my_name",
|
|
4421
|
+
* // "notes": "my_notes",
|
|
4422
|
+
* // "tag": [],
|
|
4423
|
+
* // "trigger": [],
|
|
4424
|
+
* // "variable": []
|
|
4425
|
+
* // }
|
|
4426
|
+
* }
|
|
4427
|
+
*
|
|
4428
|
+
* main().catch(e => {
|
|
4429
|
+
* console.error(e);
|
|
4430
|
+
* throw e;
|
|
4431
|
+
* });
|
|
4432
|
+
*
|
|
4433
|
+
* ```
|
|
1910
4434
|
*
|
|
1911
4435
|
* @param params - Parameters for request
|
|
1912
4436
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1921,6 +4445,63 @@ export declare namespace tagmanager_v1 {
|
|
|
1921
4445
|
get(callback: BodyResponseCallback<Schema$ContainerVersion>): void;
|
|
1922
4446
|
/**
|
|
1923
4447
|
* Lists all Container Versions of a GTM Container.
|
|
4448
|
+
* @example
|
|
4449
|
+
* ```js
|
|
4450
|
+
* // Before running the sample:
|
|
4451
|
+
* // - Enable the API at:
|
|
4452
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
4453
|
+
* // - Login into gcloud by running:
|
|
4454
|
+
* // ```sh
|
|
4455
|
+
* // $ gcloud auth application-default login
|
|
4456
|
+
* // ```
|
|
4457
|
+
* // - Install the npm module by running:
|
|
4458
|
+
* // ```sh
|
|
4459
|
+
* // $ npm install googleapis
|
|
4460
|
+
* // ```
|
|
4461
|
+
*
|
|
4462
|
+
* const {google} = require('googleapis');
|
|
4463
|
+
* const tagmanager = google.tagmanager('v1');
|
|
4464
|
+
*
|
|
4465
|
+
* async function main() {
|
|
4466
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4467
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4468
|
+
* scopes: [
|
|
4469
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
4470
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containerversions',
|
|
4471
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
4472
|
+
* ],
|
|
4473
|
+
* });
|
|
4474
|
+
*
|
|
4475
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4476
|
+
* const authClient = await auth.getClient();
|
|
4477
|
+
* google.options({auth: authClient});
|
|
4478
|
+
*
|
|
4479
|
+
* // Do the magic
|
|
4480
|
+
* const res = await tagmanager.accounts.containers.versions.list({
|
|
4481
|
+
* // The GTM Account ID.
|
|
4482
|
+
* accountId: 'placeholder-value',
|
|
4483
|
+
* // The GTM Container ID.
|
|
4484
|
+
* containerId: 'placeholder-value',
|
|
4485
|
+
* // Retrieve headers only when true.
|
|
4486
|
+
* headers: 'placeholder-value',
|
|
4487
|
+
* // Also retrieve deleted (archived) versions when true.
|
|
4488
|
+
* includeDeleted: 'placeholder-value',
|
|
4489
|
+
* });
|
|
4490
|
+
* console.log(res.data);
|
|
4491
|
+
*
|
|
4492
|
+
* // Example response
|
|
4493
|
+
* // {
|
|
4494
|
+
* // "containerVersion": [],
|
|
4495
|
+
* // "containerVersionHeader": []
|
|
4496
|
+
* // }
|
|
4497
|
+
* }
|
|
4498
|
+
*
|
|
4499
|
+
* main().catch(e => {
|
|
4500
|
+
* console.error(e);
|
|
4501
|
+
* throw e;
|
|
4502
|
+
* });
|
|
4503
|
+
*
|
|
4504
|
+
* ```
|
|
1924
4505
|
*
|
|
1925
4506
|
* @param params - Parameters for request
|
|
1926
4507
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1935,6 +4516,59 @@ export declare namespace tagmanager_v1 {
|
|
|
1935
4516
|
list(callback: BodyResponseCallback<Schema$ListContainerVersionsResponse>): void;
|
|
1936
4517
|
/**
|
|
1937
4518
|
* Publishes a Container Version.
|
|
4519
|
+
* @example
|
|
4520
|
+
* ```js
|
|
4521
|
+
* // Before running the sample:
|
|
4522
|
+
* // - Enable the API at:
|
|
4523
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
4524
|
+
* // - Login into gcloud by running:
|
|
4525
|
+
* // ```sh
|
|
4526
|
+
* // $ gcloud auth application-default login
|
|
4527
|
+
* // ```
|
|
4528
|
+
* // - Install the npm module by running:
|
|
4529
|
+
* // ```sh
|
|
4530
|
+
* // $ npm install googleapis
|
|
4531
|
+
* // ```
|
|
4532
|
+
*
|
|
4533
|
+
* const {google} = require('googleapis');
|
|
4534
|
+
* const tagmanager = google.tagmanager('v1');
|
|
4535
|
+
*
|
|
4536
|
+
* async function main() {
|
|
4537
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4538
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4539
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.publish'],
|
|
4540
|
+
* });
|
|
4541
|
+
*
|
|
4542
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4543
|
+
* const authClient = await auth.getClient();
|
|
4544
|
+
* google.options({auth: authClient});
|
|
4545
|
+
*
|
|
4546
|
+
* // Do the magic
|
|
4547
|
+
* const res = await tagmanager.accounts.containers.versions.publish({
|
|
4548
|
+
* // The GTM Account ID.
|
|
4549
|
+
* accountId: 'placeholder-value',
|
|
4550
|
+
* // The GTM Container ID.
|
|
4551
|
+
* containerId: 'placeholder-value',
|
|
4552
|
+
* // The GTM Container Version ID.
|
|
4553
|
+
* containerVersionId: 'placeholder-value',
|
|
4554
|
+
* // When provided, this fingerprint must match the fingerprint of the container version in storage.
|
|
4555
|
+
* fingerprint: 'placeholder-value',
|
|
4556
|
+
* });
|
|
4557
|
+
* console.log(res.data);
|
|
4558
|
+
*
|
|
4559
|
+
* // Example response
|
|
4560
|
+
* // {
|
|
4561
|
+
* // "compilerError": false,
|
|
4562
|
+
* // "containerVersion": {}
|
|
4563
|
+
* // }
|
|
4564
|
+
* }
|
|
4565
|
+
*
|
|
4566
|
+
* main().catch(e => {
|
|
4567
|
+
* console.error(e);
|
|
4568
|
+
* throw e;
|
|
4569
|
+
* });
|
|
4570
|
+
*
|
|
4571
|
+
* ```
|
|
1938
4572
|
*
|
|
1939
4573
|
* @param params - Parameters for request
|
|
1940
4574
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1949,6 +4583,67 @@ export declare namespace tagmanager_v1 {
|
|
|
1949
4583
|
publish(callback: BodyResponseCallback<Schema$PublishContainerVersionResponse>): void;
|
|
1950
4584
|
/**
|
|
1951
4585
|
* 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).
|
|
4586
|
+
* @example
|
|
4587
|
+
* ```js
|
|
4588
|
+
* // Before running the sample:
|
|
4589
|
+
* // - Enable the API at:
|
|
4590
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
4591
|
+
* // - Login into gcloud by running:
|
|
4592
|
+
* // ```sh
|
|
4593
|
+
* // $ gcloud auth application-default login
|
|
4594
|
+
* // ```
|
|
4595
|
+
* // - Install the npm module by running:
|
|
4596
|
+
* // ```sh
|
|
4597
|
+
* // $ npm install googleapis
|
|
4598
|
+
* // ```
|
|
4599
|
+
*
|
|
4600
|
+
* const {google} = require('googleapis');
|
|
4601
|
+
* const tagmanager = google.tagmanager('v1');
|
|
4602
|
+
*
|
|
4603
|
+
* async function main() {
|
|
4604
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4605
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4606
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
4607
|
+
* });
|
|
4608
|
+
*
|
|
4609
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4610
|
+
* const authClient = await auth.getClient();
|
|
4611
|
+
* google.options({auth: authClient});
|
|
4612
|
+
*
|
|
4613
|
+
* // Do the magic
|
|
4614
|
+
* const res = await tagmanager.accounts.containers.versions.restore({
|
|
4615
|
+
* // The GTM Account ID.
|
|
4616
|
+
* accountId: 'placeholder-value',
|
|
4617
|
+
* // The GTM Container ID.
|
|
4618
|
+
* containerId: 'placeholder-value',
|
|
4619
|
+
* // The GTM Container Version ID.
|
|
4620
|
+
* containerVersionId: 'placeholder-value',
|
|
4621
|
+
* });
|
|
4622
|
+
* console.log(res.data);
|
|
4623
|
+
*
|
|
4624
|
+
* // Example response
|
|
4625
|
+
* // {
|
|
4626
|
+
* // "accountId": "my_accountId",
|
|
4627
|
+
* // "container": {},
|
|
4628
|
+
* // "containerId": "my_containerId",
|
|
4629
|
+
* // "containerVersionId": "my_containerVersionId",
|
|
4630
|
+
* // "deleted": false,
|
|
4631
|
+
* // "fingerprint": "my_fingerprint",
|
|
4632
|
+
* // "folder": [],
|
|
4633
|
+
* // "name": "my_name",
|
|
4634
|
+
* // "notes": "my_notes",
|
|
4635
|
+
* // "tag": [],
|
|
4636
|
+
* // "trigger": [],
|
|
4637
|
+
* // "variable": []
|
|
4638
|
+
* // }
|
|
4639
|
+
* }
|
|
4640
|
+
*
|
|
4641
|
+
* main().catch(e => {
|
|
4642
|
+
* console.error(e);
|
|
4643
|
+
* throw e;
|
|
4644
|
+
* });
|
|
4645
|
+
*
|
|
4646
|
+
* ```
|
|
1952
4647
|
*
|
|
1953
4648
|
* @param params - Parameters for request
|
|
1954
4649
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1963,6 +4658,69 @@ export declare namespace tagmanager_v1 {
|
|
|
1963
4658
|
restore(callback: BodyResponseCallback<Schema$ContainerVersion>): void;
|
|
1964
4659
|
/**
|
|
1965
4660
|
* Undeletes a Container Version.
|
|
4661
|
+
* @example
|
|
4662
|
+
* ```js
|
|
4663
|
+
* // Before running the sample:
|
|
4664
|
+
* // - Enable the API at:
|
|
4665
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
4666
|
+
* // - Login into gcloud by running:
|
|
4667
|
+
* // ```sh
|
|
4668
|
+
* // $ gcloud auth application-default login
|
|
4669
|
+
* // ```
|
|
4670
|
+
* // - Install the npm module by running:
|
|
4671
|
+
* // ```sh
|
|
4672
|
+
* // $ npm install googleapis
|
|
4673
|
+
* // ```
|
|
4674
|
+
*
|
|
4675
|
+
* const {google} = require('googleapis');
|
|
4676
|
+
* const tagmanager = google.tagmanager('v1');
|
|
4677
|
+
*
|
|
4678
|
+
* async function main() {
|
|
4679
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4680
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4681
|
+
* scopes: [
|
|
4682
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containerversions',
|
|
4683
|
+
* ],
|
|
4684
|
+
* });
|
|
4685
|
+
*
|
|
4686
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4687
|
+
* const authClient = await auth.getClient();
|
|
4688
|
+
* google.options({auth: authClient});
|
|
4689
|
+
*
|
|
4690
|
+
* // Do the magic
|
|
4691
|
+
* const res = await tagmanager.accounts.containers.versions.undelete({
|
|
4692
|
+
* // The GTM Account ID.
|
|
4693
|
+
* accountId: 'placeholder-value',
|
|
4694
|
+
* // The GTM Container ID.
|
|
4695
|
+
* containerId: 'placeholder-value',
|
|
4696
|
+
* // The GTM Container Version ID.
|
|
4697
|
+
* containerVersionId: 'placeholder-value',
|
|
4698
|
+
* });
|
|
4699
|
+
* console.log(res.data);
|
|
4700
|
+
*
|
|
4701
|
+
* // Example response
|
|
4702
|
+
* // {
|
|
4703
|
+
* // "accountId": "my_accountId",
|
|
4704
|
+
* // "container": {},
|
|
4705
|
+
* // "containerId": "my_containerId",
|
|
4706
|
+
* // "containerVersionId": "my_containerVersionId",
|
|
4707
|
+
* // "deleted": false,
|
|
4708
|
+
* // "fingerprint": "my_fingerprint",
|
|
4709
|
+
* // "folder": [],
|
|
4710
|
+
* // "name": "my_name",
|
|
4711
|
+
* // "notes": "my_notes",
|
|
4712
|
+
* // "tag": [],
|
|
4713
|
+
* // "trigger": [],
|
|
4714
|
+
* // "variable": []
|
|
4715
|
+
* // }
|
|
4716
|
+
* }
|
|
4717
|
+
*
|
|
4718
|
+
* main().catch(e => {
|
|
4719
|
+
* console.error(e);
|
|
4720
|
+
* throw e;
|
|
4721
|
+
* });
|
|
4722
|
+
*
|
|
4723
|
+
* ```
|
|
1966
4724
|
*
|
|
1967
4725
|
* @param params - Parameters for request
|
|
1968
4726
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1977,6 +4735,90 @@ export declare namespace tagmanager_v1 {
|
|
|
1977
4735
|
undelete(callback: BodyResponseCallback<Schema$ContainerVersion>): void;
|
|
1978
4736
|
/**
|
|
1979
4737
|
* Updates a Container Version.
|
|
4738
|
+
* @example
|
|
4739
|
+
* ```js
|
|
4740
|
+
* // Before running the sample:
|
|
4741
|
+
* // - Enable the API at:
|
|
4742
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
4743
|
+
* // - Login into gcloud by running:
|
|
4744
|
+
* // ```sh
|
|
4745
|
+
* // $ gcloud auth application-default login
|
|
4746
|
+
* // ```
|
|
4747
|
+
* // - Install the npm module by running:
|
|
4748
|
+
* // ```sh
|
|
4749
|
+
* // $ npm install googleapis
|
|
4750
|
+
* // ```
|
|
4751
|
+
*
|
|
4752
|
+
* const {google} = require('googleapis');
|
|
4753
|
+
* const tagmanager = google.tagmanager('v1');
|
|
4754
|
+
*
|
|
4755
|
+
* async function main() {
|
|
4756
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4757
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4758
|
+
* scopes: [
|
|
4759
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containerversions',
|
|
4760
|
+
* ],
|
|
4761
|
+
* });
|
|
4762
|
+
*
|
|
4763
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4764
|
+
* const authClient = await auth.getClient();
|
|
4765
|
+
* google.options({auth: authClient});
|
|
4766
|
+
*
|
|
4767
|
+
* // Do the magic
|
|
4768
|
+
* const res = await tagmanager.accounts.containers.versions.update({
|
|
4769
|
+
* // The GTM Account ID.
|
|
4770
|
+
* accountId: 'placeholder-value',
|
|
4771
|
+
* // The GTM Container ID.
|
|
4772
|
+
* containerId: 'placeholder-value',
|
|
4773
|
+
* // The GTM Container Version ID.
|
|
4774
|
+
* containerVersionId: 'placeholder-value',
|
|
4775
|
+
* // When provided, this fingerprint must match the fingerprint of the container version in storage.
|
|
4776
|
+
* fingerprint: 'placeholder-value',
|
|
4777
|
+
*
|
|
4778
|
+
* // Request body metadata
|
|
4779
|
+
* requestBody: {
|
|
4780
|
+
* // request body parameters
|
|
4781
|
+
* // {
|
|
4782
|
+
* // "accountId": "my_accountId",
|
|
4783
|
+
* // "container": {},
|
|
4784
|
+
* // "containerId": "my_containerId",
|
|
4785
|
+
* // "containerVersionId": "my_containerVersionId",
|
|
4786
|
+
* // "deleted": false,
|
|
4787
|
+
* // "fingerprint": "my_fingerprint",
|
|
4788
|
+
* // "folder": [],
|
|
4789
|
+
* // "name": "my_name",
|
|
4790
|
+
* // "notes": "my_notes",
|
|
4791
|
+
* // "tag": [],
|
|
4792
|
+
* // "trigger": [],
|
|
4793
|
+
* // "variable": []
|
|
4794
|
+
* // }
|
|
4795
|
+
* },
|
|
4796
|
+
* });
|
|
4797
|
+
* console.log(res.data);
|
|
4798
|
+
*
|
|
4799
|
+
* // Example response
|
|
4800
|
+
* // {
|
|
4801
|
+
* // "accountId": "my_accountId",
|
|
4802
|
+
* // "container": {},
|
|
4803
|
+
* // "containerId": "my_containerId",
|
|
4804
|
+
* // "containerVersionId": "my_containerVersionId",
|
|
4805
|
+
* // "deleted": false,
|
|
4806
|
+
* // "fingerprint": "my_fingerprint",
|
|
4807
|
+
* // "folder": [],
|
|
4808
|
+
* // "name": "my_name",
|
|
4809
|
+
* // "notes": "my_notes",
|
|
4810
|
+
* // "tag": [],
|
|
4811
|
+
* // "trigger": [],
|
|
4812
|
+
* // "variable": []
|
|
4813
|
+
* // }
|
|
4814
|
+
* }
|
|
4815
|
+
*
|
|
4816
|
+
* main().catch(e => {
|
|
4817
|
+
* console.error(e);
|
|
4818
|
+
* throw e;
|
|
4819
|
+
* });
|
|
4820
|
+
*
|
|
4821
|
+
* ```
|
|
1980
4822
|
*
|
|
1981
4823
|
* @param params - Parameters for request
|
|
1982
4824
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2123,6 +4965,68 @@ export declare namespace tagmanager_v1 {
|
|
|
2123
4965
|
constructor(context: APIRequestContext);
|
|
2124
4966
|
/**
|
|
2125
4967
|
* Creates a user's Account & Container Permissions.
|
|
4968
|
+
* @example
|
|
4969
|
+
* ```js
|
|
4970
|
+
* // Before running the sample:
|
|
4971
|
+
* // - Enable the API at:
|
|
4972
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
4973
|
+
* // - Login into gcloud by running:
|
|
4974
|
+
* // ```sh
|
|
4975
|
+
* // $ gcloud auth application-default login
|
|
4976
|
+
* // ```
|
|
4977
|
+
* // - Install the npm module by running:
|
|
4978
|
+
* // ```sh
|
|
4979
|
+
* // $ npm install googleapis
|
|
4980
|
+
* // ```
|
|
4981
|
+
*
|
|
4982
|
+
* const {google} = require('googleapis');
|
|
4983
|
+
* const tagmanager = google.tagmanager('v1');
|
|
4984
|
+
*
|
|
4985
|
+
* async function main() {
|
|
4986
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4987
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4988
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.manage.users'],
|
|
4989
|
+
* });
|
|
4990
|
+
*
|
|
4991
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4992
|
+
* const authClient = await auth.getClient();
|
|
4993
|
+
* google.options({auth: authClient});
|
|
4994
|
+
*
|
|
4995
|
+
* // Do the magic
|
|
4996
|
+
* const res = await tagmanager.accounts.permissions.create({
|
|
4997
|
+
* // The GTM Account ID.
|
|
4998
|
+
* accountId: 'placeholder-value',
|
|
4999
|
+
*
|
|
5000
|
+
* // Request body metadata
|
|
5001
|
+
* requestBody: {
|
|
5002
|
+
* // request body parameters
|
|
5003
|
+
* // {
|
|
5004
|
+
* // "accountAccess": {},
|
|
5005
|
+
* // "accountId": "my_accountId",
|
|
5006
|
+
* // "containerAccess": [],
|
|
5007
|
+
* // "emailAddress": "my_emailAddress",
|
|
5008
|
+
* // "permissionId": "my_permissionId"
|
|
5009
|
+
* // }
|
|
5010
|
+
* },
|
|
5011
|
+
* });
|
|
5012
|
+
* console.log(res.data);
|
|
5013
|
+
*
|
|
5014
|
+
* // Example response
|
|
5015
|
+
* // {
|
|
5016
|
+
* // "accountAccess": {},
|
|
5017
|
+
* // "accountId": "my_accountId",
|
|
5018
|
+
* // "containerAccess": [],
|
|
5019
|
+
* // "emailAddress": "my_emailAddress",
|
|
5020
|
+
* // "permissionId": "my_permissionId"
|
|
5021
|
+
* // }
|
|
5022
|
+
* }
|
|
5023
|
+
*
|
|
5024
|
+
* main().catch(e => {
|
|
5025
|
+
* console.error(e);
|
|
5026
|
+
* throw e;
|
|
5027
|
+
* });
|
|
5028
|
+
*
|
|
5029
|
+
* ```
|
|
2126
5030
|
*
|
|
2127
5031
|
* @param params - Parameters for request
|
|
2128
5032
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2137,6 +5041,49 @@ export declare namespace tagmanager_v1 {
|
|
|
2137
5041
|
create(callback: BodyResponseCallback<Schema$UserAccess>): void;
|
|
2138
5042
|
/**
|
|
2139
5043
|
* Removes a user from the account, revoking access to it and all of its containers.
|
|
5044
|
+
* @example
|
|
5045
|
+
* ```js
|
|
5046
|
+
* // Before running the sample:
|
|
5047
|
+
* // - Enable the API at:
|
|
5048
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
5049
|
+
* // - Login into gcloud by running:
|
|
5050
|
+
* // ```sh
|
|
5051
|
+
* // $ gcloud auth application-default login
|
|
5052
|
+
* // ```
|
|
5053
|
+
* // - Install the npm module by running:
|
|
5054
|
+
* // ```sh
|
|
5055
|
+
* // $ npm install googleapis
|
|
5056
|
+
* // ```
|
|
5057
|
+
*
|
|
5058
|
+
* const {google} = require('googleapis');
|
|
5059
|
+
* const tagmanager = google.tagmanager('v1');
|
|
5060
|
+
*
|
|
5061
|
+
* async function main() {
|
|
5062
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5063
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5064
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.manage.users'],
|
|
5065
|
+
* });
|
|
5066
|
+
*
|
|
5067
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5068
|
+
* const authClient = await auth.getClient();
|
|
5069
|
+
* google.options({auth: authClient});
|
|
5070
|
+
*
|
|
5071
|
+
* // Do the magic
|
|
5072
|
+
* const res = await tagmanager.accounts.permissions.delete({
|
|
5073
|
+
* // The GTM Account ID.
|
|
5074
|
+
* accountId: 'placeholder-value',
|
|
5075
|
+
* // The GTM User ID.
|
|
5076
|
+
* permissionId: 'placeholder-value',
|
|
5077
|
+
* });
|
|
5078
|
+
* console.log(res.data);
|
|
5079
|
+
* }
|
|
5080
|
+
*
|
|
5081
|
+
* main().catch(e => {
|
|
5082
|
+
* console.error(e);
|
|
5083
|
+
* throw e;
|
|
5084
|
+
* });
|
|
5085
|
+
*
|
|
5086
|
+
* ```
|
|
2140
5087
|
*
|
|
2141
5088
|
* @param params - Parameters for request
|
|
2142
5089
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2151,6 +5098,58 @@ export declare namespace tagmanager_v1 {
|
|
|
2151
5098
|
delete(callback: BodyResponseCallback<void>): void;
|
|
2152
5099
|
/**
|
|
2153
5100
|
* Gets a user's Account & Container Permissions.
|
|
5101
|
+
* @example
|
|
5102
|
+
* ```js
|
|
5103
|
+
* // Before running the sample:
|
|
5104
|
+
* // - Enable the API at:
|
|
5105
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
5106
|
+
* // - Login into gcloud by running:
|
|
5107
|
+
* // ```sh
|
|
5108
|
+
* // $ gcloud auth application-default login
|
|
5109
|
+
* // ```
|
|
5110
|
+
* // - Install the npm module by running:
|
|
5111
|
+
* // ```sh
|
|
5112
|
+
* // $ npm install googleapis
|
|
5113
|
+
* // ```
|
|
5114
|
+
*
|
|
5115
|
+
* const {google} = require('googleapis');
|
|
5116
|
+
* const tagmanager = google.tagmanager('v1');
|
|
5117
|
+
*
|
|
5118
|
+
* async function main() {
|
|
5119
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5120
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5121
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.manage.users'],
|
|
5122
|
+
* });
|
|
5123
|
+
*
|
|
5124
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5125
|
+
* const authClient = await auth.getClient();
|
|
5126
|
+
* google.options({auth: authClient});
|
|
5127
|
+
*
|
|
5128
|
+
* // Do the magic
|
|
5129
|
+
* const res = await tagmanager.accounts.permissions.get({
|
|
5130
|
+
* // The GTM Account ID.
|
|
5131
|
+
* accountId: 'placeholder-value',
|
|
5132
|
+
* // The GTM User ID.
|
|
5133
|
+
* permissionId: 'placeholder-value',
|
|
5134
|
+
* });
|
|
5135
|
+
* console.log(res.data);
|
|
5136
|
+
*
|
|
5137
|
+
* // Example response
|
|
5138
|
+
* // {
|
|
5139
|
+
* // "accountAccess": {},
|
|
5140
|
+
* // "accountId": "my_accountId",
|
|
5141
|
+
* // "containerAccess": [],
|
|
5142
|
+
* // "emailAddress": "my_emailAddress",
|
|
5143
|
+
* // "permissionId": "my_permissionId"
|
|
5144
|
+
* // }
|
|
5145
|
+
* }
|
|
5146
|
+
*
|
|
5147
|
+
* main().catch(e => {
|
|
5148
|
+
* console.error(e);
|
|
5149
|
+
* throw e;
|
|
5150
|
+
* });
|
|
5151
|
+
*
|
|
5152
|
+
* ```
|
|
2154
5153
|
*
|
|
2155
5154
|
* @param params - Parameters for request
|
|
2156
5155
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2165,6 +5164,52 @@ export declare namespace tagmanager_v1 {
|
|
|
2165
5164
|
get(callback: BodyResponseCallback<Schema$UserAccess>): void;
|
|
2166
5165
|
/**
|
|
2167
5166
|
* List all users that have access to the account along with Account and Container Permissions granted to each of them.
|
|
5167
|
+
* @example
|
|
5168
|
+
* ```js
|
|
5169
|
+
* // Before running the sample:
|
|
5170
|
+
* // - Enable the API at:
|
|
5171
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
5172
|
+
* // - Login into gcloud by running:
|
|
5173
|
+
* // ```sh
|
|
5174
|
+
* // $ gcloud auth application-default login
|
|
5175
|
+
* // ```
|
|
5176
|
+
* // - Install the npm module by running:
|
|
5177
|
+
* // ```sh
|
|
5178
|
+
* // $ npm install googleapis
|
|
5179
|
+
* // ```
|
|
5180
|
+
*
|
|
5181
|
+
* const {google} = require('googleapis');
|
|
5182
|
+
* const tagmanager = google.tagmanager('v1');
|
|
5183
|
+
*
|
|
5184
|
+
* async function main() {
|
|
5185
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5186
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5187
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.manage.users'],
|
|
5188
|
+
* });
|
|
5189
|
+
*
|
|
5190
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5191
|
+
* const authClient = await auth.getClient();
|
|
5192
|
+
* google.options({auth: authClient});
|
|
5193
|
+
*
|
|
5194
|
+
* // Do the magic
|
|
5195
|
+
* const res = await tagmanager.accounts.permissions.list({
|
|
5196
|
+
* // The GTM Account ID.
|
|
5197
|
+
* accountId: 'placeholder-value',
|
|
5198
|
+
* });
|
|
5199
|
+
* console.log(res.data);
|
|
5200
|
+
*
|
|
5201
|
+
* // Example response
|
|
5202
|
+
* // {
|
|
5203
|
+
* // "userAccess": []
|
|
5204
|
+
* // }
|
|
5205
|
+
* }
|
|
5206
|
+
*
|
|
5207
|
+
* main().catch(e => {
|
|
5208
|
+
* console.error(e);
|
|
5209
|
+
* throw e;
|
|
5210
|
+
* });
|
|
5211
|
+
*
|
|
5212
|
+
* ```
|
|
2168
5213
|
*
|
|
2169
5214
|
* @param params - Parameters for request
|
|
2170
5215
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2179,6 +5224,70 @@ export declare namespace tagmanager_v1 {
|
|
|
2179
5224
|
list(callback: BodyResponseCallback<Schema$ListAccountUsersResponse>): void;
|
|
2180
5225
|
/**
|
|
2181
5226
|
* Updates a user's Account & Container Permissions.
|
|
5227
|
+
* @example
|
|
5228
|
+
* ```js
|
|
5229
|
+
* // Before running the sample:
|
|
5230
|
+
* // - Enable the API at:
|
|
5231
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
5232
|
+
* // - Login into gcloud by running:
|
|
5233
|
+
* // ```sh
|
|
5234
|
+
* // $ gcloud auth application-default login
|
|
5235
|
+
* // ```
|
|
5236
|
+
* // - Install the npm module by running:
|
|
5237
|
+
* // ```sh
|
|
5238
|
+
* // $ npm install googleapis
|
|
5239
|
+
* // ```
|
|
5240
|
+
*
|
|
5241
|
+
* const {google} = require('googleapis');
|
|
5242
|
+
* const tagmanager = google.tagmanager('v1');
|
|
5243
|
+
*
|
|
5244
|
+
* async function main() {
|
|
5245
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5246
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5247
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.manage.users'],
|
|
5248
|
+
* });
|
|
5249
|
+
*
|
|
5250
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5251
|
+
* const authClient = await auth.getClient();
|
|
5252
|
+
* google.options({auth: authClient});
|
|
5253
|
+
*
|
|
5254
|
+
* // Do the magic
|
|
5255
|
+
* const res = await tagmanager.accounts.permissions.update({
|
|
5256
|
+
* // The GTM Account ID.
|
|
5257
|
+
* accountId: 'placeholder-value',
|
|
5258
|
+
* // The GTM User ID.
|
|
5259
|
+
* permissionId: 'placeholder-value',
|
|
5260
|
+
*
|
|
5261
|
+
* // Request body metadata
|
|
5262
|
+
* requestBody: {
|
|
5263
|
+
* // request body parameters
|
|
5264
|
+
* // {
|
|
5265
|
+
* // "accountAccess": {},
|
|
5266
|
+
* // "accountId": "my_accountId",
|
|
5267
|
+
* // "containerAccess": [],
|
|
5268
|
+
* // "emailAddress": "my_emailAddress",
|
|
5269
|
+
* // "permissionId": "my_permissionId"
|
|
5270
|
+
* // }
|
|
5271
|
+
* },
|
|
5272
|
+
* });
|
|
5273
|
+
* console.log(res.data);
|
|
5274
|
+
*
|
|
5275
|
+
* // Example response
|
|
5276
|
+
* // {
|
|
5277
|
+
* // "accountAccess": {},
|
|
5278
|
+
* // "accountId": "my_accountId",
|
|
5279
|
+
* // "containerAccess": [],
|
|
5280
|
+
* // "emailAddress": "my_emailAddress",
|
|
5281
|
+
* // "permissionId": "my_permissionId"
|
|
5282
|
+
* // }
|
|
5283
|
+
* }
|
|
5284
|
+
*
|
|
5285
|
+
* main().catch(e => {
|
|
5286
|
+
* console.error(e);
|
|
5287
|
+
* throw e;
|
|
5288
|
+
* });
|
|
5289
|
+
*
|
|
5290
|
+
* ```
|
|
2182
5291
|
*
|
|
2183
5292
|
* @param params - Parameters for request
|
|
2184
5293
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|