Page 1 of 1

Google analytics field UA code - GA v4 uses a G code

Posted: 30 Jul 2024, 09:59
by nampara17
Hi Karl,

The field of Google Analytics shows a UA- code. The current GA uses a code that starts "G"xxxx

In fact google have phased out the old UA code analytics and now 'strongly' recommend use the new v4 GA's

The embed code is different in UA code to the G code plus a few other changes.

Is the system (x3) able to deal with the new "G" coding structure for GA please

Re: Google analytics field UA code - GA v4 uses a G code

Posted: 30 Jul 2024, 23:22
by mjau-mjau
Yes it works fine with new tracking ID's. I have checked the latest Javascript code install instructions from Google, and it's the same as X3 is already using. You just need to insert your tracking ID, no matter how the code is formatted.

This is the code noted by Google and used internally by X3:
Code
<script async src="https://www.googletagmanager.com/gtag/js?id=TRACKINGID"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'TRACKINGID');
</script>
If it wasn't working (for any reason), you could just leave the "Google Analytics" input field empty, and instead just copy-paste the full Javascript, as instructed from your Google Analytics account, directly into X3 Settings > Custom > <head>.

Re: Google analytics field UA code - GA v4 uses a G code

Posted: 31 Jul 2024, 04:00
by nampara17
Thanks for confirming.