Skip to content

Commit

Permalink
fix gtag (#1343)
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelsousa-bjss committed Jun 24, 2024
1 parent 5113d86 commit ac19b21
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class AppComponent {
) {
this.router.events.pipe(filter((e): e is NavigationEnd => e instanceof NavigationEnd)).subscribe(e => {
if (this.environmentStore.ENV.ENABLE_ANALYTICS) {
(typeof gtag === 'function') &&
typeof gtag === 'function' &&
gtag('config', this.environmentStore.ENV.TAG_MEASUREMENT_ID, {
page_path: e.urlAfterRedirects
});
Expand Down
2 changes: 1 addition & 1 deletion src/assets/js/analytics.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

const tagMeasurementId = window.__env.TAG_MEASUREMENT_ID;
const gtmId = window.__env.GTM_ID;
const enableAnalytics = window.__env.ENABLE_ANALYTICS === "true";
const enableAnalytics = window.__env.ENABLE_ANALYTICS === true;

(function () {

Expand Down

0 comments on commit ac19b21

Please sign in to comment.