In this section, we will cover the essential steps to set up goals and events in Google Analytics. Goals and events are critical for measuring specific user interactions on your website, such as form submissions, button clicks, and other key actions that contribute to your business objectives.
- Understanding Goals and Events
Goals
Goals in Google Analytics represent completed activities, called conversions, that contribute to the success of your business. Examples of goals include making a purchase (for an e-commerce site), completing a contact form, or signing up for a newsletter.
Events
Events are user interactions with content that can be tracked independently from a web page or a screen load. Downloads, mobile ad clicks, video plays, and button clicks are all examples of actions you might want to track as events.
- Setting Up Goals in Google Analytics
Step-by-Step Guide
-
Navigate to Admin Panel:
- Sign in to your Google Analytics account.
- Select the desired account and property.
- In the "View" column, click on "Goals."
-
Create a New Goal:
- Click the "+ New Goal" button.
- You can choose from a template or create a custom goal. For this example, we'll create a custom goal.
-
Configure Goal Setup:
- Select "Custom" and click "Continue."
-
Describe Your Goal:
- Enter a name for your goal (e.g., "Contact Form Submission").
- Select the goal type. The most common types are:
- Destination: A specific location loads (e.g., thank you page).
- Duration: Sessions that last a specific amount of time or longer.
- Pages/Screens per session: A user views a specific number of pages or screens.
- Event: An action defined as an event is triggered.
-
Set Goal Details:
- Depending on the goal type selected, configure the necessary details. For a "Destination" goal:
- Enter the destination URL (e.g.,
/thank-you
). - Optionally, you can assign a monetary value to the goal.
- Click "Save" to create the goal.
- Enter the destination URL (e.g.,
- Depending on the goal type selected, configure the necessary details. For a "Destination" goal:
Example: Setting Up a Destination Goal
Goal Name: Contact Form Submission Goal Type: Destination Destination: /thank-you Value: $10 (optional)
- Setting Up Events in Google Analytics
Step-by-Step Guide
-
Navigate to Admin Panel:
- Sign in to your Google Analytics account.
- Select the desired account and property.
-
Create a New Event:
- Events are typically set up using Google Tag Manager (GTM). Ensure GTM is installed on your website.
-
Configure GTM for Event Tracking:
- Open Google Tag Manager.
- Click on "Tags" and then "New."
- Choose "Tag Configuration" and select "Google Analytics: Universal Analytics."
- Set the "Track Type" to "Event."
-
Define Event Parameters:
- Category: General category for the event (e.g., "Form").
- Action: Specific action (e.g., "Submit").
- Label: Additional information (e.g., "Contact Form").
- Value: Numerical value (optional).
-
Set Up Trigger:
- Click on "Triggering" and choose the trigger that will fire the event (e.g., form submission trigger).
- Save the tag and publish the container.
Example: Setting Up an Event for Form Submission
Example Code Snippet for Event Tracking
// Example of event tracking code using JavaScript document.getElementById('contact-form').addEventListener('submit', function() { ga('send', 'event', 'Form', 'Submit', 'Contact Form'); });
- Practical Exercise
Exercise: Setting Up a Goal and Event
-
Goal Setup:
- Create a goal in Google Analytics for a "Contact Form Submission" with a destination URL of
/thank-you
.
- Create a goal in Google Analytics for a "Contact Form Submission" with a destination URL of
-
Event Setup:
- Use Google Tag Manager to create an event that tracks when a user submits the contact form. Set the category to "Form," the action to "Submit," and the label to "Contact Form."
Solution
-
Goal Setup:
- Navigate to Admin > Goals > + New Goal.
- Select "Custom" > Continue.
- Name: "Contact Form Submission."
- Type: "Destination."
- Destination:
/thank-you
. - Save the goal.
-
Event Setup:
- Open Google Tag Manager > Tags > New.
- Tag Configuration: "Google Analytics: Universal Analytics."
- Track Type: "Event."
- Category: "Form."
- Action: "Submit."
- Label: "Contact Form."
- Trigger: Form submission trigger.
- Save and publish the container.
Conclusion
Setting up goals and events in Google Analytics is crucial for tracking user interactions and measuring the success of your website. By following the steps outlined in this section, you can effectively monitor key actions and optimize your digital strategy based on actionable insights. In the next module, we will delve into the various metrics and KPIs essential for evaluating digital performance.