Skip to content

Commit

Permalink
Stack event
Browse files Browse the repository at this point in the history
  • Loading branch information
akariv committed Apr 4, 2024
1 parent ee145b9 commit a46d242
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ui/projects/businessgate/src/app/state.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@ export class StateService {

addState(kind, x) {
if (!this.inState(this._current, kind, x)) {
if (window['gtag']) {
window['gtag']('event', 'nav', {
'event_category': kind,
'event_label': x
if (window['gtag'] && kind === 'stack') {
window['gtag']('event', 'stack', {
'stack_name': x
});
}
return [...this._current.filter((i) => i.indexOf(kind + ':') !== 0), kind + ':' + x].join('|');
Expand Down

0 comments on commit a46d242

Please sign in to comment.