Skip to content

Commit

Permalink
bug fix - None != Undefined for segment Identify call (#89)
Browse files Browse the repository at this point in the history
* bug fix

* cleanup fix

---------

Co-authored-by: Sergio Castineyras <[email protected]>
  • Loading branch information
scastineyras and sercasti authored Nov 14, 2024
1 parent 6664cc1 commit 75b77a8
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@
analytics.group(entityid)
{% if user %}
if (window.location.pathname.endsWith("dashboard/")) {
var userplatformuuid = "{{ h.opendata_theme_platform_uuid() }}";
analytics.identify(userplatformuuid || '{{user.id}}', {name: '{{user.fullname}}', email: '{{user.email}}'});
var userId = "{{ h.opendata_theme_platform_uuid() }}";
if (!userId || userId === 'None' || userId.length <= 30) {
userId = '{{user.id}}';
}
analytics.identify(userId, {name: '{{user.fullname}}', email: '{{user.email}}'});
}
{% endif %}
}}();
Expand Down

0 comments on commit 75b77a8

Please sign in to comment.