Skip to content

Commit

Permalink
Don't render matomo tag manager on no url
Browse files Browse the repository at this point in the history
1. If the config url is not set, we don't want to render the tag manager.
2. So, lets just add a check and return null. This could be the case that
    an env variable isn't set or that the env variable is set to empty.
  • Loading branch information
aburke07 committed Jul 5, 2023
1 parent 22d5fd9 commit ddcb10f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions frontend/templates/troubleshooting/components/TagManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ function MatomoScript() {
}
})();

if (!configUrl) {
return null;
}

const scriptTag = `
var c = "${configUrl}";
Expand Down

0 comments on commit ddcb10f

Please sign in to comment.