GA4: 手动发送参数,如UA中的GeographicalOverride?

huangapple go评论61阅读模式
英文:

GA4: manually sending parameters UA has such as GeographicalOverride?

问题

Measurement Protocol (Google Analytics 4) reference 中没有关于像 Measurement Protocol (Universal Analytics) reference 中所提到的 GeographicalOverride 等参数的信息。

它们似乎被描述为“自动填充”,详见[GA4] Analytics dimensions and metrics

但是,我们希望能够从后端应用程序手动发送它们。

UA 参数在 GA4 中仍然作为事件参数工作吗?

我们尝试以与 UA 中相同的方式发送它们,并且它们在报告中显示,但仅以其原始 GET 关键字名称显示,而没有在报告地图和 Lookerstudio 过滤器下拉菜单中“解码”(关于 GeographicalOverride)。

特别是,我们发送了 Criteria ID,根据地理 ID

英文:

the Measurement Protocol (Google Analytics 4) reference does not have information about parameters such as GeographicalOverride present in the Measurement Protocol (Universal Analytics) reference.

They appear to be 'automatically populated' as described in [GA4] Analytics dimensions and metrics.

But we like to send them manually from a backend app.

Do the UA parameters still work as event parameters in GA4 ?

We tried to send them as such, named like in UA, and they are shown in reports but as their raw GET keyword name only and they didn't appear "decoded" (regarding GeographicalOverride) in report maps and Lookerstudio filter dropdowns such as 'region'.

GeographicalOverride in particular we send Criteria ID according to Geographical IDs

答案1

得分: 1

我喜欢提供信息,而不是按照GA4参考文档并使用测量协议,而是可以按照Google GA4 JS发送的网络流量来操作。

这样可以工作,我没有解密每个密钥,也不知道如何添加有关GA4自定义维度和自定义指标的信息,但是下面是:

https://region1.google-analytics.com/g/collect?

v: 2					// 可能是版本
tid: ...				// GOOGLE_MEASUREMENT_ID
gtm: ...				// 标签管理器ID?
_p: 940778691			// ?
gcs: G111				// 地理数据?
gdid: dMWZhNz			// 地理ID?
cid: ...				// 客户端ID?
ul: de					// 用户语言
sr: 1920x1080			// 屏幕分辨率
uaa: x86				// 用户代理体系结构
uab: 64					// 用户代理位数
uafvl: Chromium;110.0.5481.178|Not%20A(Brand;24.0.0.0|Microsoft%20Edge;110.0.1587.63	// 用户代理功能版本级别
uamb: 0					// 用户代理?
uam: 					// 用户代理?
uap: Windows			// 用户代理平台
uapv: 15.0.0			// 用户代理平台版本
uaw: 0					// 用户代理?
_s: 1					// ?
sid: 1678693522			// 会话ID
sct: 8					// ?
seg: 1					// ?
dl: ...					// 数据链接 = 页面URL
dt: ...					// 数据标题 = 页面标题
en: page_view			// 事件名称
_ee: 1					// ?

我尝试发送这样的GET请求,根据需要替换数据并省略未知数据,结果出现在GA4报告中,包含了先前缺失的数据,如屏幕分辨率。 (不幸的是,正如一开始所述,这对我来说不足以替代MP,因为我不知道如何发送自定义维度信息)。

我知道这不是问题的答案,但我认为有超过50%的可能性对您有帮助。根据https://developers.google.com/analytics/help?hl=en,Google希望StackOverflow目前的用法。

英文:

I like to inform instead of following the GA4 reference and using the Measurement Protocol one can follow the network traffic Googles GA4 JS sends.

That works, I didn't decipher every key and I don't know how to add information about GA4 custom dimensions and custom metrics, but here is:

https://region1.google-analytics.com/g/collect?

v: 2					// possibly version
tid: ...				// GOOGLE_MEASUREMENT_ID
gtm: ...				// a tag manager id ?
_p: 940778691			// ?
gcs: G111				// geo data ?
gdid: dMWZhNz			// a geo id ?
cid: ...				// client id ?
ul: de					// user language
sr: 1920x1080			// screen resolution
uaa: x86				// user agent architecture
uab: 64					// user agent bitness
uafvl: Chromium;110.0.5481.178|Not%20A(Brand;24.0.0.0|Microsoft%20Edge;110.0.1587.63	// user agent feature version level
uamb: 0					// user agent ?
uam: 					// user agent ?
uap: Windows			// user agent platform
uapv: 15.0.0			// user agent platform version
uaw: 0					// user agent ?
_s: 1					// ?
sid: 1678693522			// session id
sct: 8					// ?
seg: 1					// ?
dl: ...					// data link = page url
dt: ...					// data title = page title
en: page_view			// event name
_ee: 1					// ?

I tried sending such a GET request, replacing data as neccessary and omitting unknown data, and it appeared in GA4 reports containing data previously missing such as screen resolution. (Unfortuanetly, like stated at the beginning, this isn't sufficient for me to replace the MP due to no knowledege how to send custom dimension information).

I know this is not an answer to the question but I see a > 50% likelihood of it being helpful. Google likes StackOverflow to be used according to https://developers.google.com/analytics/help?hl=en as of now.

huangapple
  • 本文由 发表于 2023年3月3日 23:48:02
  • 转载请务必保留本文链接:https://go.coder-hub.com/75629193.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定