According to the Google gtag.js guide , it looks like we can define custom parameters. However, when using code examples, only the Action action is populated. The event label is recorded in Google Analytics as "(not set)" and the "Event" category is "general."
Sample code from developers.google.com:
gtag('event', 'video_play', {
'video_title': 'My promotional video',
'duration': '01:32'
});
It’s also interesting to note that I can’t figure out how to show custom parameters, because the columns in Google Analytics seem to be statically set to “Event Category”, “Event Action” and “Event Label”. They correspond to the default keys "event_category", "event_action" and "event_label". Using these keys sends values correctly. The following code works:
gtag('event', 'redirect', {
'event_category': 'Announcements',
'event_label': '/announcements/index.jsp',
Has anyone received user-defined options for working, or is this function not yet implemented in gtag.js? Is an additional configuration that I might have missed required?
source
share