- Tags:: [[Data Analysis]]
- Last update:: [[2024-08-27]]
# Configuration settings, shared event settings , user properties, in Google Tag, in GA4 Event Tags *y la madre que los parió a todos*
It's been quite a long time since I've had to work with such a mess. Not only there are a hundred of very similar looking "knobs", the official documentation does a horrible job at highlighting their differences.
Also, despite its difficulty (or thanks to it) somehow this field attracts a lot of people who have no f\*cking idea on how this works but feel the urge to write, and the Internet is polluted with empty or pure non-sensical advice. Not even ChatGPT is able to give you the right answer for this basic stuff (if you manage to do so, please share the conversation with me: I tried very hard).
## Google Tag parameters and GA4 Event Tag parameters
First, the Google Tag. All parameters you set in the Google Tag (shared event settings or user parameters, doesn't matter) are inherited by the G4 Event tags.
> GA4 Event tags inherit the parameters of the Google tag. ([[GA4] Configure Google Analytics 4 in Google Tag Manager - Tag Manager Help](https://support.google.com/tagmanager/answer/9442095?hl=en&ref_topic=6333310&sjid=13517238778386585865-EU#zippy=%2Cin-google-ads%2Cin-google-analytics%2Cin-campaign-manager%2Cin-google-tag-manager%2Chow-the-google-tag-works-with-ga%2Cabout-parameters%2Cshare-parameters-across-tags))
The mechanism by which this is inherited is simply using the same Measurement ID. I couldn't find official docs on this, so the closest is [[Simo Ahava]]:
>As before, **custom event parameters** you add will be included in any events that fire after this Google Tag, as long as these event tags reference the Measurement ID loaded by the Google Tag. ([The Google Tag Template In Google Tag Manager | Simo Ahava's blog](https://www.simoahava.com/analytics/google-tag-template-in-google-tag-manager/))
All of them are fixed from the moment the Google Tag loads...
> **Parameters set by the Google tag remain static for all events occurring on a page. The parameters are refreshed only when the Google tag fires again, typically the next time the page is loaded.** ([[GA4] Configure Google Analytics 4 in Google Tag Manager - Tag Manager Help](https://support.google.com/tagmanager/answer/9442095?hl=en&ref_topic=6333310&sjid=13517238778386585865-EU#zippy=%2Cin-google-ads%2Cin-google-analytics%2Cin-campaign-manager%2Cin-google-tag-manager%2Chow-the-google-tag-works-with-ga%2Cabout-parameters%2Cshare-parameters-across-tags))
**...so we shouldn't use them for things to be refreshed per event (or with SPAs)**
> Also as before, the values configured in the Google Tag will be **fixed** to the values when the Google Tag last fired. It’s thus **not** the right place to add any dynamic values such as hit timestamps or anything else where the value might change from one event to the next! ([The Google Tag Template In Google Tag Manager | Simo Ahava's blog](https://www.simoahava.com/analytics/google-tag-template-in-google-tag-manager/))
## Difference between event parameters and user properties in a GA4 Event Tag
Apart from appearing in different places in the BigQuery export (event_params and user_properties columns respectively), and GA4 UI differences (which I don't use: I mostly use GTM/GA4 as a [[CDPs]]), **the main difference is that event parameters variable values are updated whenever the event is fired,** whereas user parameters are a bit weirder. The most reliable source I found for this? [A comment](https://www.simoahava.com/analytics/google-tag-template-in-google-tag-manager/#commento-e816b05028c274e692c259c020793f270ef73f33bb9d9f90e205bc95bb07e420)) from [[Simo Ahava]] :
> User properties are sent just once per page per property per value. So if the user property value doesn't change, it's sent with just the first request on the page. If it's value changes, it's sent again with the changed value but not again after that.
>
> So even if you add user properties in an event settings variable and attach it to your event(s), if the property has already been sent in a request on that page load, it won't get sent again.
>
> (...)
>
> If you want the values to be sent with each hit then you need to use event parameters instead
# Hiearchical attribution
[[GA4] Scopes of traffic-source dimensions - Analytics Help](https://support.google.com/analytics/answer/11080067?hl=en#zippy=%2Cin-this-article)
## Server side tagging
The ability to make the tag requests to a server that you control and do whatever you want with that (e.g., stream an event directly to BQ at that moment).
![[Pasted image 20230720075752.png]]
# Most dangerous configs
- Cross-domain tracking, particularly:
- If there are no links between them: .es vs. .com.
- If login is involved.
- Multiple containers sending traffic to the same GA property (particularly if the config is different, e.g., with a cookie prefix).
- Server-side events (since you have to properly pass the user_pseudo_id and session_id).