XF 2.2 Add Google Analytics 4

polle

Active member
How to add the new Google Analytics 4 code?

When trying the new format this pops up:

Code:
Please enter your Google Analytics web property ID / UA number in the format UA-XXXXXX-Y.

Thanks.
 
google analytics has changed now. new codes G-........ that's how it happened. I entered the new code yesterday but still not getting the data? Was it a problem? Or did I do something wrong?
 
It does not work when I put the code I get this error:

Oops! We ran into some problems.
Oops! We ran into some problems. Please try again later. More error details may be in the browser console.

I'm replying to a very old comment, and most people probably have GA4 figured out by now, but in case it helps someone...

The error above is due to xenForo's template not being happy with the syntax of the following comment in the GA code.

Code:
<!-- Global site tag (gtag.js) - Google Analytics -->

You can either delete the comment or wrap it in a xenForo comment:

Code:
<xf:comment> Google comment goes here. </xf:comment>
 
Top Bottom