chrisblakley / Nebula

Nebula is a WordPress theme framework that focuses on enhancing development. The core features of Nebula make it a powerful tool for designing, developing, and analyzing WordPress websites consistently, yet its deliberately uncomplicated code syntax also serves as a learning resource for programmers themselves.
https://nebula.gearside.com
GNU General Public License v3.0
144 stars 36 forks source link

Consider indicating the GA4 Property ID somehow #2265

Closed chrisblakley closed 1 year ago

chrisblakley commented 1 year ago

Either in the console, the source code, an HTTP header, or otherwise since we can't simply search for a GA4 property via the Measurement ID (Ex: G-1234567) Nebula could output the Property ID (Ex: 2468013) to make it easier to identify which property the data is being sent to. This property ID is still not shown even with the GA Debugger extension so it could be super useful.

My first thought would be to output it in the console or the source code (a comment above the <script> tag perhaps). There is no issue with it being public-facing, but I just want to avoid cluttering things up. I don't think an HTTP header would be suitable or memorable to find quickly.

We'll start with the source code and if that isn't easy enough to find quickly when needed I'll add it to the console as well.

chrisblakley commented 1 year ago

Added to the source code to the existing HTML comment for now <!-- Nebula GA4 2468013 --> and <!-- Nebula GTM 2468013 -->

Even if using Google Tag Manager to implement GA4, I will recommend adding the Property ID to Nebula Options. It does not do anything other than output here in the HTML and provides a reference in the WP Admin Dashboard– no actual functionality is tied to it.