Tracking button events – Google Analytics

11.02.2019

If your landing page has already a global website tag (gtag) implemented as instructed, you can also track other events in the GA, such as clicking a button.

Not know how a properly defined gtag code for tracking events should look like and what parameters make events up? Check current guidelines in the Google Analytics help center and information about the events.

How to track in GA an OnCLick event on the landing page?

1. Prepare the gtag code for measuring events – you can use the example given below or build your own one according to the syntax recommended by Google Analytics.

gtag('event', 'aaa', {
  'event_category' : 'bbb',
  'event_label' : 'ccc'
});

The inclusion of the event category and action is mandatory. Optionally, you can add a label and the value.

2. Log in to the Landingi account and go to the edition of the selected landing page.

3. Select the button on which you want to track events and enter its settings (1). Go to the Settings tab (2). In the OnClick event field, paste the prepared gtag. Save and close the window (3), and then publish your landig page again.

button_onclick-event

To check GA reports with events, log into your Google Analytics account and go to Behavior -> Events -> Overview.

Remember that events can be visible in Google Analytics reports with up to 24 hours delay.

Was this article helpful?

Can’t find what you need?

Let us help you!
Send us a message
We are using cookies for analytical purpose. Learn more.