thegrumpys / odop

Open Design Optimization Platform (ODOP) - Coil spring design app; mechanical springs; compression spring, extension spring, torsion spring
https://www.springdesignsoftware.org
MIT License
4 stars 5 forks source link

Gtag changes associated with GA4 #849

Closed grumpyinca closed 1 year ago

grumpyinca commented 1 year ago

The transition from Google Analytics older "Universal Analytics" to the newer "GA4" has introduced a new recommended approach to Gtag creation. In an Aug 23 email message, Pat writes:

The new GA4 property is connected to the old Universal Analytics tag (and that has been working properly on springdesignsoftware.org), but I think that we should instead try replacing the Universal Analytics tracking code with the actual GA4 tracking code below in all uses to try to fix this cross-domain tracking issue:

<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-PJ64GHQX6P"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'G-PJ64GHQX6P');
</script> 

Note that some changes in #840 impacted Gtag code.

1fifoto commented 1 year ago

Merged into master. closing