├── .gitignore
├── LICENSE
├── README.md
├── cartridges
└── plugin_gtm
│ ├── .project
│ ├── cartridge
│ ├── controllers
│ │ ├── GTM.js
│ │ └── Search.js
│ ├── models
│ │ └── product
│ │ │ └── decorators
│ │ │ └── base.js
│ ├── plugin_gtm.properties
│ ├── scripts
│ │ ├── gtm
│ │ │ └── gtmHelpers.js
│ │ ├── hooks.json
│ │ └── hooks
│ │ │ └── gtm
│ │ │ └── gtmhooks.js
│ ├── static
│ │ └── default
│ │ │ └── js
│ │ │ └── tagmanager.js
│ └── templates
│ │ ├── default
│ │ ├── checkout
│ │ │ └── productCard
│ │ │ │ └── productCardProductNameAndRemove.isml
│ │ ├── common
│ │ │ └── layout
│ │ │ │ ├── checkout.isml
│ │ │ │ ├── page.isml
│ │ │ │ └── pdStorePage.isml
│ │ ├── components
│ │ │ └── deleteButton.isml
│ │ ├── gtm
│ │ │ ├── gtmCustomerData.isml
│ │ │ ├── gtmImpressionData.isml
│ │ │ ├── gtmNoScript.isml
│ │ │ └── gtmScript.isml
│ │ ├── product
│ │ │ ├── components
│ │ │ │ ├── addToCartGlobal.isml
│ │ │ │ └── addToCartProduct.isml
│ │ │ └── gridTile.isml
│ │ └── search
│ │ │ └── productGrid.isml
│ │ └── resources
│ │ └── googletagmanager.properties
│ └── package.json
└── metadata
├── GTM-Container-GA4.json
├── GTM-Container.json
└── gtm_metadata.xml
/.gitignore:
--------------------------------------------------------------------------------
1 | dw.json
2 | .vscode
3 | .history
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Red Van Workshop
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | SFCC Google Tag Manager Plugin
4 | ---
5 |
6 | An easy to use Google Tag Manager plugin for Salesforce Commerce Cloud, specifically SFRA. This plugin is almost entirely plug and play.
7 |
8 | Installation
9 | ---
10 | - Download this repo and add it to your project
11 | - Add sfcc-plugin-gtm cartridge to your site path in Business Manager
12 | - Import the metadata found in the metadata folder named `gtm_metadata.xml`
13 | - Enable GTM and add GTM ID in Business Manager Custom Preferences
14 |
15 | Note: There is also file named GTM-Container.json in the metadata folder that is a starting template for your GTM container if you need one.
16 |
17 |
18 | Troubleshooting
19 | ---
20 |
21 | If you are having issues, it's most likely because of some conflict. This plugin extends the Search-UpdateGrid route, extends the base.js decorator of the product model and also a handful of template files. I'd start there. Otherwise feel free to create an issue.
22 |
--------------------------------------------------------------------------------
/cartridges/plugin_gtm/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | plugin_gtm
4 |
5 |
6 |
7 |
8 |
9 | com.demandware.studio.core.beehiveElementBuilder
10 |
11 |
12 |
13 |
14 |
15 | com.demandware.studio.core.beehiveNature
16 |
17 |
--------------------------------------------------------------------------------
/cartridges/plugin_gtm/cartridge/controllers/GTM.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var server = require('server');
4 |
5 | var gtmHelpers = require('*/cartridge/scripts/gtm/gtmHelpers');
6 |
7 | server.get('CustomerData', function (req, res, next) {
8 | var customerData = gtmHelpers.getCustomerData(req);
9 |
10 | res.render('/gtm/gtmCustomerData', {
11 | customerData: JSON.stringify(customerData)
12 | });
13 | next();
14 | });
15 |
16 | // should be used if search pages load products via ajax instead of using pagination
17 | server.get('ImpressionData', function (req, res, next) {
18 | var searchImpressionData = gtmHelpers.getSearchImpressionData(req);
19 | searchImpressionData.event = 'searchImpressions';
20 |
21 | var ga4SearchImpressionData = gtmHelpers.getGA4SearchImpressionData(req);
22 | ga4SearchImpressionData.event = 'view_item_list';
23 |
24 | res.render('/gtm/gtmImpressionData', {
25 | searchImpressionData: JSON.stringify(searchImpressionData),
26 | ga4SearchImpressionData: JSON.stringify(ga4SearchImpressionData)
27 | });
28 | next();
29 | });
30 |
31 | // render helpers for velocity template use from hooks
32 | server.get('HtmlHead', server.middleware.include, function (req, res, next) {
33 | res.render('gtm/gtmScript', {
34 | id: gtmHelpers.gtmContainer,
35 | action: req.querystring.action,
36 | datalayer: req.querystring.datalayer,
37 | ga4datalayer: req.querystring.ga4datalayer,
38 | gtmEnabled: req.querystring.gtmEnabled
39 | });
40 |
41 | next();
42 | });
43 |
44 | // render helpers for velocity template use from hooks
45 | server.get('BeforeHeader', server.middleware.include, function (req, res, next) {
46 | res.render('gtm/gtmNoScript', {
47 | id: gtmHelpers.gtmContainer
48 | });
49 |
50 | next();
51 | });
52 |
53 | module.exports = server.exports();
54 |
--------------------------------------------------------------------------------
/cartridges/plugin_gtm/cartridge/controllers/Search.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var server = require('server');
4 | server.extend(module.superModule);
5 |
6 | var gtmHelpers = require('*/cartridge/scripts/gtm/gtmHelpers');
7 |
8 | server.append('UpdateGrid', function (req, res, next) {
9 | var viewData = res.getViewData();
10 |
11 | if (gtmHelpers.isEnabled) {
12 | var searchImpressionData = gtmHelpers.getSearchImpressionData(viewData);
13 | searchImpressionData.event = 'searchImpressions';
14 | viewData.searchImpressionData = JSON.stringify(searchImpressionData);
15 |
16 | var ga4SearchImpressionData = gtmHelpers.getGA4SearchImpressionData(viewData);
17 | ga4SearchImpressionData.event = 'view_item_list';
18 | viewData.ga4SearchImpressionData = JSON.stringify(ga4SearchImpressionData);
19 | }
20 |
21 | res.setViewData(viewData);
22 | next();
23 | });
24 |
25 | module.exports = server.exports();
26 |
--------------------------------------------------------------------------------
/cartridges/plugin_gtm/cartridge/models/product/decorators/base.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var base = module.superModule;
4 | var gtmHelpers = require('*/cartridge/scripts/gtm/gtmHelpers');
5 |
6 | module.exports = function (object, apiProduct, type) {
7 | base.call(this, object, apiProduct, type);
8 |
9 | Object.defineProperty(object, 'gtmData', {
10 | enumerable: true,
11 | value: gtmHelpers.getProductObject(apiProduct)
12 | });
13 |
14 | Object.defineProperty(object, 'gtmGA4Data', {
15 | enumerable: true,
16 | value: gtmHelpers.getGA4ProductObject(apiProduct),
17 | writable: true
18 | });
19 | };
20 |
--------------------------------------------------------------------------------
/cartridges/plugin_gtm/cartridge/plugin_gtm.properties:
--------------------------------------------------------------------------------
1 | ## cartridge.properties for cartridge plugin-gtm
2 | #Tue Nov 19 2019 08:21:48 GMT-0800 (Pacific Standard Time)
3 | demandware.cartridges.plugin_gtm.multipleLanguageStorefront=true
4 | demandware.cartridges.plugin_gtm.id=plugin_gtm
5 |
--------------------------------------------------------------------------------
/cartridges/plugin_gtm/cartridge/scripts/gtm/gtmHelpers.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var ProductMgr = require('dw/catalog/ProductMgr');
4 | var Resource = require('dw/web/Resource');
5 |
6 | var Site = require('dw/system/Site');
7 | var gtmEnabled = Site.current.getCustomPreferenceValue('GTMEnable') || false;
8 | var gtmga4Enabled = Site.current.getCustomPreferenceValue('GTMGA4Enable') || false;
9 | var gtmContainerId = Site.current.getCustomPreferenceValue('GTMID') || '';
10 |
11 | var SITE_NAME = 'Sites-'+Site.current.ID+'-Site';
12 | /**
13 | * @param {Object} res - current route response object
14 | * @returns {Object} an object of containing customer data
15 | */
16 | function getCustomerData(res) {
17 | var system = require('dw/system/System');
18 | var customer = res.currentCustomer.raw,
19 | profile = customer.profile,
20 | session = request.session,
21 | customerObject = {};
22 |
23 | customerObject.environment = (system.instanceType === system.PRODUCTION_SYSTEM ? 'production' : 'development');
24 | customerObject.demandwareID = customer.ID;
25 | customerObject.loggedInState = customer.authenticated;
26 | if (res.locale && res.locale.id) {
27 | customerObject.locale = res.locale.id;
28 | } else {
29 | customerObject.locale = Site.current.defaultLocale;
30 | }
31 | customerObject.currencyCode = session.currency.currencyCode;
32 | customerObject.pageLanguage = request.httpLocale;
33 | customerObject.registered = customer.registered;
34 |
35 | if (customer.registered && profile != null) {
36 | customerObject.email = profile.email.toLowerCase();
37 | customerObject.emailHash = dw.crypto.Encoding.toHex(new dw.crypto.MessageDigest('SHA-256').digestBytes(new dw.util.Bytes(profile.email.toLowerCase())));
38 | customerObject.user_id = profile.customerNo;
39 | } else {
40 | var email = (session.custom.email == null) ? '' : session.custom.email;
41 | var emailHash = (session.custom.emailHash == null) ? '' : session.custom.emailHash;
42 | customerObject.email = email;
43 | customerObject.emailHash = emailHash;
44 | customerObject.user_id = '';
45 | }
46 |
47 | return customerObject;
48 | }
49 |
50 | /**
51 | * @returns {Object} an object of containing home page data
52 | */
53 | function getHomeData() {
54 | var obj = {
55 | 'event': 'home'
56 | };
57 | return obj;
58 | }
59 |
60 | /**
61 | * @param {Product} product - An instance of a product
62 | * @return {Object} Object containing product data
63 | */
64 | function getProductObject(product) {
65 | var obj = {};
66 | obj.id = product.ID;
67 | var master = product.variationModel.master;
68 | if (product.variant) {
69 | obj.id = master.ID;
70 | }
71 |
72 | obj.name = product.name;
73 |
74 | if (product.primaryCategory != null) {
75 | obj.category = product.primaryCategory.displayName;
76 | obj.categoryID = product.primaryCategory.ID.replace(/_/gi, '/');
77 | } else if (master && master.primaryCategory != null) {
78 | obj.category = master.primaryCategory.displayName;
79 | obj.categoryID = master.primaryCategory.ID.replace(/_/gi, '/');
80 | }
81 |
82 | if (product.priceModel.maxPrice.valueOrNull != null) {
83 | obj.price = product.priceModel.maxPrice.value.toFixed(2);
84 | } else if (product.priceModel.price.valueOrNull != null) {
85 | obj.price = product.priceModel.price.value.toFixed(2);
86 | obj.currencyCode = product.priceModel.price.currencyCode;
87 | }
88 | return obj;
89 | };
90 |
91 | /**
92 | * @param {Product} product - An instance of a product
93 | * @return {Object} Object containing product data
94 | */
95 | function getGA4ProductObject(product) {
96 | var obj = {};
97 | obj.item_id = product.ID;
98 | var master = product.variationModel.master;
99 | if (product.variant) {
100 | obj.item_id = master.ID;
101 | obj.item_variant = product.ID;
102 | }
103 |
104 | obj.item_name = product.name;
105 |
106 | if (product.primaryCategory != null) {
107 | obj.item_category = product.primaryCategory.displayName;
108 | } else if (master && master.primaryCategory != null) {
109 | obj.item_category = master.primaryCategory.displayName;
110 | }
111 |
112 | if (product.priceModel.maxPrice.valueOrNull != null) {
113 | obj.price = product.priceModel.maxPrice.value.toFixed(2);
114 | obj.currencyCode = product.priceModel.maxPrice.currencyCode;
115 | } else if (product.priceModel.price.valueOrNull != null) {
116 | obj.price = product.priceModel.price.value.toFixed(2);
117 | obj.currencyCode = product.priceModel.price.currencyCode;
118 | }
119 |
120 | return obj;
121 | }
122 |
123 | /**
124 | * @param {Object} res - current route response object
125 | * @returns {Object} an object of containing pdp data
126 | */
127 | function getPdpData(res) {
128 | var obj = {
129 | 'event': 'pdp',
130 | 'ecommerce': {
131 | 'detail': {
132 | 'actionField': {
133 | 'list': Resource.msg('ecommerce.list.pdp', 'googletagmanager', null)
134 | },
135 | 'products': []
136 | }
137 | }
138 | };
139 |
140 | if ('product' in res) {
141 | var product = ProductMgr.getProduct(res.product.id);
142 | obj.ecommerce.detail.products.push(module.exports.getProductObject(product));
143 | }
144 | return obj;
145 | }
146 |
147 | /**
148 | * @param {Object} res - current route response object
149 | * @returns {Object} an object of containing pdp data
150 | */
151 | function getGA4PdpData(res) {
152 | if ('product' in res) {
153 | var product = ProductMgr.getProduct(res.product.id);
154 | var productObject = module.exports.getGA4ProductObject(product);
155 |
156 | return {
157 | 'event': 'view_item',
158 | 'ecommerce': {
159 | 'currencyCode': productObject.currencyCode,
160 | 'value': productObject.price,
161 | 'items': [productObject]
162 | }
163 | };
164 | }
165 |
166 | return {};
167 | }
168 |
169 | /**
170 | * @param {dw.util.Iterator} productList - Iterator composed of Products, ProductListItems, or ProductLineItems
171 | * @param {Function} callback - Callback that constructs the object that will be added to the returned Array
172 | * @param {Boolean} ga4 - is a GA4 event
173 | * @returns {Array} an array containing product data
174 | */
175 | function getProductArrayFromList(productList, callback, ga4) {
176 | var productArray = new Array(),
177 | position = 1;
178 |
179 | while (productList.hasNext()) {
180 | var item = productList.next(),
181 | prodObj = {};
182 |
183 | if (item instanceof dw.catalog.Product || item instanceof dw.catalog.Variant) {
184 | prodObj = callback(item);
185 | if (ga4) {
186 | prodObj.index = position;
187 | } else {
188 | prodObj.position = position;
189 | prodObj.list = 'Search Results';
190 | }
191 | } else if (item instanceof dw.customer.ProductListItem || item instanceof dw.order.ProductLineItem) {
192 | prodObj = callback(item);
193 | }
194 | productArray.push(prodObj);
195 | position++;
196 | }
197 | return productArray;
198 | }
199 |
200 | /**
201 | * @param {Object} res - current route response object
202 | * @returns {Object} an object containing a product list
203 | */
204 | function getSearchProducts(res) {
205 |
206 | var products = new dw.util.ArrayList();
207 | if ('productSearch' in res) {
208 | for (var i = 0; i < res.productSearch.productIds.length; i++) {
209 | var product = ProductMgr.getProduct(res.productSearch.productIds[i].productID);
210 | products.add1(product);
211 | }
212 | }
213 | return products;
214 | }
215 |
216 | /**
217 | * @param {Object} res - current route response object
218 | * @return {Object} Object containing search impression data.
219 | */
220 | function getSearchImpressionData(res) {
221 | var ecommerce = {
222 | 'event': 'search',
223 | 'ecommerce': {
224 | 'impressions': module.exports.getProductArrayFromList((module.exports.getSearchProducts(res)).iterator(), module.exports.getProductObject, false)
225 | }
226 | };
227 | return ecommerce;
228 | }
229 |
230 | /**
231 | * @param {Object} res - current route response object
232 | * @return {Object} Object containing search impression data.
233 | */
234 | function getGA4SearchImpressionData(res) {
235 | var obj = {
236 | 'event': 'view_item_list',
237 | 'ecommerce': {
238 | 'items': module.exports.getProductArrayFromList(module.exports.getSearchProducts(res).iterator(), module.exports.getGA4ProductObject, true)
239 | }
240 | };
241 |
242 | if ('productSearch' in res && 'category' in res.productSearch) {
243 | if ('id' in res.productSearch.category) {
244 | obj.ecommerce['item_list_id'] = res.productSearch.category.id;
245 | }
246 | if ('name' in res.productSearch.category) {
247 | obj.ecommerce['item_list_name'] = res.productSearch.category.name;
248 | }
249 | }
250 |
251 | return obj;
252 | }
253 |
254 | /**
255 | * @param {Object} productLineItem - a product line item
256 | * @returns {Object} an object containing order product data
257 | */
258 | function getOrderProductObject(productLineItem) {
259 | var obj = module.exports.getProductObject(productLineItem.getProduct());
260 | obj.quantity = productLineItem.getQuantityValue();
261 | return obj;
262 | }
263 |
264 | /**
265 | * @param {Object} productLineItem - a product line item
266 | * @returns {Object} an object containing order product data
267 | */
268 | function getGA4OrderProductObject(productLineItem) {
269 | var obj = module.exports.getGA4ProductObject(productLineItem.getProduct());
270 | obj.quantity = productLineItem.getQuantityValue();
271 | return obj;
272 | }
273 |
274 | /**
275 | * @param {String} step - string of the current step
276 | * @return {Object} Object containing checkout step data.
277 | */
278 | function getCheckoutData(step) {
279 | var obj = {
280 | 'event': 'checkout',
281 | 'ecommerce': {
282 | 'checkout': {
283 | 'actionField': {
284 | 'step': step
285 | },
286 | 'products': []
287 | }
288 | }
289 | };
290 |
291 | var currentBasket = dw.order.BasketMgr.getCurrentBasket();
292 | if (currentBasket != null) {
293 | obj.ecommerce.checkout.products = module.exports.getProductArrayFromList(currentBasket.getProductLineItems().iterator(), module.exports.getOrderProductObject, false);
294 | obj.currencyCode = currentBasket.currencyCode;
295 | }
296 | return obj;
297 | }
298 |
299 | /**
300 | * @param {String} step - string of the current step, potential values: view_cart, begin_checkout, add_shipping_info, add_payment_info
301 | * @return {Object} Object containing GA4 checkout data
302 | */
303 | function getGA4CheckoutData(step) {
304 | var currentBasket = dw.order.BasketMgr.getCurrentBasket();
305 |
306 | if (currentBasket != null) {
307 | var obj = {
308 | 'event': step,
309 | 'ecommerce': {
310 | 'currencyCode': currentBasket.currencyCode,
311 | 'value': currentBasket.getAdjustedMerchandizeTotalNetPrice().value.toFixed(2),
312 | 'items': module.exports.getProductArrayFromList(currentBasket.getProductLineItems().iterator(), module.exports.getGA4OrderProductObject, true)
313 | }
314 | };
315 |
316 | if (step == 'begin_checkout' || step == 'add_shipping_info' || step == 'add_payment_info') {
317 | var coupons = getCoupons(currentBasket.getCouponLineItems().iterator());
318 |
319 | if (!empty(coupons)) {
320 | obj.ecommerce.coupon = coupons;
321 | }
322 | }
323 |
324 | if (step == 'add_shipping_info') {
325 | var shipment = currentBasket.getDefaultShipment();
326 |
327 | if ('shippingMethod' in shipment && 'displayName' in shipment.shippingMethod) {
328 | obj.ecommerce.shipping_tier = shipment.shippingMethod.displayName;
329 | }
330 | }
331 |
332 | if (step == 'add_payment_info') {
333 | var paymentInstrumentsArray = new Array();
334 | var paymentInstruments = currentBasket.getPaymentInstruments().iterator();
335 |
336 | while (paymentInstruments.hasNext()) {
337 | var paymentInstrument = paymentInstruments.next();
338 | paymentInstrumentsArray.push(paymentInstrument.paymentMethod);
339 | }
340 |
341 | if (paymentInstrumentsArray.length > 0) {
342 | obj.ecommerce.payment_type = paymentInstrumentsArray.join(',');
343 | }
344 | }
345 |
346 | return obj;
347 | }
348 |
349 | return {};
350 | }
351 |
352 | /**
353 | * @param {CouponLineItems} coupons - a collection of all the order coupons
354 | * @return {String} a comman separated string of all the coupons in the order
355 | */
356 | function getCoupons(coupons) {
357 | var text = new Array();
358 |
359 | while (coupons.hasNext()) {
360 | var coupon = coupons.next();
361 | text.push(coupon.promotion.campaign.ID);
362 | }
363 |
364 | return text.join(',');
365 | }
366 |
367 | /**
368 | * @param {Order} order - the current order
369 | * @param {String} step - string of the current step
370 | * @return {Object} obj containing confirmation page transaction details
371 | */
372 | function getConfirmationActionFieldObject(order, step) {
373 | var discount = order.merchandizeTotalNetPrice.decimalValue - order.adjustedMerchandizeTotalNetPrice.decimalValue;
374 | var obj = {
375 | id: order.getOrderNo(),
376 | step: step,
377 | affiliation: Site.current.ID,
378 | revenue: order.getAdjustedMerchandizeTotalPrice(true).getValue().toFixed(2),
379 | tax: order.getTotalTax().getValue().toFixed(2),
380 | shipping: order.getAdjustedShippingTotalPrice().getValue().toFixed(2),
381 | discount: discount.toFixed(2),
382 | coupon: module.exports.getCoupons(order.getCouponLineItems().iterator())
383 | };
384 |
385 | return obj;
386 | }
387 |
388 | /**
389 | * @param {object} res - current route response object
390 | * @param {String} step - string of the current step
391 | * @return {Object} Object containing confirmation page data.
392 | */
393 | function getConfirmationData(res, step) {
394 | var obj = {
395 | 'event': 'order-confirmation',
396 | 'ecommerce': {
397 | 'purchase': {
398 | 'actionField': {},
399 | 'products': []
400 | }
401 | }
402 | };
403 |
404 | var order = null;
405 | try {
406 | if ('orderToken' in res.CurrentHttpParameterMap) {
407 | order = dw.order.OrderMgr.getOrder(res.order ? res.order.orderNumber : res.CurrentHttpParameterMap.orderID.value, res.CurrentHttpParameterMap.orderToken.value);
408 | } else {
409 | order = dw.order.OrderMgr.getOrder(res.order ? res.order.orderNumber : res.CurrentHttpParameterMap.orderID.value);
410 | }
411 | } catch (e) {
412 | var Logger = require('dw/system/Logger');
413 | Logger.error('GTMHelpers - cannot retrieve order: ' + e.message);
414 | }
415 | if (order) {
416 | obj.ecommerce.purchase.products = module.exports.getProductArrayFromList(order.getProductLineItems().iterator(), module.exports.getOrderProductObject, false);
417 | obj.ecommerce.purchase.actionField = module.exports.getConfirmationActionFieldObject(order, step);
418 | obj.orderEmail = order.getCustomerEmail();
419 | obj.orderUser_id = order.getCustomerNo();
420 | obj.currencyCode = order.currencyCode;
421 | } else {
422 | obj.ecommerce.purchase.actionField = {
423 | step: step,
424 | affiliation: Site.current.ID
425 | };
426 | }
427 |
428 | return obj;
429 | }
430 |
431 | /**
432 | * @param {object} res - current route response object
433 | * @return {Object} Object containing confirmation page data.
434 | */
435 | function getGA4ConfirmationData(res) {
436 | var order = null;
437 | var obj = null;
438 |
439 | try {
440 | if ('orderToken' in res.CurrentHttpParameterMap) {
441 | order = dw.order.OrderMgr.getOrder(res.order ? res.order.orderNumber : res.CurrentHttpParameterMap.orderID.value, res.CurrentHttpParameterMap.orderToken.value);
442 | } else {
443 | order = dw.order.OrderMgr.getOrder(res.order ? res.order.orderNumber : res.CurrentHttpParameterMap.orderID.value);
444 | }
445 | } catch (e) {
446 | var Logger = require('dw/system/Logger');
447 | Logger.error('GTMHelpers - cannot retrieve order: ' + e.message);
448 | }
449 |
450 | if (order) {
451 | obj = {
452 | 'event': 'purchase',
453 | 'ecommerce': {
454 | 'currencyCode': order.currencyCode,
455 | 'transaction_id': order.orderNo,
456 | 'value': order.getAdjustedMerchandizeTotalPrice(true).getValue().toFixed(2),
457 | 'shipping': order.getAdjustedShippingTotalPrice().getValue().toFixed(2),
458 | 'tax': order.getTotalTax().getValue().toFixed(2),
459 | 'items': module.exports.getProductArrayFromList(order.getProductLineItems().iterator(), module.exports.getGA4OrderProductObject, true),
460 | 'affiliation': Site.current.ID
461 | }
462 | };
463 |
464 | var coupons = getCoupons(order.getCouponLineItems().iterator());
465 | if (!empty(coupons)) {
466 | obj.ecommerce['coupon'] = coupons;
467 | }
468 | }
469 |
470 | return obj;
471 | }
472 |
473 | /**
474 | * @param {object} res - current route response object
475 | * @param {Boolean} ga4 - is for GA4
476 | * @returns {Object} Object containing full datalayer
477 | */
478 | function getDataLayer(res, ga4) {
479 | if (ga4) {
480 | // GA4 Events
481 | switch (res.action) {
482 | case 'Product-Show':
483 | case 'Product-ShowInCategory':
484 | return module.exports.getGA4PdpData(res);
485 | case 'Search-Show':
486 | return module.exports.getGA4SearchImpressionData(res);
487 | case 'Cart-Show':
488 | return module.exports.getGA4CheckoutData('view_cart');
489 | case 'Checkout-Begin':
490 | return module.exports.getGA4CheckoutData('begin_checkout');
491 | case 'CheckoutShippingServices-SubmitShipping':
492 | return module.exports.getGA4CheckoutData('add_shipping_info');
493 | case 'CheckoutServices-SubmitPayment':
494 | return module.exports.getGA4CheckoutData('add_payment_info');
495 | case 'Order-Confirm':
496 | return module.exports.getGA4ConfirmationData(res);
497 | default:
498 | return false;
499 | }
500 | } else {
501 | // Universal GA Events
502 | switch (res.action) {
503 | case SITE_NAME:
504 | case 'Home-Show':
505 | case 'Default-Start':
506 | return module.exports.getHomeData();
507 | case 'Product-Show':
508 | case 'Product-ShowInCategory':
509 | return module.exports.getPdpData(res);
510 | case 'Search-Show':
511 | return module.exports.getSearchImpressionData(res);
512 | case 'Cart-Show':
513 | return module.exports.getCheckoutData(1);
514 | case 'Checkout-Begin':
515 | return module.exports.getCheckoutData(2);
516 | case 'CheckoutShippingServices-SubmitShipping':
517 | return module.exports.getCheckoutData(3);
518 | case 'CheckoutServices-SubmitPayment':
519 | return module.exports.getCheckoutData(4);
520 | case 'CheckoutServices-PlaceOrder':
521 | return module.exports.getCheckoutData(5);
522 | case 'Order-Confirm':
523 | return module.exports.getConfirmationData(res, 6);
524 | default:
525 | return false;
526 | }
527 | }
528 | }
529 |
530 | module.exports = {
531 | isEnabled: gtmEnabled,
532 | isGA4Enabled: gtmga4Enabled,
533 | gtmContainer: gtmContainerId,
534 | getDataLayer: getDataLayer,
535 | getProductObject: getProductObject,
536 | getGA4ProductObject: getGA4ProductObject,
537 | getCustomerData: getCustomerData,
538 | getSearchImpressionData: getSearchImpressionData,
539 | getGA4SearchImpressionData: getGA4SearchImpressionData,
540 | getHomeData: getHomeData,
541 | getPdpData: getPdpData,
542 | getGA4PdpData: getGA4PdpData,
543 | getCoupons: getCoupons,
544 | getConfirmationData: getConfirmationData,
545 | getGA4ConfirmationData: getGA4ConfirmationData,
546 | getConfirmationActionFieldObject: getConfirmationActionFieldObject,
547 | getProductArrayFromList: getProductArrayFromList,
548 | getSearchProducts: getSearchProducts,
549 | getOrderProductObject: getOrderProductObject,
550 | getGA4OrderProductObject: getGA4OrderProductObject,
551 | getCheckoutData: getCheckoutData,
552 | getGA4CheckoutData: getGA4CheckoutData
553 | };
554 |
--------------------------------------------------------------------------------
/cartridges/plugin_gtm/cartridge/scripts/hooks.json:
--------------------------------------------------------------------------------
1 | {
2 | "hooks": [
3 | {
4 | "name": "app.template.htmlHead",
5 | "script": "./hooks/gtm/gtmhooks.js"
6 | },
7 | {
8 | "name": "app.template.domInject",
9 | "script": "./hooks/gtm/gtmhooks.js"
10 | },
11 | {
12 | "name": "app.template.beforeHeader",
13 | "script": "./hooks/gtm/gtmhooks.js"
14 | },
15 | {
16 | "name": "app.server.registerRoute",
17 | "script": "./hooks/gtm/gtmhooks.js"
18 | }
19 | ]
20 | }
21 |
--------------------------------------------------------------------------------
/cartridges/plugin_gtm/cartridge/scripts/hooks/gtm/gtmhooks.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var velocity = require('dw/template/Velocity');
4 | var UUIDUtils = require('dw/util/UUIDUtils');
5 | var gtmHelpers = require('*/cartridge/scripts/gtm/gtmHelpers');
6 |
7 | /**
8 | * Should be executed inside of the head tags
9 | * Renders GTM code.
10 | */
11 | function htmlHead(pdict) {
12 | if (gtmHelpers.isEnabled) {
13 | var datalayer = gtmHelpers.getDataLayer(pdict, false);
14 | var ga4datalayer = gtmHelpers.isGA4Enabled ? gtmHelpers.getDataLayer(pdict, true) : false;
15 |
16 | velocity.render(
17 | "$velocity.remoteInclude('GTM-HtmlHead', 'action', $action, 'datalayer', $datalayer, 'ga4datalayer', $ga4datalayer, 'gtmEnabled', $gtmEnabled)",
18 | {
19 | velocity: velocity,
20 | action: pdict.action,
21 | datalayer: datalayer ? JSON.stringify(datalayer) : false,
22 | ga4datalayer: ga4datalayer ? JSON.stringify(ga4datalayer) : false,
23 | gtmEnabled: gtmHelpers.isEnabled
24 | }
25 | );
26 | }
27 | }
28 |
29 | /**
30 | * Should be executed right after body tag
31 | * Renders GTM code.
32 | */
33 | function beforeHeader(pdict) {
34 | velocity.render('$velocity.remoteInclude(\'GTM-BeforeHeader\')', { velocity: velocity});
35 | }
36 |
37 | function registerRoute(route) {
38 | var onCompleteListeners = route.listeners('route:Complete');
39 | // deregister existing Complete listeners
40 | route.off('route:Complete');
41 |
42 | // ensuring our listener executes first
43 | route.on('route:Complete', function onRouteCompleteHandler(req, res) {
44 | var isJson = false;
45 | if (res.renderings.length) {
46 | for (var i = res.renderings.length - 1; i >= 0; i--) {
47 | if (res.renderings[i].type === 'render' && res.renderings[i].subType === 'json') {
48 | isJson = true;
49 | break;
50 | }
51 | }
52 | }
53 |
54 | if (isJson) {
55 | res.viewData.__gtmEvents = [];
56 |
57 | if (gtmHelpers.isEnabled) {
58 | var dataLayerEvent = gtmHelpers.getDataLayer(res.viewData, false);
59 |
60 | if (dataLayerEvent) {
61 | res.viewData.__gtmEvents.push(dataLayerEvent);
62 | }
63 |
64 | var dataLayerGA4Event = gtmHelpers.getDataLayer(res.viewData, true);
65 |
66 | if (dataLayerGA4Event) {
67 | res.viewData.__gtmEvents.push(dataLayerGA4Event);
68 | }
69 | }
70 | }
71 | });
72 |
73 | // re-register Complete listeners
74 | onCompleteListeners.forEach(function(listener){
75 | route.on('route:Complete', listener);
76 | });
77 | }
78 |
79 | /**
80 | * Inject GTM JSON attributes against product DOM element
81 | * @param {Object} pdict - The current pdict
82 | * @returns {String} attributes string for product DOM element
83 | */
84 | function productTile(pdict) {
85 | if (pdict && pdict.product && !empty(pdict.product.gtmData) && !empty(pdict.product.gtmGA4Data)) {
86 | var obj = {
87 | 'uuid': [pdict.product.id,UUIDUtils.createUUID()].join('-'),
88 | 'gtmData': JSON.stringify(pdict.product.gtmData),
89 | 'gtmGA4Data': JSON.stringify(pdict.product.gtmGA4Data)
90 | };
91 | velocity.render('',obj);
92 | }
93 | }
94 |
95 | // Ensure gtm is enabled before registering hooks
96 | if (gtmHelpers.isEnabled) {
97 | module.exports = {
98 | htmlHead: htmlHead,
99 | beforeHeader: beforeHeader,
100 | registerRoute: registerRoute,
101 | productTile: productTile
102 | }
103 | } else {
104 | module.exports = {
105 | htmlHead: function () {},
106 | beforeHeader: function () {},
107 | registerRoute: function () {},
108 | productTile: function () {}
109 | }
110 | }
111 |
--------------------------------------------------------------------------------
/cartridges/plugin_gtm/cartridge/static/default/js/tagmanager.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Events are divided up by name space so only the
5 | * events that are needed are initialized.
6 | */
7 | var events = {
8 | homeshow: function () {},
9 | productshow: function () {},
10 | productshowincategory: function () {},
11 | searchshow: function () {
12 | $('body').on('click', '.product .image-container a:not(.quickview), .product .pdp-link a', function () {
13 | var $ele = $(this).closest('.product');
14 | var gtmdata = $ele.data('gtmdata') || $.parseJSON($ele.attr('data-gtmdata'));
15 | productClick(gtmdata);
16 | });
17 | },
18 | cartshow: function () {},
19 | checkoutbegin: function () {},
20 | orderconfirm: function () {},
21 | // events that should happen on every page
22 | all: function () {
23 | // Add to Cart
24 | $('body').on('click', '.add-to-cart, .add-to-cart-global', function () {
25 | if (!$(this).hasClass('isDisabled') && !$(this).hasClass('disabled')) {
26 | var $ele = $(this);
27 | var gtmData = $ele.data('gtmdata') || $.parseJSON($ele.attr('data-gtmdata'));
28 | var gtmGA4Data = $ele.data('gtmga4data') || $.parseJSON($ele.attr('data-gtmga4data'));
29 | var qty = $ele.closest('.product-wrapper').find('.quantity-select').val();
30 | qty = qty ? qty : 1;
31 |
32 | addToCart(gtmData, qty);
33 | addToCartGA4(gtmGA4Data, qty);
34 | }
35 | });
36 |
37 | // Remove from Cart
38 | $('body').on('click', '.remove-product', function () {
39 | var $ele = $(this);
40 | var gtmData = $ele.data('gtmdata') || $.parseJSON($ele.attr('data-gtmdata'));
41 | var gtmGA4Data = $ele.data('gtmga4data') || $.parseJSON($ele.attr('data-gtmga4data'));
42 | var qty = $ele.closest('.card').find('select.quantity').val();
43 | qty = qty ? qty : 1;
44 |
45 | $('body').on('click', '#removeProductModal .cart-delete-confirmation-btn', function () {
46 | removeFromCart(gtmData, qty);
47 | removeFromCartGA4(gtmGA4Data, qty);
48 | });
49 | });
50 |
51 | // Update GTM data attribute
52 | $('body').on('product:updateAddToCart', function (e, response) {
53 | $('button.add-to-cart, button.add-to-cart-global', response.$productContainer)
54 | .attr('data-gtmdata', JSON.stringify(response.product.gtmData))
55 | .attr('data-gtmga4data', JSON.stringify(response.product.gtmGA4Data));
56 | });
57 | }
58 | };
59 |
60 | /**
61 | * @param {String} productId The product ID
62 | * @description gets the data for a product click
63 | */
64 | function productClick (productObject) {
65 | var obj = {
66 | 'event': 'productClick',
67 | 'ecommerce': {
68 | 'click': {
69 | 'actionField': {'list': 'Search Results'},
70 | 'products': []
71 | }
72 | }
73 | };
74 | obj.ecommerce.click.products.push(productObject);
75 | dataLayer.push(obj);
76 | }
77 |
78 | /**
79 | * @param productId
80 | * @description Click event for add product to cart
81 | */
82 | function addToCart (productObject, quantity) {
83 | var quantObj = {'quantity': quantity},
84 | obj = {
85 | 'event': 'addToCart',
86 | 'ecommerce': {
87 | 'add': {
88 | 'products': []
89 | }
90 | }
91 | };
92 | obj.ecommerce.add.products.push($.extend(productObject,quantObj));
93 |
94 | dataLayer.push({ ecommerce: null }); // Clear previous ecommerce object to prevent events affecting one another
95 | dataLayer.push(obj);
96 | }
97 |
98 | /**
99 | * @param productId
100 | * @description Click event for add product to cart
101 | */
102 | function addToCartGA4(productObject, quantity) {
103 | var quantObj = { quantity: quantity };
104 | var obj = {
105 | 'event': 'add_to_cart',
106 | 'ecommerce': {
107 | 'currency': productObject.currency,
108 | 'items': [$.extend(productObject, quantObj)],
109 | 'value': (Number(productObject.price) * Number(quantity)).toFixed(2)
110 | }
111 | };
112 |
113 | dataLayer.push({ ecommerce: null }); // Clear previous ecommerce object to prevent events affecting one another
114 | dataLayer.push(obj);
115 | }
116 |
117 | /**
118 | * @function removeFromCart
119 | * @description Click event for remove product from cart
120 | */
121 | function removeFromCart (productObject, quantity) {
122 | var quantObj = {'quantity': quantity};
123 | var obj = {
124 | 'event': 'removeFromCart',
125 | 'ecommerce': {
126 | 'remove': {
127 | 'products': []
128 | }
129 | }
130 | };
131 | obj.ecommerce.remove.products.push($.extend(productObject,quantObj));
132 |
133 | dataLayer.push({ ecommerce: null }); // Clear previous ecommerce object to prevent events affecting one another
134 | dataLayer.push(obj);
135 | }
136 |
137 | /**
138 | * @function removeFromCartGA4
139 | * @description Click event for remove product from cart
140 | */
141 | function removeFromCartGA4(productObject, quantity) {
142 | var quantObj = { quantity: quantity };
143 | var obj = {
144 | 'event': 'remove_from_cart',
145 | 'ecommerce': {
146 | 'currency': productObject.currency,
147 | 'items': [$.extend(productObject, quantObj)],
148 | 'value': (Number(productObject.price) * Number(quantity)).toFixed(2),
149 | }
150 | };
151 |
152 | dataLayer.push({ ecommerce: null }); // Clear previous ecommerce object to prevent events affecting one another
153 | dataLayer.push(obj);
154 | }
155 |
156 | /**
157 | * @function init
158 | * @description Initialize the tag manager functionality
159 | * @param {String} nameSpace The current name space
160 | */
161 | $(document).ready(function () {
162 | if (window.gtmEnabled) {
163 | if (pageAction && events[pageAction]) {
164 | events[pageAction]();
165 | }
166 | events.all();
167 | }
168 | });
169 |
170 | /**
171 | * listener for ajax events
172 | */
173 | function gtmEventLoader() {
174 | try {
175 | $(document).ajaxSuccess(function(event, request, settings, data) {
176 | if (settings.dataTypes.indexOf('json') > -1) {
177 | if (data && '__gtmEvents' in data && Array.isArray(data.__gtmEvents)) {
178 | data.__gtmEvents.forEach(function gtmEvent(gtmEvent) {
179 | if (gtmEvent) {
180 | dataLayer.push({ ecommerce: null }); // Clear previous ecommerce object to prevent events affecting one another
181 | dataLayer.push(gtmEvent);
182 | }
183 | });
184 | }
185 | }
186 | });
187 | document.removeEventListener('DOMContentLoaded', gtmEventLoader);
188 | } catch (e) {
189 | console.error(e);
190 | }
191 | }
192 |
193 | /**
194 | * setup ajax event listener
195 | */
196 | if (document.readyState === 'complete') {
197 | gtmEventLoader();
198 | } else {
199 | document.addEventListener('DOMContentLoaded', gtmEventLoader);
200 | }
201 |
--------------------------------------------------------------------------------
/cartridges/plugin_gtm/cartridge/templates/default/checkout/productCard/productCardProductNameAndRemove.isml:
--------------------------------------------------------------------------------
1 |
2 | ${lineItem.productName}
3 |
4 |
5 |
6 |
14 | ×
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/cartridges/plugin_gtm/cartridge/templates/default/common/layout/checkout.isml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | ${dw.system.HookMgr.callHook('app.template.beforeHeader', 'beforeHeader', pdict) || ''}
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
27 |
28 |
29 | hook for Marketing Cloud connector & other integration which need to inject
30 | logic at the page end
31 | IMPORTANT: Note that this hook will be called to cached as well as uncached pages
32 | which means you need to put privacy information into another remote include
33 |
34 | ${dw.system.HookMgr.callHook('app.template.afterFooter', 'afterFooter', pdict) || ''}
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/cartridges/plugin_gtm/cartridge/templates/default/common/layout/page.isml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | ${dw.system.HookMgr.callHook('app.template.beforeHeader', 'beforeHeader', pdict) || ''}
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
34 |
35 | hook for Marketing Cloud connector & other integration which need to inject
36 | logic at the page end
37 | IMPORTANT: Note that this hook will be called to cached as well as uncached pages
38 | which means you need to put privacy information into another remote include
39 |
40 | ${dw.system.HookMgr.callHook('app.template.afterFooter', 'afterFooter', pdict) || ''}
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/cartridges/plugin_gtm/cartridge/templates/default/common/layout/pdStorePage.isml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | var assets = require('*/cartridge/scripts/assets.js');
14 | assets.addCss('/css/experience/components/commerceAssets/campaignBanner.css');
15 | assets.addJs('/js/campaignBanner.js');
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | ${dw.system.HookMgr.callHook('app.template.beforeHeader', 'beforeHeader', pdict) || ''}
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
47 |
48 | hook for Marketing Cloud connector & other integration which need to inject
49 | logic at the page end
50 | IMPORTANT: Note that this hook will be called to cached as well as uncached pages
51 | which means you need to put privacy information into another remote include
52 |
53 | ${dw.system.HookMgr.callHook('app.template.afterFooter', 'afterFooter', pdict) || ''}
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/cartridges/plugin_gtm/cartridge/templates/default/components/deleteButton.isml:
--------------------------------------------------------------------------------
1 |
9 | ×
10 |
11 |
--------------------------------------------------------------------------------
/cartridges/plugin_gtm/cartridge/templates/default/gtm/gtmCustomerData.isml:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/cartridges/plugin_gtm/cartridge/templates/default/gtm/gtmImpressionData.isml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | If both events active, clear first ecommerce object to prevent events affecting one another
9 |
10 |
13 |
14 |
15 |
16 |
20 |
--------------------------------------------------------------------------------
/cartridges/plugin_gtm/cartridge/templates/default/gtm/gtmNoScript.isml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/cartridges/plugin_gtm/cartridge/templates/default/gtm/gtmScript.isml:
--------------------------------------------------------------------------------
1 |
89 | Remote include for customer specific data
90 |
91 |
92 |
93 |
98 |
99 |
100 | This is where GTM events are initialized
101 |
102 |
--------------------------------------------------------------------------------
/cartridges/plugin_gtm/cartridge/templates/default/product/components/addToCartGlobal.isml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
11 | ${Resource.msg('button.addalltocart', 'common', null)}
12 |
13 | ${Resource.msg('button.addtocart', 'common', null)}
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/cartridges/plugin_gtm/cartridge/templates/default/product/components/addToCartProduct.isml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 | ${Resource.msg('button.addtocart', 'common', null)}
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/cartridges/plugin_gtm/cartridge/templates/default/product/gridTile.isml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/cartridges/plugin_gtm/cartridge/templates/default/search/productGrid.isml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
29 |
--------------------------------------------------------------------------------
/cartridges/plugin_gtm/cartridge/templates/resources/googletagmanager.properties:
--------------------------------------------------------------------------------
1 | ecommerce.list.pdp=Product Detail Page
2 | ecommerce.list.checkout=Shopping Cart
3 | attribute.data.impresstion=data-impression={0}
--------------------------------------------------------------------------------
/cartridges/plugin_gtm/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "hooks": "./cartridge/scripts/hooks.json"
3 | }
4 |
--------------------------------------------------------------------------------
/metadata/GTM-Container-GA4.json:
--------------------------------------------------------------------------------
1 | {
2 | "exportFormatVersion": 2,
3 | "exportTime": "2021-07-24 02:19:50",
4 | "containerVersion": {
5 | "path": "accounts/6000494425/containers/30540017/versions/0",
6 | "accountId": "6000494425",
7 | "containerId": "30540017",
8 | "containerVersionId": "0",
9 | "container": {
10 | "path": "accounts/6000494425/containers/30540017",
11 | "accountId": "6000494425",
12 | "containerId": "30540017",
13 | "name": "GA4",
14 | "publicId": "GTM-MGJW8G9",
15 | "usageContext": [
16 | "WEB"
17 | ],
18 | "fingerprint": "1580755269775",
19 | "tagManagerUrl": "https://tagmanager.google.com/#/container/accounts/6000494425/containers/30540017/workspaces?apiLink=container"
20 | },
21 | "tag": [
22 | {
23 | "accountId": "6000494425",
24 | "containerId": "30540017",
25 | "tagId": "24",
26 | "name": "GA4 - add_payment_info",
27 | "type": "gaawe",
28 | "parameter": [
29 | {
30 | "type": "TEMPLATE",
31 | "key": "eventName",
32 | "value": "add_payment_info"
33 | },
34 | {
35 | "type": "LIST",
36 | "key": "eventParameters",
37 | "list": [
38 | {
39 | "type": "MAP",
40 | "map": [
41 | {
42 | "type": "TEMPLATE",
43 | "key": "name",
44 | "value": "items"
45 | },
46 | {
47 | "type": "TEMPLATE",
48 | "key": "value",
49 | "value": "{{dl.ecommerce.items}}"
50 | }
51 | ]
52 | },
53 | {
54 | "type": "MAP",
55 | "map": [
56 | {
57 | "type": "TEMPLATE",
58 | "key": "name",
59 | "value": "coupon"
60 | },
61 | {
62 | "type": "TEMPLATE",
63 | "key": "value",
64 | "value": "{{dl.ecommerce.coupon}}"
65 | }
66 | ]
67 | },
68 | {
69 | "type": "MAP",
70 | "map": [
71 | {
72 | "type": "TEMPLATE",
73 | "key": "name",
74 | "value": "currency"
75 | },
76 | {
77 | "type": "TEMPLATE",
78 | "key": "value",
79 | "value": "{{dl.ecommerce.currencyCode}}"
80 | }
81 | ]
82 | },
83 | {
84 | "type": "MAP",
85 | "map": [
86 | {
87 | "type": "TEMPLATE",
88 | "key": "name",
89 | "value": "payment_type"
90 | },
91 | {
92 | "type": "TEMPLATE",
93 | "key": "value",
94 | "value": "{{dl.ecommerce.payment_type}}"
95 | }
96 | ]
97 | },
98 | {
99 | "type": "MAP",
100 | "map": [
101 | {
102 | "type": "TEMPLATE",
103 | "key": "name",
104 | "value": "value"
105 | },
106 | {
107 | "type": "TEMPLATE",
108 | "key": "value",
109 | "value": "{{dl.ecommerce.value}}"
110 | }
111 | ]
112 | }
113 | ]
114 | },
115 | {
116 | "type": "TAG_REFERENCE",
117 | "key": "measurementId",
118 | "value": "GA4 - All Pages"
119 | }
120 | ],
121 | "fingerprint": "1627093152758",
122 | "firingTriggerId": [
123 | "15"
124 | ],
125 | "tagFiringOption": "ONCE_PER_EVENT",
126 | "monitoringMetadata": {
127 | "type": "MAP"
128 | }
129 | },
130 | {
131 | "accountId": "6000494425",
132 | "containerId": "30540017",
133 | "tagId": "25",
134 | "name": "GA4 - add_shipping_info",
135 | "type": "gaawe",
136 | "parameter": [
137 | {
138 | "type": "TEMPLATE",
139 | "key": "eventName",
140 | "value": "add_shipping_info"
141 | },
142 | {
143 | "type": "LIST",
144 | "key": "eventParameters",
145 | "list": [
146 | {
147 | "type": "MAP",
148 | "map": [
149 | {
150 | "type": "TEMPLATE",
151 | "key": "name",
152 | "value": "items"
153 | },
154 | {
155 | "type": "TEMPLATE",
156 | "key": "value",
157 | "value": "{{dl.ecommerce.items}}"
158 | }
159 | ]
160 | },
161 | {
162 | "type": "MAP",
163 | "map": [
164 | {
165 | "type": "TEMPLATE",
166 | "key": "name",
167 | "value": "coupon"
168 | },
169 | {
170 | "type": "TEMPLATE",
171 | "key": "value",
172 | "value": "{{dl.ecommerce.coupon}}"
173 | }
174 | ]
175 | },
176 | {
177 | "type": "MAP",
178 | "map": [
179 | {
180 | "type": "TEMPLATE",
181 | "key": "name",
182 | "value": "currency"
183 | },
184 | {
185 | "type": "TEMPLATE",
186 | "key": "value",
187 | "value": "{{dl.ecommerce.currencyCode}}"
188 | }
189 | ]
190 | },
191 | {
192 | "type": "MAP",
193 | "map": [
194 | {
195 | "type": "TEMPLATE",
196 | "key": "name",
197 | "value": "shipping_tier"
198 | },
199 | {
200 | "type": "TEMPLATE",
201 | "key": "value",
202 | "value": "{{dl.ecommerce.shipping_tier}}"
203 | }
204 | ]
205 | },
206 | {
207 | "type": "MAP",
208 | "map": [
209 | {
210 | "type": "TEMPLATE",
211 | "key": "name",
212 | "value": "value"
213 | },
214 | {
215 | "type": "TEMPLATE",
216 | "key": "value",
217 | "value": "{{dl.ecommerce.value}}"
218 | }
219 | ]
220 | }
221 | ]
222 | },
223 | {
224 | "type": "TAG_REFERENCE",
225 | "key": "measurementId",
226 | "value": "GA4 - All Pages"
227 | }
228 | ],
229 | "fingerprint": "1627093152952",
230 | "firingTriggerId": [
231 | "16"
232 | ],
233 | "tagFiringOption": "ONCE_PER_EVENT",
234 | "monitoringMetadata": {
235 | "type": "MAP"
236 | }
237 | },
238 | {
239 | "accountId": "6000494425",
240 | "containerId": "30540017",
241 | "tagId": "26",
242 | "name": "GA4 - add_to_cart",
243 | "type": "gaawe",
244 | "parameter": [
245 | {
246 | "type": "TEMPLATE",
247 | "key": "eventName",
248 | "value": "add_to_cart"
249 | },
250 | {
251 | "type": "LIST",
252 | "key": "eventParameters",
253 | "list": [
254 | {
255 | "type": "MAP",
256 | "map": [
257 | {
258 | "type": "TEMPLATE",
259 | "key": "name",
260 | "value": "items"
261 | },
262 | {
263 | "type": "TEMPLATE",
264 | "key": "value",
265 | "value": "{{dl.ecommerce.items}}"
266 | }
267 | ]
268 | },
269 | {
270 | "type": "MAP",
271 | "map": [
272 | {
273 | "type": "TEMPLATE",
274 | "key": "name",
275 | "value": "currency"
276 | },
277 | {
278 | "type": "TEMPLATE",
279 | "key": "value",
280 | "value": "{{dl.ecommerce.currencyCode}}"
281 | }
282 | ]
283 | },
284 | {
285 | "type": "MAP",
286 | "map": [
287 | {
288 | "type": "TEMPLATE",
289 | "key": "name",
290 | "value": "value"
291 | },
292 | {
293 | "type": "TEMPLATE",
294 | "key": "value",
295 | "value": "{{dl.ecommerce.value}}"
296 | }
297 | ]
298 | }
299 | ]
300 | },
301 | {
302 | "type": "TAG_REFERENCE",
303 | "key": "measurementId",
304 | "value": "GA4 - All Pages"
305 | }
306 | ],
307 | "fingerprint": "1627093153149",
308 | "firingTriggerId": [
309 | "17"
310 | ],
311 | "tagFiringOption": "ONCE_PER_EVENT",
312 | "monitoringMetadata": {
313 | "type": "MAP"
314 | }
315 | },
316 | {
317 | "accountId": "6000494425",
318 | "containerId": "30540017",
319 | "tagId": "27",
320 | "name": "GA4 - begin_checkout",
321 | "type": "gaawe",
322 | "parameter": [
323 | {
324 | "type": "TEMPLATE",
325 | "key": "eventName",
326 | "value": "begin_checkout"
327 | },
328 | {
329 | "type": "LIST",
330 | "key": "eventParameters",
331 | "list": [
332 | {
333 | "type": "MAP",
334 | "map": [
335 | {
336 | "type": "TEMPLATE",
337 | "key": "name",
338 | "value": "items"
339 | },
340 | {
341 | "type": "TEMPLATE",
342 | "key": "value",
343 | "value": "{{dl.ecommerce.items}}"
344 | }
345 | ]
346 | },
347 | {
348 | "type": "MAP",
349 | "map": [
350 | {
351 | "type": "TEMPLATE",
352 | "key": "name",
353 | "value": "coupon"
354 | },
355 | {
356 | "type": "TEMPLATE",
357 | "key": "value",
358 | "value": "{{dl.ecommerce.coupon}}"
359 | }
360 | ]
361 | },
362 | {
363 | "type": "MAP",
364 | "map": [
365 | {
366 | "type": "TEMPLATE",
367 | "key": "name",
368 | "value": "currency"
369 | },
370 | {
371 | "type": "TEMPLATE",
372 | "key": "value",
373 | "value": "{{dl.ecommerce.currencyCode}}"
374 | }
375 | ]
376 | },
377 | {
378 | "type": "MAP",
379 | "map": [
380 | {
381 | "type": "TEMPLATE",
382 | "key": "name",
383 | "value": "value"
384 | },
385 | {
386 | "type": "TEMPLATE",
387 | "key": "value",
388 | "value": "{{dl.ecommerce.value}}"
389 | }
390 | ]
391 | }
392 | ]
393 | },
394 | {
395 | "type": "TAG_REFERENCE",
396 | "key": "measurementId",
397 | "value": "GA4 - All Pages"
398 | }
399 | ],
400 | "fingerprint": "1627093153359",
401 | "firingTriggerId": [
402 | "18"
403 | ],
404 | "tagFiringOption": "ONCE_PER_EVENT",
405 | "monitoringMetadata": {
406 | "type": "MAP"
407 | }
408 | },
409 | {
410 | "accountId": "6000494425",
411 | "containerId": "30540017",
412 | "tagId": "28",
413 | "name": "GA4 - All Pages",
414 | "type": "gaawc",
415 | "parameter": [
416 | {
417 | "type": "BOOLEAN",
418 | "key": "sendPageView",
419 | "value": "true"
420 | },
421 | {
422 | "type": "BOOLEAN",
423 | "key": "enableSendToServerContainer",
424 | "value": "false"
425 | },
426 | {
427 | "type": "TEMPLATE",
428 | "key": "measurementId",
429 | "value": "PASTE-ID-HERE"
430 | }
431 | ],
432 | "fingerprint": "1627093153549",
433 | "firingTriggerId": [
434 | "2147479553"
435 | ],
436 | "tagFiringOption": "ONCE_PER_EVENT",
437 | "monitoringMetadata": {
438 | "type": "MAP"
439 | }
440 | },
441 | {
442 | "accountId": "6000494425",
443 | "containerId": "30540017",
444 | "tagId": "29",
445 | "name": "GA4 - purchase",
446 | "type": "gaawe",
447 | "parameter": [
448 | {
449 | "type": "TEMPLATE",
450 | "key": "eventName",
451 | "value": "purchase"
452 | },
453 | {
454 | "type": "LIST",
455 | "key": "eventParameters",
456 | "list": [
457 | {
458 | "type": "MAP",
459 | "map": [
460 | {
461 | "type": "TEMPLATE",
462 | "key": "name",
463 | "value": "items"
464 | },
465 | {
466 | "type": "TEMPLATE",
467 | "key": "value",
468 | "value": "{{dl.ecommerce.items}}"
469 | }
470 | ]
471 | },
472 | {
473 | "type": "MAP",
474 | "map": [
475 | {
476 | "type": "TEMPLATE",
477 | "key": "name",
478 | "value": "affiliation"
479 | },
480 | {
481 | "type": "TEMPLATE",
482 | "key": "value",
483 | "value": "{{dl.ecommerce.affiliation}}"
484 | }
485 | ]
486 | },
487 | {
488 | "type": "MAP",
489 | "map": [
490 | {
491 | "type": "TEMPLATE",
492 | "key": "name",
493 | "value": "coupon"
494 | },
495 | {
496 | "type": "TEMPLATE",
497 | "key": "value",
498 | "value": "{{dl.ecommerce.coupon}}"
499 | }
500 | ]
501 | },
502 | {
503 | "type": "MAP",
504 | "map": [
505 | {
506 | "type": "TEMPLATE",
507 | "key": "name",
508 | "value": "currency"
509 | },
510 | {
511 | "type": "TEMPLATE",
512 | "key": "value",
513 | "value": "{{dl.ecommerce.currencyCode}}"
514 | }
515 | ]
516 | },
517 | {
518 | "type": "MAP",
519 | "map": [
520 | {
521 | "type": "TEMPLATE",
522 | "key": "name",
523 | "value": "transaction_id"
524 | },
525 | {
526 | "type": "TEMPLATE",
527 | "key": "value",
528 | "value": "{{dl.ecommerce.transaction_id}}"
529 | }
530 | ]
531 | },
532 | {
533 | "type": "MAP",
534 | "map": [
535 | {
536 | "type": "TEMPLATE",
537 | "key": "name",
538 | "value": "shipping"
539 | },
540 | {
541 | "type": "TEMPLATE",
542 | "key": "value",
543 | "value": "{{dl.ecommerce.shipping}}"
544 | }
545 | ]
546 | },
547 | {
548 | "type": "MAP",
549 | "map": [
550 | {
551 | "type": "TEMPLATE",
552 | "key": "name",
553 | "value": "tax"
554 | },
555 | {
556 | "type": "TEMPLATE",
557 | "key": "value",
558 | "value": "{{dl.ecommerce.tax}}"
559 | }
560 | ]
561 | },
562 | {
563 | "type": "MAP",
564 | "map": [
565 | {
566 | "type": "TEMPLATE",
567 | "key": "name",
568 | "value": "value"
569 | },
570 | {
571 | "type": "TEMPLATE",
572 | "key": "value",
573 | "value": "{{dl.ecommerce.value}}"
574 | }
575 | ]
576 | }
577 | ]
578 | },
579 | {
580 | "type": "TAG_REFERENCE",
581 | "key": "measurementId",
582 | "value": "GA4 - All Pages"
583 | }
584 | ],
585 | "fingerprint": "1627093153747",
586 | "firingTriggerId": [
587 | "19"
588 | ],
589 | "tagFiringOption": "ONCE_PER_EVENT",
590 | "monitoringMetadata": {
591 | "type": "MAP"
592 | }
593 | },
594 | {
595 | "accountId": "6000494425",
596 | "containerId": "30540017",
597 | "tagId": "30",
598 | "name": "GA4 - remove_from_cart",
599 | "type": "gaawe",
600 | "parameter": [
601 | {
602 | "type": "TEMPLATE",
603 | "key": "eventName",
604 | "value": "remove_from_cart"
605 | },
606 | {
607 | "type": "LIST",
608 | "key": "eventParameters",
609 | "list": [
610 | {
611 | "type": "MAP",
612 | "map": [
613 | {
614 | "type": "TEMPLATE",
615 | "key": "name",
616 | "value": "items"
617 | },
618 | {
619 | "type": "TEMPLATE",
620 | "key": "value",
621 | "value": "{{dl.ecommerce.items}}"
622 | }
623 | ]
624 | },
625 | {
626 | "type": "MAP",
627 | "map": [
628 | {
629 | "type": "TEMPLATE",
630 | "key": "name",
631 | "value": "currency"
632 | },
633 | {
634 | "type": "TEMPLATE",
635 | "key": "value",
636 | "value": "{{dl.ecommerce.currencyCode}}"
637 | }
638 | ]
639 | },
640 | {
641 | "type": "MAP",
642 | "map": [
643 | {
644 | "type": "TEMPLATE",
645 | "key": "name",
646 | "value": "value"
647 | },
648 | {
649 | "type": "TEMPLATE",
650 | "key": "value",
651 | "value": "{{dl.ecommerce.value}}"
652 | }
653 | ]
654 | }
655 | ]
656 | },
657 | {
658 | "type": "TAG_REFERENCE",
659 | "key": "measurementId",
660 | "value": "GA4 - All Pages"
661 | }
662 | ],
663 | "fingerprint": "1627093153934",
664 | "firingTriggerId": [
665 | "20"
666 | ],
667 | "tagFiringOption": "ONCE_PER_EVENT",
668 | "monitoringMetadata": {
669 | "type": "MAP"
670 | }
671 | },
672 | {
673 | "accountId": "6000494425",
674 | "containerId": "30540017",
675 | "tagId": "31",
676 | "name": "GA4 - view_cart",
677 | "type": "gaawe",
678 | "parameter": [
679 | {
680 | "type": "TEMPLATE",
681 | "key": "eventName",
682 | "value": "view_cart"
683 | },
684 | {
685 | "type": "LIST",
686 | "key": "eventParameters",
687 | "list": [
688 | {
689 | "type": "MAP",
690 | "map": [
691 | {
692 | "type": "TEMPLATE",
693 | "key": "name",
694 | "value": "items"
695 | },
696 | {
697 | "type": "TEMPLATE",
698 | "key": "value",
699 | "value": "{{dl.ecommerce.items}}"
700 | }
701 | ]
702 | },
703 | {
704 | "type": "MAP",
705 | "map": [
706 | {
707 | "type": "TEMPLATE",
708 | "key": "name",
709 | "value": "currency"
710 | },
711 | {
712 | "type": "TEMPLATE",
713 | "key": "value",
714 | "value": "{{dl.ecommerce.currencyCode}}"
715 | }
716 | ]
717 | },
718 | {
719 | "type": "MAP",
720 | "map": [
721 | {
722 | "type": "TEMPLATE",
723 | "key": "name",
724 | "value": "value"
725 | },
726 | {
727 | "type": "TEMPLATE",
728 | "key": "value",
729 | "value": "{{dl.ecommerce.value}}"
730 | }
731 | ]
732 | }
733 | ]
734 | },
735 | {
736 | "type": "TAG_REFERENCE",
737 | "key": "measurementId",
738 | "value": "GA4 - All Pages"
739 | }
740 | ],
741 | "fingerprint": "1627093154129",
742 | "firingTriggerId": [
743 | "23"
744 | ],
745 | "tagFiringOption": "ONCE_PER_EVENT",
746 | "monitoringMetadata": {
747 | "type": "MAP"
748 | }
749 | },
750 | {
751 | "accountId": "6000494425",
752 | "containerId": "30540017",
753 | "tagId": "32",
754 | "name": "GA4 - view_item",
755 | "type": "gaawe",
756 | "parameter": [
757 | {
758 | "type": "TEMPLATE",
759 | "key": "eventName",
760 | "value": "view_item"
761 | },
762 | {
763 | "type": "LIST",
764 | "key": "eventParameters",
765 | "list": [
766 | {
767 | "type": "MAP",
768 | "map": [
769 | {
770 | "type": "TEMPLATE",
771 | "key": "name",
772 | "value": "items"
773 | },
774 | {
775 | "type": "TEMPLATE",
776 | "key": "value",
777 | "value": "{{dl.ecommerce.items}}"
778 | }
779 | ]
780 | },
781 | {
782 | "type": "MAP",
783 | "map": [
784 | {
785 | "type": "TEMPLATE",
786 | "key": "name",
787 | "value": "currency"
788 | },
789 | {
790 | "type": "TEMPLATE",
791 | "key": "value",
792 | "value": "{{dl.ecommerce.currencyCode}}"
793 | }
794 | ]
795 | },
796 | {
797 | "type": "MAP",
798 | "map": [
799 | {
800 | "type": "TEMPLATE",
801 | "key": "name",
802 | "value": "value"
803 | },
804 | {
805 | "type": "TEMPLATE",
806 | "key": "value",
807 | "value": "{{dl.ecommerce.value}}"
808 | }
809 | ]
810 | }
811 | ]
812 | },
813 | {
814 | "type": "TAG_REFERENCE",
815 | "key": "measurementId",
816 | "value": "GA4 - All Pages"
817 | }
818 | ],
819 | "fingerprint": "1627093154355",
820 | "firingTriggerId": [
821 | "22"
822 | ],
823 | "tagFiringOption": "ONCE_PER_EVENT",
824 | "monitoringMetadata": {
825 | "type": "MAP"
826 | }
827 | },
828 | {
829 | "accountId": "6000494425",
830 | "containerId": "30540017",
831 | "tagId": "33",
832 | "name": "GA4 - view_item_list",
833 | "type": "gaawe",
834 | "parameter": [
835 | {
836 | "type": "TEMPLATE",
837 | "key": "eventName",
838 | "value": "view_item_list"
839 | },
840 | {
841 | "type": "LIST",
842 | "key": "eventParameters",
843 | "list": [
844 | {
845 | "type": "MAP",
846 | "map": [
847 | {
848 | "type": "TEMPLATE",
849 | "key": "name",
850 | "value": "items"
851 | },
852 | {
853 | "type": "TEMPLATE",
854 | "key": "value",
855 | "value": "{{dl.ecommerce.items}}"
856 | }
857 | ]
858 | },
859 | {
860 | "type": "MAP",
861 | "map": [
862 | {
863 | "type": "TEMPLATE",
864 | "key": "name",
865 | "value": "item_list_id"
866 | },
867 | {
868 | "type": "TEMPLATE",
869 | "key": "value",
870 | "value": "{{dl.ecommerce.item_list_id}}"
871 | }
872 | ]
873 | },
874 | {
875 | "type": "MAP",
876 | "map": [
877 | {
878 | "type": "TEMPLATE",
879 | "key": "name",
880 | "value": "item_list_name"
881 | },
882 | {
883 | "type": "TEMPLATE",
884 | "key": "value",
885 | "value": "{{dl.ecommerce.item_list_name}}"
886 | }
887 | ]
888 | }
889 | ]
890 | },
891 | {
892 | "type": "TAG_REFERENCE",
893 | "key": "measurementId",
894 | "value": "GA4 - All Pages"
895 | }
896 | ],
897 | "fingerprint": "1627093154540",
898 | "firingTriggerId": [
899 | "21"
900 | ],
901 | "tagFiringOption": "ONCE_PER_EVENT",
902 | "monitoringMetadata": {
903 | "type": "MAP"
904 | }
905 | }
906 | ],
907 | "trigger": [
908 | {
909 | "accountId": "6000494425",
910 | "containerId": "30540017",
911 | "triggerId": "15",
912 | "name": "GA4 - add_payment_info",
913 | "type": "CUSTOM_EVENT",
914 | "customEventFilter": [
915 | {
916 | "type": "EQUALS",
917 | "parameter": [
918 | {
919 | "type": "TEMPLATE",
920 | "key": "arg0",
921 | "value": "{{_event}}"
922 | },
923 | {
924 | "type": "TEMPLATE",
925 | "key": "arg1",
926 | "value": "add_payment_info"
927 | }
928 | ]
929 | }
930 | ],
931 | "fingerprint": "1627093131545"
932 | },
933 | {
934 | "accountId": "6000494425",
935 | "containerId": "30540017",
936 | "triggerId": "16",
937 | "name": "GA4 - add_shipping_info",
938 | "type": "CUSTOM_EVENT",
939 | "customEventFilter": [
940 | {
941 | "type": "EQUALS",
942 | "parameter": [
943 | {
944 | "type": "TEMPLATE",
945 | "key": "arg0",
946 | "value": "{{_event}}"
947 | },
948 | {
949 | "type": "TEMPLATE",
950 | "key": "arg1",
951 | "value": "add_shipping_info"
952 | }
953 | ]
954 | }
955 | ],
956 | "fingerprint": "1627093131729"
957 | },
958 | {
959 | "accountId": "6000494425",
960 | "containerId": "30540017",
961 | "triggerId": "17",
962 | "name": "GA4 - add_to_cart",
963 | "type": "CUSTOM_EVENT",
964 | "customEventFilter": [
965 | {
966 | "type": "EQUALS",
967 | "parameter": [
968 | {
969 | "type": "TEMPLATE",
970 | "key": "arg0",
971 | "value": "{{_event}}"
972 | },
973 | {
974 | "type": "TEMPLATE",
975 | "key": "arg1",
976 | "value": "add_to_cart"
977 | }
978 | ]
979 | }
980 | ],
981 | "fingerprint": "1627093131939"
982 | },
983 | {
984 | "accountId": "6000494425",
985 | "containerId": "30540017",
986 | "triggerId": "18",
987 | "name": "GA4 - begin_checkout",
988 | "type": "CUSTOM_EVENT",
989 | "customEventFilter": [
990 | {
991 | "type": "EQUALS",
992 | "parameter": [
993 | {
994 | "type": "TEMPLATE",
995 | "key": "arg0",
996 | "value": "{{_event}}"
997 | },
998 | {
999 | "type": "TEMPLATE",
1000 | "key": "arg1",
1001 | "value": "begin_checkout"
1002 | }
1003 | ]
1004 | }
1005 | ],
1006 | "fingerprint": "1627093132117"
1007 | },
1008 | {
1009 | "accountId": "6000494425",
1010 | "containerId": "30540017",
1011 | "triggerId": "19",
1012 | "name": "GA4 - purchase",
1013 | "type": "CUSTOM_EVENT",
1014 | "customEventFilter": [
1015 | {
1016 | "type": "EQUALS",
1017 | "parameter": [
1018 | {
1019 | "type": "TEMPLATE",
1020 | "key": "arg0",
1021 | "value": "{{_event}}"
1022 | },
1023 | {
1024 | "type": "TEMPLATE",
1025 | "key": "arg1",
1026 | "value": "purchase"
1027 | }
1028 | ]
1029 | }
1030 | ],
1031 | "fingerprint": "1627093132297"
1032 | },
1033 | {
1034 | "accountId": "6000494425",
1035 | "containerId": "30540017",
1036 | "triggerId": "20",
1037 | "name": "GA4 - remove_from_cart",
1038 | "type": "CUSTOM_EVENT",
1039 | "customEventFilter": [
1040 | {
1041 | "type": "EQUALS",
1042 | "parameter": [
1043 | {
1044 | "type": "TEMPLATE",
1045 | "key": "arg0",
1046 | "value": "{{_event}}"
1047 | },
1048 | {
1049 | "type": "TEMPLATE",
1050 | "key": "arg1",
1051 | "value": "remove_from_cart"
1052 | }
1053 | ]
1054 | }
1055 | ],
1056 | "fingerprint": "1627093134157"
1057 | },
1058 | {
1059 | "accountId": "6000494425",
1060 | "containerId": "30540017",
1061 | "triggerId": "21",
1062 | "name": "GA4 - view_item_list",
1063 | "type": "CUSTOM_EVENT",
1064 | "customEventFilter": [
1065 | {
1066 | "type": "EQUALS",
1067 | "parameter": [
1068 | {
1069 | "type": "TEMPLATE",
1070 | "key": "arg0",
1071 | "value": "{{_event}}"
1072 | },
1073 | {
1074 | "type": "TEMPLATE",
1075 | "key": "arg1",
1076 | "value": "view_item_list"
1077 | }
1078 | ]
1079 | }
1080 | ],
1081 | "fingerprint": "1627093150276"
1082 | },
1083 | {
1084 | "accountId": "6000494425",
1085 | "containerId": "30540017",
1086 | "triggerId": "22",
1087 | "name": "GA4 - view_item",
1088 | "type": "CUSTOM_EVENT",
1089 | "customEventFilter": [
1090 | {
1091 | "type": "EQUALS",
1092 | "parameter": [
1093 | {
1094 | "type": "TEMPLATE",
1095 | "key": "arg0",
1096 | "value": "{{_event}}"
1097 | },
1098 | {
1099 | "type": "TEMPLATE",
1100 | "key": "arg1",
1101 | "value": "view_item"
1102 | }
1103 | ]
1104 | }
1105 | ],
1106 | "fingerprint": "1627093152229"
1107 | },
1108 | {
1109 | "accountId": "6000494425",
1110 | "containerId": "30540017",
1111 | "triggerId": "23",
1112 | "name": "GA4 - view_cart",
1113 | "type": "CUSTOM_EVENT",
1114 | "customEventFilter": [
1115 | {
1116 | "type": "EQUALS",
1117 | "parameter": [
1118 | {
1119 | "type": "TEMPLATE",
1120 | "key": "arg0",
1121 | "value": "{{_event}}"
1122 | },
1123 | {
1124 | "type": "TEMPLATE",
1125 | "key": "arg1",
1126 | "value": "view_cart"
1127 | }
1128 | ]
1129 | }
1130 | ],
1131 | "fingerprint": "1627093152510"
1132 | }
1133 | ],
1134 | "variable": [
1135 | {
1136 | "accountId": "6000494425",
1137 | "containerId": "30540017",
1138 | "variableId": "3",
1139 | "name": "dl.ecommerce.affiliation",
1140 | "type": "v",
1141 | "parameter": [
1142 | {
1143 | "type": "INTEGER",
1144 | "key": "dataLayerVersion",
1145 | "value": "2"
1146 | },
1147 | {
1148 | "type": "BOOLEAN",
1149 | "key": "setDefaultValue",
1150 | "value": "false"
1151 | },
1152 | {
1153 | "type": "TEMPLATE",
1154 | "key": "name",
1155 | "value": "ecommerce.affiliation"
1156 | }
1157 | ],
1158 | "fingerprint": "1627093129072",
1159 | "formatValue": {}
1160 | },
1161 | {
1162 | "accountId": "6000494425",
1163 | "containerId": "30540017",
1164 | "variableId": "4",
1165 | "name": "dl.ecommerce.coupon",
1166 | "type": "v",
1167 | "parameter": [
1168 | {
1169 | "type": "INTEGER",
1170 | "key": "dataLayerVersion",
1171 | "value": "2"
1172 | },
1173 | {
1174 | "type": "BOOLEAN",
1175 | "key": "setDefaultValue",
1176 | "value": "false"
1177 | },
1178 | {
1179 | "type": "TEMPLATE",
1180 | "key": "name",
1181 | "value": "ecommerce.coupon"
1182 | }
1183 | ],
1184 | "fingerprint": "1627093129341",
1185 | "formatValue": {}
1186 | },
1187 | {
1188 | "accountId": "6000494425",
1189 | "containerId": "30540017",
1190 | "variableId": "5",
1191 | "name": "dl.ecommerce.currencyCode",
1192 | "type": "v",
1193 | "parameter": [
1194 | {
1195 | "type": "INTEGER",
1196 | "key": "dataLayerVersion",
1197 | "value": "2"
1198 | },
1199 | {
1200 | "type": "BOOLEAN",
1201 | "key": "setDefaultValue",
1202 | "value": "false"
1203 | },
1204 | {
1205 | "type": "TEMPLATE",
1206 | "key": "name",
1207 | "value": "ecommerce.currencyCode"
1208 | }
1209 | ],
1210 | "fingerprint": "1627093129545",
1211 | "formatValue": {}
1212 | },
1213 | {
1214 | "accountId": "6000494425",
1215 | "containerId": "30540017",
1216 | "variableId": "6",
1217 | "name": "dl.ecommerce.item_list_id",
1218 | "type": "v",
1219 | "parameter": [
1220 | {
1221 | "type": "INTEGER",
1222 | "key": "dataLayerVersion",
1223 | "value": "2"
1224 | },
1225 | {
1226 | "type": "BOOLEAN",
1227 | "key": "setDefaultValue",
1228 | "value": "false"
1229 | },
1230 | {
1231 | "type": "TEMPLATE",
1232 | "key": "name",
1233 | "value": "ecommerce.item_list_id"
1234 | }
1235 | ],
1236 | "fingerprint": "1627093129731",
1237 | "formatValue": {}
1238 | },
1239 | {
1240 | "accountId": "6000494425",
1241 | "containerId": "30540017",
1242 | "variableId": "7",
1243 | "name": "dl.ecommerce.item_list_name",
1244 | "type": "v",
1245 | "parameter": [
1246 | {
1247 | "type": "INTEGER",
1248 | "key": "dataLayerVersion",
1249 | "value": "2"
1250 | },
1251 | {
1252 | "type": "BOOLEAN",
1253 | "key": "setDefaultValue",
1254 | "value": "false"
1255 | },
1256 | {
1257 | "type": "TEMPLATE",
1258 | "key": "name",
1259 | "value": "ecommerce.item_list_name"
1260 | }
1261 | ],
1262 | "fingerprint": "1627093129915",
1263 | "formatValue": {}
1264 | },
1265 | {
1266 | "accountId": "6000494425",
1267 | "containerId": "30540017",
1268 | "variableId": "8",
1269 | "name": "dl.ecommerce.items",
1270 | "type": "v",
1271 | "parameter": [
1272 | {
1273 | "type": "INTEGER",
1274 | "key": "dataLayerVersion",
1275 | "value": "2"
1276 | },
1277 | {
1278 | "type": "BOOLEAN",
1279 | "key": "setDefaultValue",
1280 | "value": "false"
1281 | },
1282 | {
1283 | "type": "TEMPLATE",
1284 | "key": "name",
1285 | "value": "ecommerce.items"
1286 | }
1287 | ],
1288 | "fingerprint": "1627093130129",
1289 | "formatValue": {}
1290 | },
1291 | {
1292 | "accountId": "6000494425",
1293 | "containerId": "30540017",
1294 | "variableId": "9",
1295 | "name": "dl.ecommerce.payment_type",
1296 | "type": "v",
1297 | "parameter": [
1298 | {
1299 | "type": "INTEGER",
1300 | "key": "dataLayerVersion",
1301 | "value": "2"
1302 | },
1303 | {
1304 | "type": "BOOLEAN",
1305 | "key": "setDefaultValue",
1306 | "value": "false"
1307 | },
1308 | {
1309 | "type": "TEMPLATE",
1310 | "key": "name",
1311 | "value": "ecommerce.payment_type"
1312 | }
1313 | ],
1314 | "fingerprint": "1627093130342",
1315 | "formatValue": {}
1316 | },
1317 | {
1318 | "accountId": "6000494425",
1319 | "containerId": "30540017",
1320 | "variableId": "10",
1321 | "name": "dl.ecommerce.shipping",
1322 | "type": "v",
1323 | "parameter": [
1324 | {
1325 | "type": "INTEGER",
1326 | "key": "dataLayerVersion",
1327 | "value": "2"
1328 | },
1329 | {
1330 | "type": "BOOLEAN",
1331 | "key": "setDefaultValue",
1332 | "value": "false"
1333 | },
1334 | {
1335 | "type": "TEMPLATE",
1336 | "key": "name",
1337 | "value": "ecommerce.shipping"
1338 | }
1339 | ],
1340 | "fingerprint": "1627093130527",
1341 | "formatValue": {}
1342 | },
1343 | {
1344 | "accountId": "6000494425",
1345 | "containerId": "30540017",
1346 | "variableId": "11",
1347 | "name": "dl.ecommerce.shipping_tier",
1348 | "type": "v",
1349 | "parameter": [
1350 | {
1351 | "type": "INTEGER",
1352 | "key": "dataLayerVersion",
1353 | "value": "2"
1354 | },
1355 | {
1356 | "type": "BOOLEAN",
1357 | "key": "setDefaultValue",
1358 | "value": "false"
1359 | },
1360 | {
1361 | "type": "TEMPLATE",
1362 | "key": "name",
1363 | "value": "ecommerce.shipping_tier"
1364 | }
1365 | ],
1366 | "fingerprint": "1627093130730",
1367 | "formatValue": {}
1368 | },
1369 | {
1370 | "accountId": "6000494425",
1371 | "containerId": "30540017",
1372 | "variableId": "12",
1373 | "name": "dl.ecommerce.tax",
1374 | "type": "v",
1375 | "parameter": [
1376 | {
1377 | "type": "INTEGER",
1378 | "key": "dataLayerVersion",
1379 | "value": "2"
1380 | },
1381 | {
1382 | "type": "BOOLEAN",
1383 | "key": "setDefaultValue",
1384 | "value": "false"
1385 | },
1386 | {
1387 | "type": "TEMPLATE",
1388 | "key": "name",
1389 | "value": "dl.ecommerce.tax"
1390 | }
1391 | ],
1392 | "fingerprint": "1627093130910",
1393 | "formatValue": {}
1394 | },
1395 | {
1396 | "accountId": "6000494425",
1397 | "containerId": "30540017",
1398 | "variableId": "13",
1399 | "name": "dl.ecommerce.transaction_id",
1400 | "type": "v",
1401 | "parameter": [
1402 | {
1403 | "type": "INTEGER",
1404 | "key": "dataLayerVersion",
1405 | "value": "2"
1406 | },
1407 | {
1408 | "type": "BOOLEAN",
1409 | "key": "setDefaultValue",
1410 | "value": "false"
1411 | },
1412 | {
1413 | "type": "TEMPLATE",
1414 | "key": "name",
1415 | "value": "ecommerce.transaction_id"
1416 | }
1417 | ],
1418 | "fingerprint": "1627093131094",
1419 | "formatValue": {}
1420 | },
1421 | {
1422 | "accountId": "6000494425",
1423 | "containerId": "30540017",
1424 | "variableId": "14",
1425 | "name": "dl.ecommerce.value",
1426 | "type": "v",
1427 | "parameter": [
1428 | {
1429 | "type": "INTEGER",
1430 | "key": "dataLayerVersion",
1431 | "value": "2"
1432 | },
1433 | {
1434 | "type": "BOOLEAN",
1435 | "key": "setDefaultValue",
1436 | "value": "false"
1437 | },
1438 | {
1439 | "type": "TEMPLATE",
1440 | "key": "name",
1441 | "value": "ecommerce.value"
1442 | }
1443 | ],
1444 | "fingerprint": "1627093131300",
1445 | "formatValue": {}
1446 | }
1447 | ],
1448 | "fingerprint": "1627093190547",
1449 | "tagManagerUrl": "https://tagmanager.google.com/#/versions/accounts/6000494425/containers/30540017/versions/0?apiLink=version"
1450 | }
1451 | }
--------------------------------------------------------------------------------
/metadata/GTM-Container.json:
--------------------------------------------------------------------------------
1 | {
2 | "exportFormatVersion": 2,
3 | "exportTime": "2022-08-26 19:16:52",
4 | "containerVersion": {
5 | "path": "accounts/6055557665/containers/92698776/versions/0",
6 | "accountId": "6055557665",
7 | "containerId": "92698776",
8 | "containerVersionId": "0",
9 | "container": {
10 | "path": "accounts/6055557665/containers/92698776",
11 | "accountId": "6055557665",
12 | "containerId": "92698776",
13 | "name": "Autobahn GTM",
14 | "publicId": "GTM-5RWVDWN",
15 | "usageContext": [
16 | "WEB"
17 | ],
18 | "fingerprint": "1661540937748",
19 | "tagManagerUrl": "https://tagmanager.google.com/#/container/accounts/6055557665/containers/92698776/workspaces?apiLink=container"
20 | },
21 | "tag": [
22 | {
23 | "accountId": "6055557665",
24 | "containerId": "92698776",
25 | "tagId": "12",
26 | "name": "Google Analytics - Checkout Steps",
27 | "type": "ua",
28 | "parameter": [
29 | {
30 | "type": "BOOLEAN",
31 | "key": "nonInteraction",
32 | "value": "false"
33 | },
34 | {
35 | "type": "BOOLEAN",
36 | "key": "overrideGaSettings",
37 | "value": "false"
38 | },
39 | {
40 | "type": "TEMPLATE",
41 | "key": "eventCategory",
42 | "value": "Ecommerce"
43 | },
44 | {
45 | "type": "TEMPLATE",
46 | "key": "trackType",
47 | "value": "TRACK_EVENT"
48 | },
49 | {
50 | "type": "TEMPLATE",
51 | "key": "gaSettings",
52 | "value": "{{GA-ID}}"
53 | },
54 | {
55 | "type": "TEMPLATE",
56 | "key": "eventAction",
57 | "value": "Checkout"
58 | },
59 | {
60 | "type": "TEMPLATE",
61 | "key": "eventLabel",
62 | "value": "{{Checkout Step - checkout}}"
63 | }
64 | ],
65 | "fingerprint": "1661540977936",
66 | "firingTriggerId": [
67 | "7"
68 | ],
69 | "parentFolderId": "5",
70 | "tagFiringOption": "ONCE_PER_EVENT",
71 | "monitoringMetadata": {
72 | "type": "MAP"
73 | },
74 | "consentSettings": {
75 | "consentStatus": "NOT_SET"
76 | }
77 | },
78 | {
79 | "accountId": "6055557665",
80 | "containerId": "92698776",
81 | "tagId": "15",
82 | "name": "Google Analytics - Remove from Cart",
83 | "type": "ua",
84 | "parameter": [
85 | {
86 | "type": "BOOLEAN",
87 | "key": "nonInteraction",
88 | "value": "false"
89 | },
90 | {
91 | "type": "BOOLEAN",
92 | "key": "overrideGaSettings",
93 | "value": "false"
94 | },
95 | {
96 | "type": "TEMPLATE",
97 | "key": "eventCategory",
98 | "value": "Ecommerce"
99 | },
100 | {
101 | "type": "TEMPLATE",
102 | "key": "trackType",
103 | "value": "TRACK_EVENT"
104 | },
105 | {
106 | "type": "TEMPLATE",
107 | "key": "gaSettings",
108 | "value": "{{GA-ID}}"
109 | },
110 | {
111 | "type": "TEMPLATE",
112 | "key": "eventAction",
113 | "value": "Remove from Cart"
114 | },
115 | {
116 | "type": "TEMPLATE",
117 | "key": "eventLabel",
118 | "value": "{{Product Name - removeFromCart}}"
119 | }
120 | ],
121 | "fingerprint": "1661540977937",
122 | "firingTriggerId": [
123 | "14"
124 | ],
125 | "parentFolderId": "5",
126 | "tagFiringOption": "ONCE_PER_EVENT",
127 | "monitoringMetadata": {
128 | "type": "MAP"
129 | },
130 | "consentSettings": {
131 | "consentStatus": "NOT_SET"
132 | }
133 | },
134 | {
135 | "accountId": "6055557665",
136 | "containerId": "92698776",
137 | "tagId": "17",
138 | "name": "Google Analytics - Search Impressions",
139 | "type": "ua",
140 | "parameter": [
141 | {
142 | "type": "BOOLEAN",
143 | "key": "nonInteraction",
144 | "value": "false"
145 | },
146 | {
147 | "type": "BOOLEAN",
148 | "key": "overrideGaSettings",
149 | "value": "false"
150 | },
151 | {
152 | "type": "TEMPLATE",
153 | "key": "eventCategory",
154 | "value": "Ecommerce"
155 | },
156 | {
157 | "type": "TEMPLATE",
158 | "key": "trackType",
159 | "value": "TRACK_EVENT"
160 | },
161 | {
162 | "type": "TEMPLATE",
163 | "key": "gaSettings",
164 | "value": "{{GA-ID}}"
165 | },
166 | {
167 | "type": "TEMPLATE",
168 | "key": "eventAction",
169 | "value": "{{Event}}"
170 | },
171 | {
172 | "type": "TEMPLATE",
173 | "key": "eventLabel",
174 | "value": "{{Page Path}}"
175 | }
176 | ],
177 | "fingerprint": "1661540977938",
178 | "firingTriggerId": [
179 | "16"
180 | ],
181 | "parentFolderId": "5",
182 | "tagFiringOption": "ONCE_PER_EVENT",
183 | "monitoringMetadata": {
184 | "type": "MAP"
185 | },
186 | "consentSettings": {
187 | "consentStatus": "NOT_SET"
188 | }
189 | },
190 | {
191 | "accountId": "6055557665",
192 | "containerId": "92698776",
193 | "tagId": "21",
194 | "name": "Google Analytics - Product Click",
195 | "type": "ua",
196 | "parameter": [
197 | {
198 | "type": "BOOLEAN",
199 | "key": "nonInteraction",
200 | "value": "false"
201 | },
202 | {
203 | "type": "BOOLEAN",
204 | "key": "overrideGaSettings",
205 | "value": "false"
206 | },
207 | {
208 | "type": "TEMPLATE",
209 | "key": "eventCategory",
210 | "value": "Ecommerce"
211 | },
212 | {
213 | "type": "TEMPLATE",
214 | "key": "trackType",
215 | "value": "TRACK_EVENT"
216 | },
217 | {
218 | "type": "TEMPLATE",
219 | "key": "gaSettings",
220 | "value": "{{GA-ID}}"
221 | },
222 | {
223 | "type": "TEMPLATE",
224 | "key": "eventAction",
225 | "value": "Product Click"
226 | },
227 | {
228 | "type": "TEMPLATE",
229 | "key": "eventLabel",
230 | "value": "{{Product Name - productClick}}"
231 | }
232 | ],
233 | "fingerprint": "1661540977940",
234 | "firingTriggerId": [
235 | "20"
236 | ],
237 | "parentFolderId": "5",
238 | "tagFiringOption": "ONCE_PER_EVENT",
239 | "monitoringMetadata": {
240 | "type": "MAP"
241 | },
242 | "consentSettings": {
243 | "consentStatus": "NOT_SET"
244 | }
245 | },
246 | {
247 | "accountId": "6055557665",
248 | "containerId": "92698776",
249 | "tagId": "23",
250 | "name": "Google Analytics - Universal Analytics",
251 | "type": "ua",
252 | "parameter": [
253 | {
254 | "type": "BOOLEAN",
255 | "key": "overrideGaSettings",
256 | "value": "false"
257 | },
258 | {
259 | "type": "TEMPLATE",
260 | "key": "trackType",
261 | "value": "TRACK_PAGEVIEW"
262 | },
263 | {
264 | "type": "TEMPLATE",
265 | "key": "gaSettings",
266 | "value": "{{GA-ID}}"
267 | }
268 | ],
269 | "fingerprint": "1661540977941",
270 | "firingTriggerId": [
271 | "22"
272 | ],
273 | "parentFolderId": "5",
274 | "tagFiringOption": "ONCE_PER_EVENT",
275 | "monitoringMetadata": {
276 | "type": "MAP"
277 | },
278 | "consentSettings": {
279 | "consentStatus": "NOT_SET"
280 | }
281 | },
282 | {
283 | "accountId": "6055557665",
284 | "containerId": "92698776",
285 | "tagId": "25",
286 | "name": "Google Analytics - Add to Cart",
287 | "type": "ua",
288 | "parameter": [
289 | {
290 | "type": "BOOLEAN",
291 | "key": "nonInteraction",
292 | "value": "false"
293 | },
294 | {
295 | "type": "BOOLEAN",
296 | "key": "overrideGaSettings",
297 | "value": "false"
298 | },
299 | {
300 | "type": "TEMPLATE",
301 | "key": "eventCategory",
302 | "value": "Ecommerce"
303 | },
304 | {
305 | "type": "TEMPLATE",
306 | "key": "trackType",
307 | "value": "TRACK_EVENT"
308 | },
309 | {
310 | "type": "TEMPLATE",
311 | "key": "gaSettings",
312 | "value": "{{GA-ID}}"
313 | },
314 | {
315 | "type": "TEMPLATE",
316 | "key": "eventAction",
317 | "value": "Add to Cart"
318 | },
319 | {
320 | "type": "TEMPLATE",
321 | "key": "eventLabel",
322 | "value": "{{Product Name - addToCart}}"
323 | }
324 | ],
325 | "fingerprint": "1661540977942",
326 | "firingTriggerId": [
327 | "18"
328 | ],
329 | "parentFolderId": "5",
330 | "tagFiringOption": "ONCE_PER_EVENT",
331 | "monitoringMetadata": {
332 | "type": "MAP"
333 | },
334 | "consentSettings": {
335 | "consentStatus": "NOT_SET"
336 | }
337 | }
338 | ],
339 | "trigger": [
340 | {
341 | "accountId": "6055557665",
342 | "containerId": "92698776",
343 | "triggerId": "7",
344 | "name": "checkout",
345 | "type": "CUSTOM_EVENT",
346 | "customEventFilter": [
347 | {
348 | "type": "EQUALS",
349 | "parameter": [
350 | {
351 | "type": "TEMPLATE",
352 | "key": "arg0",
353 | "value": "{{_event}}"
354 | },
355 | {
356 | "type": "TEMPLATE",
357 | "key": "arg1",
358 | "value": "checkout"
359 | }
360 | ]
361 | }
362 | ],
363 | "fingerprint": "1661540977933",
364 | "parentFolderId": "6"
365 | },
366 | {
367 | "accountId": "6055557665",
368 | "containerId": "92698776",
369 | "triggerId": "14",
370 | "name": "removeFromCart",
371 | "type": "CUSTOM_EVENT",
372 | "customEventFilter": [
373 | {
374 | "type": "EQUALS",
375 | "parameter": [
376 | {
377 | "type": "TEMPLATE",
378 | "key": "arg0",
379 | "value": "{{_event}}"
380 | },
381 | {
382 | "type": "TEMPLATE",
383 | "key": "arg1",
384 | "value": "removeFromCart"
385 | }
386 | ]
387 | }
388 | ],
389 | "fingerprint": "1661540977936",
390 | "parentFolderId": "6"
391 | },
392 | {
393 | "accountId": "6055557665",
394 | "containerId": "92698776",
395 | "triggerId": "16",
396 | "name": "search",
397 | "type": "CUSTOM_EVENT",
398 | "customEventFilter": [
399 | {
400 | "type": "MATCH_REGEX",
401 | "parameter": [
402 | {
403 | "type": "TEMPLATE",
404 | "key": "arg0",
405 | "value": "{{_event}}"
406 | },
407 | {
408 | "type": "TEMPLATE",
409 | "key": "arg1",
410 | "value": "search.*"
411 | }
412 | ]
413 | }
414 | ],
415 | "fingerprint": "1661540977937",
416 | "parentFolderId": "6"
417 | },
418 | {
419 | "accountId": "6055557665",
420 | "containerId": "92698776",
421 | "triggerId": "18",
422 | "name": "addToCart",
423 | "type": "CUSTOM_EVENT",
424 | "customEventFilter": [
425 | {
426 | "type": "EQUALS",
427 | "parameter": [
428 | {
429 | "type": "TEMPLATE",
430 | "key": "arg0",
431 | "value": "{{_event}}"
432 | },
433 | {
434 | "type": "TEMPLATE",
435 | "key": "arg1",
436 | "value": "addToCart"
437 | }
438 | ]
439 | }
440 | ],
441 | "fingerprint": "1661540977938",
442 | "parentFolderId": "6"
443 | },
444 | {
445 | "accountId": "6055557665",
446 | "containerId": "92698776",
447 | "triggerId": "20",
448 | "name": "productClick",
449 | "type": "CUSTOM_EVENT",
450 | "customEventFilter": [
451 | {
452 | "type": "EQUALS",
453 | "parameter": [
454 | {
455 | "type": "TEMPLATE",
456 | "key": "arg0",
457 | "value": "{{_event}}"
458 | },
459 | {
460 | "type": "TEMPLATE",
461 | "key": "arg1",
462 | "value": "productClick"
463 | }
464 | ]
465 | }
466 | ],
467 | "fingerprint": "1661540977939",
468 | "parentFolderId": "6"
469 | },
470 | {
471 | "accountId": "6055557665",
472 | "containerId": "92698776",
473 | "triggerId": "22",
474 | "name": "gtm.dom",
475 | "type": "CUSTOM_EVENT",
476 | "customEventFilter": [
477 | {
478 | "type": "EQUALS",
479 | "parameter": [
480 | {
481 | "type": "TEMPLATE",
482 | "key": "arg0",
483 | "value": "{{_event}}"
484 | },
485 | {
486 | "type": "TEMPLATE",
487 | "key": "arg1",
488 | "value": "gtm.dom"
489 | }
490 | ]
491 | }
492 | ],
493 | "filter": [
494 | {
495 | "type": "EQUALS",
496 | "parameter": [
497 | {
498 | "type": "TEMPLATE",
499 | "key": "arg0",
500 | "value": "{{Event}}"
501 | },
502 | {
503 | "type": "TEMPLATE",
504 | "key": "arg1",
505 | "value": "gtm.dom"
506 | }
507 | ]
508 | }
509 | ],
510 | "fingerprint": "1661540977940",
511 | "parentFolderId": "6"
512 | },
513 | {
514 | "accountId": "6055557665",
515 | "containerId": "92698776",
516 | "triggerId": "26",
517 | "name": "order-confirmation",
518 | "type": "CUSTOM_EVENT",
519 | "customEventFilter": [
520 | {
521 | "type": "EQUALS",
522 | "parameter": [
523 | {
524 | "type": "TEMPLATE",
525 | "key": "arg0",
526 | "value": "{{_event}}"
527 | },
528 | {
529 | "type": "TEMPLATE",
530 | "key": "arg1",
531 | "value": "order-confirmation"
532 | }
533 | ]
534 | }
535 | ],
536 | "fingerprint": "1661541394525",
537 | "parentFolderId": "6"
538 | }
539 | ],
540 | "variable": [
541 | {
542 | "accountId": "6055557665",
543 | "containerId": "92698776",
544 | "variableId": "4",
545 | "name": "Product Name - addToCart",
546 | "type": "v",
547 | "parameter": [
548 | {
549 | "type": "INTEGER",
550 | "key": "dataLayerVersion",
551 | "value": "2"
552 | },
553 | {
554 | "type": "BOOLEAN",
555 | "key": "setDefaultValue",
556 | "value": "false"
557 | },
558 | {
559 | "type": "TEMPLATE",
560 | "key": "name",
561 | "value": "ecommerce.add.products.0.name"
562 | }
563 | ],
564 | "fingerprint": "1661540977932",
565 | "parentFolderId": "3",
566 | "formatValue": {}
567 | },
568 | {
569 | "accountId": "6055557665",
570 | "containerId": "92698776",
571 | "variableId": "8",
572 | "name": "environment",
573 | "type": "v",
574 | "parameter": [
575 | {
576 | "type": "INTEGER",
577 | "key": "dataLayerVersion",
578 | "value": "2"
579 | },
580 | {
581 | "type": "BOOLEAN",
582 | "key": "setDefaultValue",
583 | "value": "false"
584 | },
585 | {
586 | "type": "TEMPLATE",
587 | "key": "name",
588 | "value": "environment"
589 | }
590 | ],
591 | "fingerprint": "1661540977934",
592 | "parentFolderId": "3",
593 | "formatValue": {}
594 | },
595 | {
596 | "accountId": "6055557665",
597 | "containerId": "92698776",
598 | "variableId": "9",
599 | "name": "GA-Lookup",
600 | "type": "smm",
601 | "parameter": [
602 | {
603 | "type": "BOOLEAN",
604 | "key": "setDefaultValue",
605 | "value": "false"
606 | },
607 | {
608 | "type": "TEMPLATE",
609 | "key": "input",
610 | "value": "{{environment}}"
611 | },
612 | {
613 | "type": "LIST",
614 | "key": "map",
615 | "list": [
616 | {
617 | "type": "MAP",
618 | "map": [
619 | {
620 | "type": "TEMPLATE",
621 | "key": "key",
622 | "value": "production"
623 | },
624 | {
625 | "type": "TEMPLATE",
626 | "key": "value",
627 | "value": "UA-12345-67"
628 | }
629 | ]
630 | },
631 | {
632 | "type": "MAP",
633 | "map": [
634 | {
635 | "type": "TEMPLATE",
636 | "key": "key",
637 | "value": "development"
638 | },
639 | {
640 | "type": "TEMPLATE",
641 | "key": "value",
642 | "value": "UA-98765-43"
643 | }
644 | ]
645 | }
646 | ]
647 | }
648 | ],
649 | "fingerprint": "1661540977934",
650 | "formatValue": {}
651 | },
652 | {
653 | "accountId": "6055557665",
654 | "containerId": "92698776",
655 | "variableId": "10",
656 | "name": "GA-ID",
657 | "type": "gas",
658 | "parameter": [
659 | {
660 | "type": "TEMPLATE",
661 | "key": "cookieDomain",
662 | "value": "auto"
663 | },
664 | {
665 | "type": "BOOLEAN",
666 | "key": "useEcommerceDataLayer",
667 | "value": "true"
668 | },
669 | {
670 | "type": "BOOLEAN",
671 | "key": "doubleClick",
672 | "value": "false"
673 | },
674 | {
675 | "type": "BOOLEAN",
676 | "key": "setTrackerName",
677 | "value": "false"
678 | },
679 | {
680 | "type": "BOOLEAN",
681 | "key": "useDebugVersion",
682 | "value": "false"
683 | },
684 | {
685 | "type": "BOOLEAN",
686 | "key": "useHashAutoLink",
687 | "value": "false"
688 | },
689 | {
690 | "type": "BOOLEAN",
691 | "key": "decorateFormsAutoLink",
692 | "value": "false"
693 | },
694 | {
695 | "type": "BOOLEAN",
696 | "key": "enableLinkId",
697 | "value": "false"
698 | },
699 | {
700 | "type": "BOOLEAN",
701 | "key": "enableEcommerce",
702 | "value": "true"
703 | },
704 | {
705 | "type": "TEMPLATE",
706 | "key": "trackingId",
707 | "value": "{{GA-Lookup}}"
708 | }
709 | ],
710 | "fingerprint": "1661540977935"
711 | },
712 | {
713 | "accountId": "6055557665",
714 | "containerId": "92698776",
715 | "variableId": "11",
716 | "name": "Checkout Step - checkout",
717 | "type": "v",
718 | "parameter": [
719 | {
720 | "type": "INTEGER",
721 | "key": "dataLayerVersion",
722 | "value": "2"
723 | },
724 | {
725 | "type": "BOOLEAN",
726 | "key": "setDefaultValue",
727 | "value": "false"
728 | },
729 | {
730 | "type": "TEMPLATE",
731 | "key": "name",
732 | "value": "ecommerce.checkout.actionField.step"
733 | }
734 | ],
735 | "fingerprint": "1661540977935",
736 | "parentFolderId": "3",
737 | "formatValue": {}
738 | },
739 | {
740 | "accountId": "6055557665",
741 | "containerId": "92698776",
742 | "variableId": "13",
743 | "name": "Product Name - removeFromCart",
744 | "type": "v",
745 | "parameter": [
746 | {
747 | "type": "INTEGER",
748 | "key": "dataLayerVersion",
749 | "value": "2"
750 | },
751 | {
752 | "type": "BOOLEAN",
753 | "key": "setDefaultValue",
754 | "value": "false"
755 | },
756 | {
757 | "type": "TEMPLATE",
758 | "key": "name",
759 | "value": "ecommerce.remove.products.0.name"
760 | }
761 | ],
762 | "fingerprint": "1661540977936",
763 | "parentFolderId": "3",
764 | "formatValue": {}
765 | },
766 | {
767 | "accountId": "6055557665",
768 | "containerId": "92698776",
769 | "variableId": "19",
770 | "name": "Product Name - productClick",
771 | "type": "v",
772 | "parameter": [
773 | {
774 | "type": "INTEGER",
775 | "key": "dataLayerVersion",
776 | "value": "2"
777 | },
778 | {
779 | "type": "BOOLEAN",
780 | "key": "setDefaultValue",
781 | "value": "false"
782 | },
783 | {
784 | "type": "TEMPLATE",
785 | "key": "name",
786 | "value": "ecommerce.click.products.0.name"
787 | }
788 | ],
789 | "fingerprint": "1661540977939",
790 | "parentFolderId": "3",
791 | "formatValue": {}
792 | },
793 | {
794 | "accountId": "6055557665",
795 | "containerId": "92698776",
796 | "variableId": "24",
797 | "name": "event",
798 | "type": "v",
799 | "parameter": [
800 | {
801 | "type": "INTEGER",
802 | "key": "dataLayerVersion",
803 | "value": "2"
804 | },
805 | {
806 | "type": "BOOLEAN",
807 | "key": "setDefaultValue",
808 | "value": "false"
809 | },
810 | {
811 | "type": "TEMPLATE",
812 | "key": "name",
813 | "value": "event"
814 | }
815 | ],
816 | "fingerprint": "1661540977941",
817 | "parentFolderId": "3",
818 | "formatValue": {}
819 | }
820 | ],
821 | "folder": [
822 | {
823 | "accountId": "6055557665",
824 | "containerId": "92698776",
825 | "folderId": "3",
826 | "name": "DataLayer",
827 | "fingerprint": "1661540977931"
828 | },
829 | {
830 | "accountId": "6055557665",
831 | "containerId": "92698776",
832 | "folderId": "5",
833 | "name": "Google Analytics",
834 | "fingerprint": "1661540977932"
835 | },
836 | {
837 | "accountId": "6055557665",
838 | "containerId": "92698776",
839 | "folderId": "6",
840 | "name": "Events",
841 | "fingerprint": "1661540977933"
842 | }
843 | ],
844 | "builtInVariable": [
845 | {
846 | "accountId": "6055557665",
847 | "containerId": "92698776",
848 | "type": "PAGE_URL",
849 | "name": "Page URL"
850 | },
851 | {
852 | "accountId": "6055557665",
853 | "containerId": "92698776",
854 | "type": "PAGE_HOSTNAME",
855 | "name": "Page Hostname"
856 | },
857 | {
858 | "accountId": "6055557665",
859 | "containerId": "92698776",
860 | "type": "PAGE_PATH",
861 | "name": "Page Path"
862 | },
863 | {
864 | "accountId": "6055557665",
865 | "containerId": "92698776",
866 | "type": "REFERRER",
867 | "name": "Referrer"
868 | },
869 | {
870 | "accountId": "6055557665",
871 | "containerId": "92698776",
872 | "type": "EVENT",
873 | "name": "Event"
874 | }
875 | ],
876 | "fingerprint": "1661541412295",
877 | "tagManagerUrl": "https://tagmanager.google.com/#/versions/accounts/6055557665/containers/92698776/versions/0?apiLink=version"
878 | }
879 | }
880 |
--------------------------------------------------------------------------------
/metadata/gtm_metadata.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Enable GTM
7 | boolean
8 | false
9 | false
10 | false
11 |
12 |
13 | Enable GA4
14 | boolean
15 | false
16 | false
17 | false
18 |
19 |
20 | GTM ID
21 | This is the ID you get from GTM
22 | string
23 | false
24 | false
25 | 0
26 |
27 |
28 |
29 |
30 | GTM
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------