hi
first of all - thanks for this tool and OSS contributions
Desctiption
today I've decided to use it for my project https://github.com/voiceapiai/ralertsinua, and when I configured analytics settings I found that google tag script injection is broken - script is inserted in the body as text

How to reproduce:
- remote: find broken script text visible at https://voiceapiai.github.io/ralertsinua/ at the very bottom of the screen
- local - add analytics configuration according to the docs, run oranda build, find broken injection in generated index.html - script is inserted in the body as text
Possible solution:
according to Google, this is the code one need to insert at the website (notice 2 script tags):
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-TCJ5D14XV4"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-TCJ5D14XV4');
</script>
but this line
|
format!("window.dataLayer = window.dataLayer || []; function gtag(){{dataLayer.push(arguments);}} gtag('js', new Date());gtag('config', '{}');", self.tracking_id) |
doesn't have HTML <script> tag, and thus the string is being inserted
directly in the body
if possible, I would like to contribute and help to solve this issue
hi
first of all - thanks for this tool and OSS contributions
Desctiption
today I've decided to use it for my project https://github.com/voiceapiai/ralertsinua, and when I configured analytics settings I found that google tag script injection is broken - script is inserted in the body as text
How to reproduce:
Possible solution:
according to Google, this is the code one need to insert at the website (notice 2 script tags):
but this line
oranda/src/site/layout/javascript/analytics.rs
Line 71 in fb97859
doesn't have HTML <script> tag, and thus the string is being inserted directly in the body
if possible, I would like to contribute and help to solve this issue