Skip to content

Commit

Permalink
gtm send event: lint and minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ajeety4 committed May 3, 2024
1 parent 64653cc commit cc539ca
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions corehq/apps/analytics/static/analytix/js/gtm.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ hqDefine('analytix/js/gtm', [
var data = {
event: eventName,
};
if (eventData){
if (eventData) {
_.extend(data, eventData);
}
window.dataLayer.push(data);
_logger.verbose.log(eventName, ['window.dataLayer.push']);
_logger.verbose.log(eventName, 'window.dataLayer.push');
}).fail(function () {
callbackFn();
if (_.isFunction(callbackFn)) {
callbackFn();
}
});
};

Expand Down

0 comments on commit cc539ca

Please sign in to comment.