英文:
register and view events with action in GA4
问题
我在我的网站上有一个搜索文本框,当用户停止输入时,我会注册一个事件(搜索,文本值),
在Universal Analytics中,我是这样调用的:
ga('send', 'event', 'search', txtValue)
在GA4中,我尝试这样做:
gtag('event', 'search', { action: txtValue });
事件被注册了,但在GA4的报告中,我找不到如何查看已注册事件的动作表,类似于这样:
(event = 'search')
action | count
txt val 1 | 32
txt val 2 | 5
txt val 3 | 1
在UA中,我只需转到“事件” -> 单击“搜索”事件 -> 并选择第二维度的“动作”,
现在我如何获得这个报告?
或者我应该以其他方式注册事件?
英文:
I have a search textbox in my site and when a user stops typing I register an event (search, txt value),
in Universal Analytics I was calling it like this:
ga('send', 'event', 'search', txtValue)
in GA4 I tried doing this:
gtag('event', 'search', { action: txtValue });
and the event gets registered, but nowhere in the GA4 reporting can I find how to see the registered events with action table, something like this:
(event = 'search')
action | count
txt val 1 | 32
txt val 2 | 5
txt val 3 | 1
in UA I wold just go to Events
-> click on 'search' event -> and select 'action' for 2nd dimension,
how do I get this report now ?
or should I register the event in some other way ?
答案1
得分: 1
你需要为事件参数创建自定义维度,以便使其可用。与GA UA类似:
管理 -> 自定义定义 -> 创建自定义维度
现在,只需为您的 action
属性创建一个CD。
好的,现在转到探索而不是报告。报告现在几乎没有用了。
在探索中,创建一个新的探索,将您的新的 action
自定义维度添加为维度。还将事件名称添加为维度。添加一些像 sessions
的指标。
现在,将您添加的项目拖放到 选项卡设置
列中,您应该能够访问您的数据了。这是一个笨拙的界面,但它有效。您也可以在那里添加一个过滤器,以仅包括搜索事件,以防您想在其他事件中重用该事件属性。
请注意!Google现在对您的维度引入了全新且闪亮的基数限制。因此,如果在自定义维度中获得了超过500个唯一的搜索值,那么请阅读此链接:https://support.google.com/analytics/answer/12226705?hl=en
UA太好了,以至于免费不可能。他们在GA4中“修复”了它
英文:
Well, you need to make custom dimensions for your event parameters to become available. Similarly to GA UA:
Admin -> Custom Definitions -> Create custom dimension
Now just make a CD for your action
property.
Good, now go to the Explore NOT Reports. Reports are now pretty much useless.
In Explore, make a new exploration, add your new action
custom dimension there as a dimension. Also add the event name as a dimension. Add something like sessions
as a metric.
Now drag and drop the items you've added into the tab setting
column and you should be able to access your data now. It's a clumsy interface for sure, but it works. You can as well add a filter there to only include the search events in case you want to reuse that event property in other events.
Note! that google has now introduced this all new and shiny cardinality limitation on your dimensions. So if you get over 500 unique search values in that custom dimensions, well, read this: https://support.google.com/analytics/answer/12226705?hl=en
UA was too good to be free. They "fixed" it in GA4
答案2
得分: 0
1- 打开您的GA4属性,导航到左侧菜单中的“分析”。
2- 点击“自定义报告”,然后点击“+ 新建自定义报告”按钮。
3- 给您的报告取一个名称,并选择“表格”作为格式。
4- 在“探索”部分,点击“添加维度”并搜索您用于搜索文本值的参数(在本例中为“search_query”)。
5- 添加您想要包含在报告中的任何额外维度或指标。
6- 保存报告。
这就可以了。
请记住,GA4和UA具有不同的数据模型和结构,因此在从UA迁移到GA4时,您可能需要调整您的报告方法。GA4中的自定义报告提供了很大的灵活性,允许您根据新的数据模型构建最适合您需求的报告。
英文:
1-Open your GA4 property and navigate to "Analysis" in the left-hand menu.
2-Click on "Custom Reports" and then click the "+ NEW CUSTOM REPORT" button.
3-Give your report a name and choose "Table" as the format.
4-In the "Explore" section, click on "Add dimension" and search for the parameter you used for the search text value (in this case, "search_query").
5- Add any additional dimensions or metrics you want to include in the report.
6- Save the report.
This should do it
Keep in mind that GA4 and UA have different data models and structures, so you might need to adapt your reporting approach when transitioning from UA to GA4. Custom reports in GA4 offer a lot of flexibility, allowing you to build the reports that best suit your needs based on the new data model.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论