Skip to content

Commit

Permalink
Add analytics for dbt.com in addition to getdbt
Browse files Browse the repository at this point in the history
  • Loading branch information
b-per committed Jun 15, 2023
1 parent 2f9b8f9 commit 787844c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/app/services/tracking_service.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ angular
}

service.isHosted = function() {
return window.location.hostname.indexOf('.getdbt.com') > -1;
hostedgetdbt = window.location.hostname.indexOf('.getdbt.com') > -1;
hosteddbt = window.location.hostname.indexOf('.dbt.com') > -1;
return hostedgetdbt || hosteddbt;
}

service.turn_on_tracking = function() {
Expand All @@ -52,7 +54,12 @@ angular
}

if (service.isHosted()) {
trackerParams.cookieDomain = '.getdbt.com';
if (window.location.hostname.indexOf('.getdbt.com') > -1) {
trackerParams.cookieDomain = '.getdbt.com';
}
else {
trackerParams.cookieDomain = '.dbt.com';
}
}

service.snowplow = window.snowplow;
Expand Down

0 comments on commit 787844c

Please sign in to comment.