File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed
app/code/Magento/PageBuilder/view/adminhtml/web/js/page-builder Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,8 @@ define([], function () {
7
7
'use strict' ;
8
8
9
9
return function ( target ) {
10
- var originalTarget = target . trigger ;
10
+ var originalTarget = target . trigger ,
11
+ event ;
11
12
12
13
/**
13
14
* Invokes custom code to track information regarding Page Builder usage
@@ -30,6 +31,28 @@ define([], function () {
30
31
} ;
31
32
window . _satellite . track ( 'page' ) ;
32
33
}
34
+
35
+ if ( args . contentType !== undefined && typeof args . contentType !== undefined &&
36
+ args . contentType . config !== undefined && typeof args . contentType . config !== undefined ) {
37
+
38
+ event = {
39
+ element : args . contentType . config . label ,
40
+ type : args . contentType . config . name ,
41
+ action : "custom-action" ,
42
+ widget : {
43
+ name : args . contentType . config . form ,
44
+ type : args . contentType . config . menu_section
45
+ } ,
46
+ feature : "page-builder-tracker"
47
+ } ;
48
+
49
+ console . log ( "EVENT:" , event ) ;
50
+
51
+ if ( window . digitalData !== undefined && typeof window . digitalData !== 'undefined' ) {
52
+ window . digitalData . events . push ( event ) ;
53
+ window . _satellite . track ( 'event' ) ;
54
+ }
55
+ }
33
56
} ;
34
57
35
58
return target ;
You can’t perform that action at this time.
0 commit comments