有办法编辑“原生”Google Analytics 4维度吗?

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

Is there a way to edit a "native" Google Analytics 4 dimension?

问题

我想在GA4中编辑着陆页尺寸,只显示页面路径的前两部分(例如"/first/second/third/fourth",我只想显示"/first/second"),而不是整个路径加查询字符串 - 有没有办法编辑这个维度,以便在GA4界面中显示不同?

或者,有没有办法可以使用着陆页尺寸的URL参数来创建另一个维度(以避免更改原始着陆页尺寸),并缩短URL?

我之所以这样做是因为我的网站上页面路径的基数很高,我想将着陆页分组,以便着陆页尺寸的基数较小。

英文:

I want to edit the Landing page dimension in GA4 to only show the first two parts of the page path (for example "/first/second/third/fourth", I only want to show "/first/second") instead of the whole path + query string - is there a way to edit this dimension so that it's displayed differently in GA4 interface?

Or, is there a way that I can use the url parameter from the Landing page dimension to create another dimension (to avoid changing the original Landing page dimension) with shortened url?

The reason why I want to do this is that the page path dimension is very high in cardinality on my website and I want to group the landing pages so that I have less cardinality in the Landing page dimension.

答案1

得分: 1

是的,您可以覆盖默认的着陆页维度,也可以将URL放在不同的维度中。

有两个原生维度,dl(文档位置)和dp(文档页面)。您可以这样覆盖它们:

有办法编辑“原生”Google Analytics 4维度吗?

使用page_location和page_page。协议和GTM UI中维度名称的不一致是由于GA4业务进展得太快。通常,我们只从页面维度中删除查询参数以降低基数。但您可能想要切断更多。

如果您直接使用gtag.js来跟踪事物,仍然可以这样做。通过使用gtag configure调用设置这些维度。

使用类似的方法,但是为事件属性使用不同的名称,您可以设置用于此跟踪的自定义属性。

如果您在这里设置自定义属性,您需要在GA4 UI中创建相应的自定义维度才能使它们可用。

英文:

Yes, you can override the default landing page dimension and yes, you can put the url in a different dimension.

There are two native dimensions, dl (document location) and dp (document page). You can override them like so:

有办法编辑“原生”Google Analytics 4维度吗?

Using page_location and page_page. The inconsistencies in dimension names in the protocol and in the GTM UI are due to how rushed all this ga4 business is. We normally just drop the query params from the page dimension to reduce cardinality. But you may want to cut off more than that.

You still can do that if you use gtag.js directly to track things. By setting those dimensions with the gtag configure call.

Using similar approach, but different names for event properties, you can set up custom properties for this tracking.

If you're setting custom properties here though, you would need to make corresponding custom dimensions in GA4 UI for them to become available.

huangapple
  • 本文由 发表于 2023年3月9日 21:32:05
  • 转载请务必保留本文链接:https://go.coder-hub.com/75685303.html
匿名

发表评论

匿名网友

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

确定