Skip to content

Commit

Permalink
Fix issue with domain is null error (#389)
Browse files Browse the repository at this point in the history
Co-authored-by: Tobias Reiss <[email protected]>
  • Loading branch information
lansami and basecode authored Oct 3, 2023
1 parent 611364a commit 1c3f85d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,10 @@ function getDomainInfo(hostname) {

function pushPageLoadToDataLayer() {
const { hostname } = window.location;
if (!hostname) {
return;
}

const { domain, domainPartsCount } = getDomainInfo(hostname);
const languageCountry = getLanguageCountryFromPath(window.location.pathname);
const environment = getEnvironment(hostname, languageCountry.country);
Expand Down

0 comments on commit 1c3f85d

Please sign in to comment.