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