-
Notifications
You must be signed in to change notification settings - Fork 2
/
template.tpl
1074 lines (1002 loc) · 40.3 KB
/
template.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
___TERMS_OF_SERVICE___
By creating or modifying this file you agree to Google Tag Manager's Community
Template Gallery Developer Terms of Service available at
https://developers.google.com/tag-manager/gallery-tos (or such other URL as
Google may provide), as modified from time to time.
___INFO___
{
"displayName": "Coveo Analytics",
"description": "The Coveo Analytics template allows you to log events to Coveo Usage Analytics.",
"categories": [
"ANALYTICS",
"PERSONALIZATION",
"SESSION_RECORDING"
],
"securityGroups": [],
"id": "cvt_temp_public_id",
"type": "TAG",
"version": 1,
"brand": {
"thumbnail": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAADQCAYAAAAu23xtAAAACXBIWXMAAAsSAAALEgHS3X78AAAbP0lEQVR4nO2dPXIbuRLHIZdz+lUptMrcE5hbxVxyonRlK1Em6gQrn8DyCVY+gcnMyXql1MmSuaqWPMGSpQ0ViCfQK1B/yKPhDND4nK/+Van2PWs0g8Hgj240GsDOw8ODYOrF+vjwlRBigELJ/171/vyx1BVy57uQf3MkhLjHz/Lhg9D+DdMdWOgVsz4+PICY5U9fCLFfUKK1/L1O7DvfN6J+U/CrhRS9EGIuhJjK/z582HQETIdgoScGwlY/RaIu42Pvzx+XRb/b+b65198W91pA9NOHD+Kq5lXGBOAlV2J81seHR3Cr5U/P8YFzw+/WFvd+i5/fd75v/v+1HB7IH7b27YQteiRguUee4lac9f78MdZdsPN986yvAd5Gin7Mlr5dsNADgiCaFPZFyXjZBaPIFQHFLllJwQshLtnKNx8WegAg8HP8+FrvLGSRKwKLXTGRnRdH8ZsLC92DiAIXLiJXRBK7YME3Fxa6I+vjw4tIAhc+IldEFLvkCwTPLn1DYKFbgiDbOOAYPI+3yBWRxb6G2Aun/Jh6wUInAjddCvC3iI8JJnJFZLFLZtKzefignf5jKuYFfwAzmAdfNk3kkocPm87pLPR9M8ikn392vm9mGpiawhZdA6y4dE1PIz8qisizJLDsAtZ9xMG6+sFCL2F9fDhAtlissbgiusgVicS+htg54aZGsOtewPr4cIRc8NaIXKRx4wVm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NAtQI58zAMPwos9vsjZijcAFrolyFy7jHDGmCKc2OOKfAaBsxVvACx0R/bu5gcQfAx33l/s8US+gsA5ot4gWOieYL34RYSpOHexxxE5C7zBsNADAcGPAk/H2Ys9vMhZ4C2AhR4YuPSjgItk6GIPK/JrbEjBhym0ABZ6JJBwo44l9h3Hm8UeRuTbO84wrYCFngBE6o/w4+rav7/dHRRb18cjk/91vO8Cm1KMOZutvbT12ORacbs7WCJCfwlLf5D5oVr7vuPv8qwyZ6NP2XJ3A7boNQDjerWrTL9gS6nNem7DDjNFZ8zNMjvOTDe7znBiSydhodcYpN6+ut0d0JJS/tuRHcY9u+BMHhY6w3QA3niCYToAC51hOgALnWE6AAudYToAC51hOgALnWE6AAudYToAC51hOgALnWE6AAudYToAC51hOgALnWE6AAudYToAC51hOgALnWE6AAudYToAC51hOgALnWE6AAudYToAC51hOgALnWE6AAudYToAC51hOgALnWE6AAudYToAC51hOgALnWE6AAudYToAC51hOgALnWE6AAudYToAC51hOgALnWE6AAudYTrAS59XHA5PDoQQAyHEKyHEQcElUyHEvfzvzc23eRXVORyevEIZD1DOQcFllZez6QyHJwPUbV/TFpao42XdXhdtmdJG5jc336YVFNGLnYeHB6u/Hw5PRkKIIyHEb5YPXgshroQQl7HFBHEfeZZz7PtBh8OTKzScIpY3N99GPvcnluEc9VDIzc23IlFS7y1Fre7/xuJPV7J+0RbuXZ/vQ4A2MkUbuQpcrgvd729uvl1krh2hY50WtdXh8OQIndaULHTc9MLyg5Yxk/cK3TPi453jpxfgliuUc+xYnkshxO+aS35N0OktNd9s4tLZQOCyLZx6Fk8K5jKl4OvWRvIMhydaQd7cfNtR/3s4PJH62ZdluLn51i+41z3e8bNxjC5dGjSWr4FELlC4v6UQUPHewHLJcn4K9AEF3verrFC4prZcGq4/D1TOQtCj676ZqXxbwOL8G0DkAt9Jfq+5Y/1agfqI1UZCvcO7zI/u356VAUOPJ2CYn95Ra9Ehnj8CFF7HQrpPruM2dBRjB/fLFml9zm17brjvurL9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2zEZdgNaGtTQEd0QwnJp1hucID7moT8KcIhEWNDGwn1XZyx2TNOvsg0hNhheb9ih0xyJBeC0olBoEMKtdEiZVvpkBaCkimne7cgjYmw0YZAPQeLwst2hfr+28czQ4dp2tYp5CERlDZS+dA3v687ZR/vheu+W3A/x7kEHavN+ghb9ii+YE9367EzGrCpl5Z8Cb1Bv2Ebp4+GY7JI+7UTy/EKEXjTZpwj380oSvZ5dz5pllh24dlGitpyEdG2r7Jh65BFeUKGxckcpMMRCMfsLiB2UoUT9o9TrPBc6jZKNscBW5WZCuHwhTKC75kHAf5NuNT6EARhPrmFvMddyb2ph5FYHd2MNjIiHru8wtbjle/pUCT0PnpD6rGyCwQi8uPUV0iwOCJ2HFYnczgI4hrv5VtOgcYxiBFFtfBY8kTZwNPyRN2ZagslxxoNUNcHhvTdp/v5bEQZsI0IlPnAYj1+0G2lfSk8NhkfZBrwDGkK1h/Vw/r5EP0DWhwnpIi6w2gFh24qvDvUtrYRWwpXr6GABy4LNRy5dsnAI26eHxJ1CkzsD2g73xs1/xxDAsoRVSFZwHX38poybUQ3ixCSVd1ELsosugJu5Djy+ePeAS2L4JkPzoEbF4bDkytivXuNZW3AmHqcwNOLEeRM0UauEZyswz6Lz9AKXWF5wiiVBQI4wcaVmDWgBEkqLScFi0BYtIMrisgkEMVw5Weo65jDonPCuXK2WJ8unBqS0DOVpKKNPr3iAhHOKAkEaIiqnD4d0wzlrGy7a8NUmyLYlJoNmRkKSlDNhJzBGacSSmbDjrJjvKnMUO7ab9dlJXQFPvIRxvGmVV1rBPammOZK1ijhrmXLqWuQK0RcVdS48i2YYNV1Acp7nA1XKfD4VB1TotKzTHR7WqWrizZykPmhtJHkbdkXJ6EXgQrLZs3d1y0gIYrLueR91cICi5mfKq1leyiiKW2ZjBDi/8OMH0pLHF/fAAAAAElFTkSuQmCC",
"displayName": "coveo",
"id": "github.com_coveo"
},
"containerContexts": [
"WEB"
]
}
___TEMPLATE_PARAMETERS___
[
{
"macrosInSelect": false,
"selectItems": [
{
"displayValue": "Send page view",
"value": "view"
},
{
"value": "event",
"displayValue": "Send event"
},
{
"displayValue": "Initialize the Coveo Analytics script",
"value": "load"
},
{
"value": "custom",
"displayValue": "Send event (legacy custom events)"
}
],
"displayName": "Action",
"simpleValueType": true,
"name": "eventType",
"type": "SELECT",
"help": "The action to perform when the tag is triggered (see \u003ca href\u003d\"https://docs.coveo.com/en/2926/\"\u003eLogging Coveo Events From Google Tag Manager\u003c/a\u003e)."
},
{
"name": "Event Description",
"type": "GROUP",
"subParams": [
{
"enablingConditions": [
{
"paramName": "eventType",
"type": "EQUALS",
"paramValue": "custom"
}
],
"displayName": "This type of event is deprecated, use Send Event and Send Page View instead.",
"name": "Custom Coveo Event Type Description",
"type": "LABEL"
},
{
"enablingConditions": [
{
"paramName": "eventType",
"type": "EQUALS",
"paramValue": "load"
}
],
"displayName": "This action should be performed once per page before logging events to Coveo Usage Analytics (see \u003ca href\u003d\"https://docs.coveo.com/en/2926/#loading-the-coveo-analytics-script\"\u003eLoading the Coveo Analytics Script\u003c/a\u003e).",
"name": "Load Event Type Description",
"type": "LABEL"
},
{
"enablingConditions": [
{
"paramName": "eventType",
"type": "EQUALS",
"paramValue": "view"
}
],
"displayName": "Page view events are leveraged by Coveo ML Event Recommendation models (see \u003ca href\u003d\"https://docs.coveo.com/en/1886/\"\u003eCoveo Machine Learning Event Recommendations Deployment Overview\u003c/a\u003e).",
"name": "View Event Type Description",
"type": "LABEL"
},
{
"type": "LABEL",
"name": "Event Type Description",
"displayName": "Events are used to send the data accumulated in the data layer or with other commands on the page.",
"enablingConditions": [
{
"paramName": "eventType",
"paramValue": "event",
"type": "EQUALS"
}
]
}
]
},
{
"enablingConditions": [
{
"paramName": "eventType",
"type": "EQUALS",
"paramValue": "custom"
}
],
"displayName": "Event metadata",
"name": "Custom Event Metadata",
"groupStyle": "ZIPPY_OPEN",
"type": "GROUP",
"subParams": [
{
"valueValidators": [
{
"type": "NON_EMPTY"
}
],
"help": "The broad category to associate the custom event with (e.g., \u003ccode\u003ePage Navigation\u003c/code\u003e).",
"displayName": "Event type",
"simpleValueType": true,
"name": "customEventType",
"type": "TEXT"
},
{
"help": "A concise description of the specific action that triggered the custom event (e.g., \u003ccode\u003eClick Help Button\u003c/code\u003e).",
"valueValidators": [
{
"type": "NON_EMPTY"
}
],
"displayName": "Event value",
"simpleValueType": true,
"name": "customEventValue",
"type": "TEXT"
}
]
},
{
"enablingConditions": [
{
"paramName": "eventType",
"type": "EQUALS",
"paramValue": "custom"
}
],
"displayName": "Document metadata",
"name": "Document Metadata",
"groupStyle": "ZIPPY_OPEN",
"type": "GROUP",
"subParams": [
{
"help": "The language of the current page. Must be a valid \u003ca href\u003d\u0027https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes\u0027\u003eISO-639-1 code\u003c/a\u003e (e.g., \u003ccode\u003een\u003c/code\u003e)",
"valueValidators": [
{
"type": "NON_EMPTY"
}
],
"displayName": "Language",
"simpleValueType": true,
"name": "language",
"type": "TEXT"
},
{
"help": "(Optional) The URL of the current page. Defaults to \u003ccode\u003ewindow.location\u003c/code\u003e.",
"displayName": "Location",
"simpleValueType": true,
"name": "location",
"type": "TEXT"
},
{
"help": "(Optional) The title of the current page. Defaults to \u003ccode\u003edocument.title\u003c/code\u003e.",
"displayName": "Title",
"simpleValueType": true,
"name": "title",
"type": "TEXT"
},
{
"help": "(Optional) Whether the current end user is anonymous. Allowed values are \u003ccode\u003etrue\u003c/code\u003e and \u003ccode\u003efalse\u003c/code\u003e. Defaults to \u003ccode\u003efalse\u003c/code\u003e.",
"displayName": "Is anonymous",
"simpleValueType": true,
"name": "isAnonymous",
"type": "TEXT"
},
{
"displayName": "Username",
"simpleValueType": true,
"name": "username",
"type": "TEXT"
},
{
"help": "(Optional) A human-readable name to display in usage analytics reports for the current user (e.g., \u003ccode\u003eAlice Smith\u003c/code\u003e).",
"enablingConditions": [
{
"paramName": "username",
"type": "PRESENT",
"paramValue": ""
}
],
"displayName": "User display name",
"simpleValueType": true,
"name": "userDisplayName",
"type": "TEXT"
}
]
},
{
"enablingConditions": [
{
"paramName": "eventType",
"type": "EQUALS",
"paramValue": "custom"
},
{
"paramName": "eventType",
"paramValue": "view",
"type": "EQUALS"
},
{
"paramName": "eventType",
"paramValue": "event",
"type": "EQUALS"
}
],
"displayName": "Override Metadata",
"name": "Custom Data",
"groupStyle": "ZIPPY_CLOSED",
"type": "GROUP",
"subParams": [
{
"name": "customDataTable",
"simpleTableColumns": [
{
"valueValidators": [
{
"type": "NON_EMPTY"
}
],
"defaultValue": "",
"displayName": "Key",
"name": "key",
"isUnique": true,
"type": "TEXT"
},
{
"valueValidators": [
{
"type": "NON_EMPTY"
}
],
"defaultValue": "",
"displayName": "Value",
"name": "value",
"type": "TEXT"
}
],
"type": "SIMPLE_TABLE"
},
{
"name": "customDataObjects",
"simpleTableColumns": [
{
"macrosInSelect": true,
"selectItems": [],
"valueValidators": [],
"defaultValue": "",
"help": "A JavaScript object to merge with the other specified custom metadata.",
"displayName": "Object to merge",
"name": "object",
"type": "SELECT"
}
],
"type": "SIMPLE_TABLE"
}
]
},
{
"displayName": "Configuration",
"name": "Configuration",
"groupStyle": "ZIPPY_OPEN",
"type": "GROUP",
"subParams": [
{
"help": "An API key granting only the \u003cstrong\u003eUsage Analytics - Push\u003c/strong\u003e privilege in the target Coveo Cloud organization (see \u003ca href\u003d\"https://docs.coveo.com/en/1718/\"\u003eAdding and Managing API Keys\u003c/a\u003e).",
"valueValidators": [
{
"enablingConditions": [
{
"paramName": "eventType",
"type": "EQUALS",
"paramValue": "load"
}
],
"type": "NON_EMPTY"
}
],
"displayName": "API key",
"simpleValueType": true,
"name": "apiKey",
"type": "TEXT"
},
{
"macrosInSelect": true,
"selectItems": [
{
"displayValue": "Coveo Cloud",
"value": "https://analytics.cloud.coveo.com/rest/ua"
},
{
"displayValue": "Coveo Cloud (HIPAA)",
"value": "https://analyticshipaa.cloud.coveo.com/rest/ua"
}
],
"valueValidators": [],
"help": "The target Coveo Cloud platform environment.",
"displayName": "Analytics endpoint",
"simpleValueType": true,
"name": "analyticsEndpoint",
"type": "SELECT"
},
{
"help": "The version of the script to load",
"valueValidators": [
{
"args": [
"\\d(\\.\\d)?(\\.\\d)?(\\-[a-z0-9]+)?"
],
"enablingConditions": [
{
"paramName": "scriptVersion",
"type": "PRESENT",
"paramValue": ""
}
],
"errorMessage": "You must use the format \u003ccode\u003eMAJOR.MINOR\u003c/code\u003e (e.g., \u003ccode\u003e1.0\u003c/code\u003e)",
"type": "REGEX"
}
],
"displayName": "Script version",
"simpleValueType": true,
"name": "scriptVersion",
"type": "TEXT",
"valueHint": "2.0"
}
]
}
]
___SANDBOXED_JS_FOR_WEB_TEMPLATE___
const log = require('logToConsole');
const JSON = require('JSON');
const isLoadEventType = () => data.eventType === "load";
const isSomewhatAJSON = (value) => typeof value === 'string' && value.indexOf("{") !== -1 && value.indexOf("}") !== -1;
const getAsJSONOrValue = (value) => {
return (isSomewhatAJSON(value) && JSON.parse(value)) || value;
};
const validateVariablesToLoadScript = () => {
const COMMON_ERROR_MESSAGE = "Coveo Analytics Script could not be initialized.\n";
const missingKeys = ['analyticsEndpoint', 'apiKey'].filter(key => !data[key]);
const hasMissingKeys = missingKeys.length > 0;
if (missingKeys.length > 0) {
if (isLoadEventType()) {
log(COMMON_ERROR_MESSAGE + "The \"Configuration\" section is missing the following keys: " + missingKeys.join(", "));
} else {
log(COMMON_ERROR_MESSAGE + "You must either provide the variables in the \"Configuration\" section to the first Coveo Analytics tag or add the \"Load\" event type before this tag.");
}
return false;
}
return true;
};
const loadCoveoAnalyticsScript = (onSuccess) => {
const injectScript = require("injectScript");
const setInWindow = require("setInWindow");
const createArgumentsQueue = require('createArgumentsQueue');
const coveoua = createArgumentsQueue('coveoua', 'coveoua.q');
const getTimestamp = require('getTimestamp');
setInWindow('coveoua.t', getTimestamp(), true);
coveoua("init", data.apiKey, data.analyticsEndpoint);
coveoua("onLoad", function() {
log('Coveo Analytics Initialized');
});
const scriptVersion = data.scriptVersion || "2";
const url = "https://static.cloud.coveo.com/coveo.analytics.js/" + scriptVersion + "/coveoua.js";
injectScript(url, onSuccess, data.gtmOnFailure, url);
};
const loadCoveoAnalyticsScriptIfNotLoaded = (onSuccess, onFailure) => {
const copyFromWindow = require("copyFromWindow");
const isLoaded = copyFromWindow("coveoua");
if (!isLoaded) {
if (!validateVariablesToLoadScript()) {
onFailure();
}
loadCoveoAnalyticsScript(onSuccess);
} else {
onSuccess();
}
};
const addToObject = function(obj) {
for (let index in arguments) {
const obj2 = arguments[index];
for (let key in obj2) {
if (obj2.hasOwnProperty(key)) {
obj[key] = obj2[key];
}
}
}
return obj;
};
const isObjectEmpty = function(obj) {
for (let key in obj) {
if (obj.hasOwnProperty(key)) {
return false;
}
}
return true;
};
const generateCustomData = () => {
const customDataObject = {};
if (!!data.customDataTable && data.customDataTable.length > 0) {
const makeParsedTableMap = (table) => {
const makeTableMap = require('makeTableMap');
const tableWithParsedValues = table.map((row) => ({key: row.key, value: getAsJSONOrValue(row.value)}));
return makeTableMap(tableWithParsedValues, 'key', 'value');
};
const objForUsageAnalytics = makeParsedTableMap(data.customDataTable);
addToObject(customDataObject,
objForUsageAnalytics);
}
if (!!data.customDataObjects && data.customDataObjects.length > 0) {
const getValidCustomDataObjectsFromArray = (objects) => {
return objects.map(row => row.object).map(getAsJSONOrValue).filter(obj => typeof obj === 'object');
};
getValidCustomDataObjectsFromArray(data.customDataObjects)
.forEach(obj => addToObject(customDataObject, obj));
}
return customDataObject;
};
const eventTypeMap = {
custom: "custom"
};
const eventDataForTypeMap = {
custom: {
eventType: data.customEventType,
eventValue: data.customEventValue,
customData: {}
}
};
const measurementProtocolTypeMap = {
view: 'pageview',
event: 'event'
};
const logWithMeasurementProtocol = () => {
const copyFromDataLayer = require("copyFromDataLayer");
const event = copyFromDataLayer('event');
const ecommerce = copyFromDataLayer('ecommerce');
const createArgumentsQueue = require('createArgumentsQueue');
const coveoua = createArgumentsQueue('coveoua', 'coveoua.q');
if (ecommerce) {
const setAction = (action, metadata) => !!metadata ? coveoua("ec:setAction", action, metadata) : coveoua("ec:setAction", action);
const addAllProductsIfDefined = (products) => !!products && products.forEach(product => coveoua("ec:addProduct", product));
const addAllImpressionsIfDefined = (impressions) => !!impressions && impressions.forEach(impression => coveoua("ec:addImpression", impression));
if (ecommerce.currencyCode) {
coveoua("set", "currencyCode", ecommerce.currencyCode);
}
const eventMapping = {
"gtm.load": ["refund", "purchase", "detail"],
"gtm.dom": ["refund", "purchase", "detail"],
"addToCart": ["add"],
"removeFromCart": ["remove"],
"checkout": ["checkout"],
"checkoutOption": ["checkout_option"],
"productClick": ["click"],
// Custom event type, in case you want to send them after "gtm.load" or "gtm.dom".
"refund": ["refund"],
"purchase": ["purchase"],
"detailView": ["detail"],
"impression": ["impression", "impressions"]
};
const customCoveoActionsOverride = {
"impressions": "impression"
};
const eventsToTest = eventMapping[event];
const eventsFoundForType = !!eventsToTest && eventsToTest.filter(e => ecommerce.hasOwnProperty(e));
const ecommerceDataLayerToUse = eventsFoundForType.length > 0 && ecommerce[eventsFoundForType[0]];
if (ecommerceDataLayerToUse) {
addAllProductsIfDefined(ecommerceDataLayerToUse.products);
addAllImpressionsIfDefined(ecommerceDataLayerToUse.impressions);
const action = eventsFoundForType[0];
setAction(customCoveoActionsOverride[action] || action, ecommerceDataLayerToUse.actionField);
}
addAllImpressionsIfDefined(ecommerce.impressions);
}
log('Coveo Using Measurement Protocol');
const customData = generateCustomData();
if (isObjectEmpty(customData)) {
coveoua("send", measurementProtocolTypeMap[data.eventType]);
} else {
coveoua("send", measurementProtocolTypeMap[data.eventType], customData);
}
};
const logCoveoAnalyticsEvent = () => {
const eventDataForType = eventDataForTypeMap[data.eventType];
addToObject(eventDataForType.customData, generateCustomData());
const getUrl = require("getUrl");
const getReferrerUrl = require("getReferrerUrl");
const readTitle = require("readTitle");
const eventData = {
location: data.location || getUrl(),
referrer: data.referrer || getReferrerUrl(),
language: data.language,
title: data.title || readTitle(),
anonymous: data.isAnonymous,
username: data.username,
userDisplayName: data.userDisplayName
};
addToObject(eventData, eventDataForType);
log('Coveo Analytics Data =', eventData);
const createArgumentsQueue = require('createArgumentsQueue');
const coveoua = createArgumentsQueue('coveoua', 'coveoua.q');
coveoua("send", eventTypeMap[data.eventType], eventData);
};
loadCoveoAnalyticsScriptIfNotLoaded(() => {
if (!isLoadEventType()) {
if (eventDataForTypeMap[data.eventType]) {
logCoveoAnalyticsEvent();
} else {
logWithMeasurementProtocol();
}
}
data.gtmOnSuccess();
}, () => {
data.gtmOnFailure();
});
___WEB_PERMISSIONS___
[
{
"instance": {
"key": {
"publicId": "logging",
"versionId": "1"
},
"param": [
{
"key": "environments",
"value": {
"type": 1,
"string": "debug"
}
}
]
},
"clientAnnotations": {
"isEditedByUser": true
},
"isRequired": true
},
{
"instance": {
"key": {
"publicId": "access_globals",
"versionId": "1"
},
"param": [
{
"key": "keys",
"value": {
"type": 2,
"listItem": [
{
"type": 3,
"mapKey": [
{
"type": 1,
"string": "key"
},
{
"type": 1,
"string": "read"
},
{
"type": 1,
"string": "write"
},
{
"type": 1,
"string": "execute"
}
],
"mapValue": [
{
"type": 1,
"string": "coveoua"
},
{
"type": 8,
"boolean": true
},
{
"type": 8,
"boolean": true
},
{
"type": 8,
"boolean": false
}
]
},
{
"type": 3,
"mapKey": [
{
"type": 1,
"string": "key"
},
{
"type": 1,
"string": "read"
},
{
"type": 1,
"string": "write"
},
{
"type": 1,
"string": "execute"
}
],
"mapValue": [
{
"type": 1,
"string": "coveoua.q"
},
{
"type": 8,
"boolean": true
},
{
"type": 8,
"boolean": true
},
{
"type": 8,
"boolean": false
}
]
},
{
"type": 3,
"mapKey": [
{
"type": 1,
"string": "key"
},
{
"type": 1,
"string": "read"
},
{
"type": 1,
"string": "write"
},
{
"type": 1,
"string": "execute"
}
],
"mapValue": [
{
"type": 1,
"string": "coveoua.t"
},
{
"type": 8,
"boolean": true
},
{
"type": 8,
"boolean": true
},
{
"type": 8,
"boolean": false
}
]
},
{
"type": 3,
"mapKey": [
{
"type": 1,
"string": "key"
},
{
"type": 1,
"string": "read"
},
{
"type": 1,
"string": "write"
},
{
"type": 1,
"string": "execute"
}
],
"mapValue": [
{
"type": 1,
"string": "coveoanalytics"
},
{
"type": 8,
"boolean": true
},
{
"type": 8,
"boolean": false
},
{
"type": 8,
"boolean": false
}
]
}
]
}
}
]
},
"clientAnnotations": {
"isEditedByUser": true
},
"isRequired": true
},
{
"instance": {
"key": {
"publicId": "get_referrer",
"versionId": "1"
},
"param": [
{
"key": "urlParts",
"value": {
"type": 1,
"string": "any"
}
},
{
"key": "queriesAllowed",
"value": {
"type": 1,
"string": "any"
}
}
]
},
"clientAnnotations": {
"isEditedByUser": true
},
"isRequired": true
},
{
"instance": {
"key": {
"publicId": "read_title",
"versionId": "1"
},
"param": []
},
"isRequired": true
},
{
"instance": {
"key": {
"publicId": "get_url",
"versionId": "1"
},
"param": [
{
"key": "urlParts",
"value": {
"type": 1,
"string": "any"
}
},
{
"key": "queriesAllowed",
"value": {
"type": 1,
"string": "any"
}
}
]
},
"clientAnnotations": {
"isEditedByUser": true
},
"isRequired": true
},
{
"instance": {
"key": {
"publicId": "inject_script",
"versionId": "1"
},
"param": [
{
"key": "urls",
"value": {
"type": 2,
"listItem": [
{
"type": 1,
"string": "https://static.cloud.coveo.com/coveo.analytics.js/*/coveoua.js"
}
]
}
}
]
},
"clientAnnotations": {
"isEditedByUser": true
},
"isRequired": true
},
{
"instance": {
"key": {
"publicId": "read_data_layer",
"versionId": "1"
},
"param": [
{
"key": "keyPatterns",
"value": {
"type": 2,
"listItem": [
{
"type": 1,
"string": "ecommerce"
},
{
"type": 1,
"string": "event"
}
]
}
}
]
},
"clientAnnotations": {
"isEditedByUser": true
},
"isRequired": true
}
]
___TESTS___
scenarios:
- name: Throws when logging without init
code: |-
const mockData = {
"eventType": "view"
};
runCode(mockData);
assertApi('gtmOnFailure').wasCalled();
assertApi('gtmOnSuccess').wasNotCalled();
- name: Sends a Page View event
code: |-
givenScriptInitialized();
givenMockDataLayer({
"event": "gtm.dom",
"ecommerce": {}
});
const mockData = {
"eventType": "view"
};
runCode(mockData);
assertApi('gtmOnFailure').wasNotCalled();
assertApi('gtmOnSuccess').wasCalled();
assertEventWasSentWith("pageview");
- name: Adds Enhanced Commmerce Products with a Detail Page View event
code: "const product = {\n \"productName\": \"wow\" \n};\n\ngivenScriptInitialized();\n\
\ngivenMockDataLayer({\n \"event\": \"gtm.dom\",\n \"ecommerce\": {\n \t\"\
detail\": {\n \"products\": [product]\n }\n }\n});\n\nconst mockData\
\ = {\n \"eventType\": \"view\"\n};\n\nrunCode(mockData);\n\nassertApi('gtmOnFailure').wasNotCalled();\n\
assertApi('gtmOnSuccess').wasCalled();\nassertActionWasQueued([\"ec:setAction\"\
, \"detail\"]);\nassertActionWasQueued([\"ec:addProduct\", product]);\nassertEventWasSentWith(\"\
pageview\");"
- name: Allows sending a Page View without ecommerce in data layer
code: |-
givenScriptInitialized();
givenMockDataLayer({
"event": "gtm.dom",
});
const mockData = {
"eventType": "view"
};
runCode(mockData);
assertApi('gtmOnFailure').wasNotCalled();
assertApi('gtmOnSuccess').wasCalled();
assertEventWasSentWith("pageview");
- name: Propagates the ECommerce currencyCode to coveoua
code: "givenScriptInitialized();\ngivenMockDataLayer({\n \"event\": \"gtm.dom\"\
,\n \"ecommerce\": {\n \"currencyCode\": \"EUR\" \n }\n});\n\nconst mockData\
\ = {\n \"eventType\": \"view\"\n};\n\nrunCode(mockData);\n\nassertApi('gtmOnFailure').wasNotCalled();\n\
assertApi('gtmOnSuccess').wasCalled();\nassertActionWasQueued([\"set\", \"currencyCode\"\
, \"EUR\"]);\nassertEventWasSentWith(\"pageview\");"
- name: Adds Impressions with a addToCart event
code: "const product = {\n \"productName\": \"wow\" \n};\n\nconst impression =\
\ {\n \"productName\": \"impression\" \n};\n\ngivenScriptInitialized();\n\n\
givenMockDataLayer({\n \"event\": \"addToCart\",\n \"ecommerce\": {\n \t\"\
add\": {\n \"products\": [product]\n },\n \"impressions\": [impression]\n\
\ }\n});\n\nconst mockData = {\n \"eventType\": \"event\"\n};\n\nrunCode(mockData);\n\
\nassertApi('gtmOnFailure').wasNotCalled();\nassertApi('gtmOnSuccess').wasCalled();\n\
assertActionWasQueued([\"ec:setAction\", \"add\"]);\nassertActionWasQueued([\"\
ec:addProduct\", product]);\nassertActionWasQueued([\"ec:addImpression\", impression]);\n\
assertEventWasSentWith(\"event\");"
- name: Should allow sending a Custom Coveo impression event
code: "const product = {\n \"productName\": \"wow\" \n};\n\ngivenScriptInitialized();\n\
\ngivenMockDataLayer({\n \"event\": \"impression\",\n \"ecommerce\": {\n \t\
\"impression\": {\n \"impressions\": [product],\n \"actionField\": {\
\ \"list\": \"coveo:search:1234\" },\n }\n }\n});\n\nconst mockData = {\n\
\ \"eventType\": \"event\"\n};\n\nrunCode(mockData);\n\nassertApi('gtmOnFailure').wasNotCalled();\n\
assertApi('gtmOnSuccess').wasCalled();\nassertActionWasQueued([\"ec:setAction\"\
, \"impression\", { \"list\": \"coveo:search:1234\" }]);\nassertActionWasQueued([\"\
ec:addImpression\", product]);\nassertEventWasSentWith(\"event\");"
- name: Sends a Page View event with custom data