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.