Answer the question
In order to leave comments, you need to log in
Which gtag.js event tracking code is correct?
What is the correct code for tracking the goal-event in Google Analytics for gtag.js?
1. gtag('event', 'Custom event name', { 'event_category': 'bbb', 'event_action': 'aaa' });
or
2. gtag('event', 'aaa', {'event_category': 'bbb'});
Answer the question
In order to leave comments, you need to log in
Correct as it says in the manual:
gtag('event', <action>, {
'event_category': <category>,
'event_label': <label>,
'value': <value>
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question