File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
app/code/Magento/PageBuilderAdminAnalytics/view/adminhtml/web/js/page-builder Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -32,23 +32,21 @@ define(['underscore'], function (_underscore) {
32
32
window . _satellite . track ( 'page' ) ;
33
33
}
34
34
35
- if ( args . contentType !== undefined && typeof args . contentType !== undefined &&
36
- args . contentType . config !== undefined && typeof args . contentType . config !== undefined ) {
37
-
35
+ if ( ! _underscore . isUndefined ( args . contentType ) && ! _underscore . isUndefined ( args . contentType . config ) ) {
38
36
event = {
39
37
element : args . contentType . config . label ,
40
38
type : args . contentType . config . name ,
41
- action : " custom-action" ,
39
+ action : ' custom-action' ,
42
40
widget : {
43
41
name : args . contentType . config . form ,
44
42
type : args . contentType . config . menu_section
45
43
} ,
46
- feature : " page-builder-tracker"
44
+ feature : ' page-builder-tracker'
47
45
} ;
48
46
49
- console . log ( " EVENT:" , event ) ;
47
+ console . log ( ' EVENT:' , event ) ;
50
48
51
- if ( window . digitalData !== undefined && typeof window . digitalData !== 'undefined' ) {
49
+ if ( isAdminAnalyticsEnabled ) {
52
50
window . digitalData . events . push ( event ) ;
53
51
window . _satellite . track ( 'event' ) ;
54
52
}
You can’t perform that action at this time.
0 commit comments