Skip to content

Commit

Permalink
Fix the GTag script URL html rendering (#1666)
Browse files Browse the repository at this point in the history
  • Loading branch information
alextselegidis committed Feb 2, 2025
1 parent 32a0edb commit d4c75e7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
This file contains the code changes that were introduced into each release (starting from v1.1.0) so that is easy for
developers to maintain and readjust their custom modifications on the main project codebase.

## [Unreleased]

### Fixed

- Fix the GTag script URL html rendering (#1666)




## [1.5.1] - 2025-01-20

### Added
Expand Down
2 changes: 1 addition & 1 deletion application/views/components/google_analytics_script.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<?php endif; ?>

<?php if (substr($google_analytics_code ?? '', 0, 2) === 'G-'): ?>
<script async src="https://www.googletagmanager.com/gtag/js?id=' . $google_analytics_code . '"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=<?= e($google_analytics_code) ?>"></script>
<script>
window.dataLayer = window.dataLayer || [];

Expand Down

0 comments on commit d4c75e7

Please sign in to comment.