Open chalin opened 10 months ago
For a search-result click event, it would be better to use link_url
rather than value
to hold the search-result URL. Let me make that change first. Note that even with that change, I haven't been able to generate reports containing that URL, despite adding custom metrics. (Maybe it's just because custom reports don't have access to realtime data, so I'll try again tomorrow.)
Yesterday I defined some custom metrics (see below), but it seems that only restricted metric types are supported, excluding strings:
The custom metrics (set to type "standard") turn out to be interpreted as integers in reports:
Tasks
link_url
as parameter key instead ofvalue
; for details about click event parameters see [GA4] Analytics dimensions and metrics > Analytics dimensions > Links - #1571outbound
tofalse
while we're at it - #1571Context
_Originally posted by @harshit-gangal in https://github.com/vitessio/website/pull/1519#discussion_r1304687307_
The statement you are referring to (https://developers.google.com/tag-platform/devguides/events#gtag.js_1) concerns UA:
I'm not aware that this is a restriction for GA4. In fact, you can see the search-result URL from the realtime event reports page as the value of the
value
attribute. For this example, I searched for "install" and clicked on the "Local Install via Homebrew" search result:Also, by using the tagassistant, you can see that the search-result URL is available as
ep.value
of aclick
event:That being said, it will be difficult to use GA4 reports to view the URL. Let me investigate this further.