google / co-op-4-all

Apache License 2.0
8 stars 5 forks source link

Coop event parameters do not match with the wiki #75

Open nicddominguez opened 1 week ago

nicddominguez commented 1 week ago

The wiki states that 3 custom event params should be sent in all events whenever possible (coop_campaign, coop_gclid, coop_dclid) but in the coop queries other event params are used for filtering (campaign, gclid, dclid).

This leads me to two questions:

  1. which is better to use for the filter? the event params with or without the ‘coop’ prefix?
  2. are campaign, gclid and dclid automatically collected by all events, or do they still have to be sent in the tagging?
anaesqueda commented 1 week ago

Hi nicddominguez,

  1. If you are implementing the 3 custom event parameters, it would be better to filter with the ‘coop’ prefix. The reason why you can implement custom parameters is because the gclid, dclid and campaign are not populated consistently in GA4. The custom parameters will guarantee to have values for those variables. We need to investigate when these values were changed in the query since there was a PR fixing this (and the history doesn't show it): https://github.com/google/co-op-4-all/commit/32e174a0cec489e5ba53b548fe4ed3db12bf5ea1
  2. They will be automatically collected if you have auto-tagging enabled, but as I mentioned, GA4 was not consistenly collecting those values.

Hope this helps, thanks!

anaesqueda commented 1 week ago

Hi nicddominguez,

I talked with the team and there have been some updates in GA4, which would make the params without the ‘coop’ prefix more reliable and that's why the code now references those instead of the custom params. More details will be shared soon in this thread.

Thanks

ezkap commented 1 week ago

Hi nicddominguez, The filtering difference that you mention is due to a new feature mid-last-year that include collected_traffic_source field in the BQ Export and Coop4All natively incorporated and it is taking advantage now. The “collected” data includes event-level traffic source data that is captured at collection based on UTMs. This means that now it will not be necessary to manage any variable in GTM dismissing that configuration part. Thank you for bringing it to our attention and since the wiki's section: "Google Tag Manager (GTM) Configuration" should be considered deprecated, It will be removed soon.