Use the Google Analytics code generator below:

Select the type of tracking you’re planning to use.

Category: Depending on your site, you might want to group it by UI elements. One example is: “video”. Action: This is the second drill-down level. Name it after the action that the visitor performed on your website. If your category is “video”, you could use “download” or “watched”. (Optional) Label: This is the last drill-down level. Use specific information on the action that was performed. If your action is “watched” use the name of the video as the label. (Optional) Value: If you want the event to have a numeric value associated with it, enter it here. Count as bounce if this event occurs? If a user visits your website and only views one page but this event happens, should it be treated as a bounce?

Here are your results

Copy this code and implement on your site: Here’s what that implementation might look like:

Implementing the tracking code on your website

The code generated with this tool is specific for tracking clicks on your website.

To implement it, you need to add the tracking code to the HTML element people are supposed to click to complete the action.

For example, let’s say you want to track how many people click on a link on your homepage that points to the pricing page. The code for that on your page might look something like this:

Once you add your tracking code to that link, the HTML code might look something like this:

Configuring your events as goals in Google Analytics

Log into your Google Analytics and click “Admin” in the sidebar. 

Select the correct Google Analytics Account, Property, and View. Then, click “Goals” under the “View” column.

Click “New Goal.”

Select a custom goal and name your Goal. Use something short and intuitive, it should be obvious for you or anyone what it is about since this name will appear on your reports.

Select your preferred Goal ID and Goal Set slot (if you don’t have any Goals yet, leave the default option). Select “Event”, and click “Continue.”

Enter the same values for the “Category”, “Action”, and “Label” that you added on the tool above, and make sure all dropdowns are set to “Equal to.” Leave “Value” blank.  

Finally, click “Save” and you should see the Goal you have just created, make sure the “Recording” toggle is set to “On.”

Testing your Google Analytics Goals

First, install the Google Tag Assistant extension on your Google Chrome browser. 

Open your website using Chrome, click on the Google Tag Assistant icon extension and click “Record.”

Click on the element that’s supposed to trigger your goal. 

Click on the Google Tag Assistant Chrome extension again and click “Stop Recording” and then click “Show Full Report.”

Select “Google Analytics Report.”

Select the view that you want to test and click “Ok.”

Scroll down until you find the “Conversions” section, you should be able to see the name of your Goal, your Conversion Value, and a green tick after it. 

That’s it! You’ve correctly set up your click event as a Google Analytics goal.

Share
Tweet
Share