Closed jvendetti closed 1 year ago
GA v4 recommends to use gtag.js instead of analytics.js https://support.google.com/analytics/answer/10271001 We should update our ga tracking partial to use gtag.js:
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXXX');
</script>
where G-XXXXXXX is our analytics ID
I added newly generated GA v4 ID to our private config repo
The _ga_tracking partial currently refers to the analytics.js Google Analytics tag that will expire in roughly 28 days. We need to replace it with the newer gtag.js tag:
Relates to https://github.com/ncbo/bioportal-project/issues/248
As part of this work, we should start storing the analytics ID in encrypted credentials instead of the
bioportal_config_#{Rails.env}.rb
files.