Skip to content

Commit

Permalink
nit: variable naming and removed escape js
Browse files Browse the repository at this point in the history
  • Loading branch information
ajeety4 committed May 7, 2024
1 parent b4e058d commit 5152a86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion corehq/apps/analytics/static/analytix/js/gtm.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ hqDefine('analytix/js/gtm', [
var userProperties = {
userId: _get('userId', 'none'),
isDimagi: _get('userIsDimagi', 'no', 'yes'),
isCommCare: _get('userIsCommCare', 'no', 'yes'),
isCommCare: _get('userIsCommCareUser', 'no', 'yes'),
domain: _get('domain', 'none'),
hqEnvironment: _get('hqInstance', 'none'),
};
Expand Down
4 changes: 2 additions & 2 deletions corehq/apps/analytics/templates/analytics/initial/gtm.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
{% if request.couch_user %}
{% initial_analytics_data 'gtm.userId' request.couch_user.userID %}
{% initial_analytics_data 'gtm.userIsDimagi' request.couch_user.is_dimagi %}
{% initial_analytics_data 'gtm.userIsCommCare' request.couch_user.is_commcare_user %}
{% initial_analytics_data 'gtm.userIsCommCareUser' request.couch_user.is_commcare_user %}
{% endif %}
{% if domain %}
{% initial_analytics_data 'gtm.domain' domain|escapejs %}
{% initial_analytics_data 'gtm.domain' domain %}
{% endif %}
{% if ANALYTICS_CONFIG.HQ_INSTANCE %}
{% initial_analytics_data 'gtm.hqInstance' ANALYTICS_CONFIG.HQ_INSTANCE %}
Expand Down

0 comments on commit 5152a86

Please sign in to comment.