Google Analytics can be an incredibly powerful tool, so let’s go over adding custom event scripts to your website. These can be used to track a wide variety of events, such as a user starting a video, downloading a pdf, or simply clicking a button. After the event tracking code is implemented, you will be able to see these events as part of your Google Analytics reports and get a better understanding of user activity on your website.
|1||ga(‘send’, ‘event’, ‘Video’, ‘play’, ‘Fall Campaign’);|
If you’re using the siteOrigin widgets plugin, it’s easy to create a button widget, then set this tracking code to run Onclick in the “Other attributes and SEO” pane. Now let’s take a closer look at the parameters.
The parameters have been defined by Google and are as follows:
[table id=1 /]
Now let’s see how labeling your data can give you a better understanding of how your website is being used.
Customizing your Data
Let’s break down these parameters:
‘send’ and ‘event’
These are required parameters, defining the action and type of action being committed.
This parameter defines the type of object that was interacted with. This could be anything from ‘Video’ to ‘Button’ to ‘Sloth GIF’.
This parameter describes the type of action that occurred, such as ‘play’ or ‘click’.
This parameter is how you categorize various segments of these events, such as ‘Fall Campaign’ or ‘Snowboarding Equipment’.
Google Analytics Reports
As users start triggering your events, you’ll be able to see this data in your Google Analytics reports. Go to the “Behavior” tab, then expand “Events” and click on “Overview”. This view shows you all events, including your new custom events; you can filter by category, action, or label.
That’s all it takes! With a little time spent on setup and labeling, you can customize your website to provide up-to-date information about user visit patterns, analyze goal progress and oversee campaign conversion rates.