How to Track Clicks in Google Tag Manager and Google Analytics with Shack Analytics

Documentation for Joomla 3

Once you connected your Shack Analytics Joomla extension to Google Tag Manager and Google Analytics, you can start tracking how users engage with your Joomla site.

In this document, you will learn how to track clicks on a button. For this demonstration, I selected a button of a form created with Shack Forms Joomla extension.

This is a three-step process.

  1. Create a tracking tag in Google Tag Manager
  2. Test the tracking tag
  3. Submit the tracking tag

Let's take a look at this process in more detail.


Step #1. Create a tracking tag in Google Tag Manager

  • Log into your Google Tag Manager and your Google Analytics console.
  • Click "New Tag":

click new tag

  • Enter a title for your tracking tag and click anywhere on the "Tag Configuration" panel:

create title click on the tag configuration panel

  • You will see the "Choose tag type" panel on the right side of the screen. Click "Google Analytics: Universal Analytics":

click google analytics

This will bring up the "Tag Configuration" and "Triggering" panels.

  • In the "Track Type" field, select "Event".
  • Enter something meaningful in the "Category" field. For this demonstration, I entered "Clicks".
  • Enter something meaningful in the "Action" field. For my demonstration, I entered "Ask a question":

track type category and action

  • Scroll slightly down the panel and tick the "Enable overriding settings in this tag" checkbox. Enter your Google Analytics Tracking ID into the "Tracking ID" field:

tick the checkbox copy ga tracking id

  • Click anywhere on the "Triggering" panel:

click on the triggering panel

  • In the top right corner of the next screen, click the the "+" icon:

click the plus icon

  • On the next panel, enter a title instead of the "Untitled Trigger" and click anywhere within the "Trigger Configuration" panel:

enter a title click on the panel

  • This will bring up the "Choose trigger type" sliding panel on the right side of the screen. Find the "Click" group of trigger types and click "All Elements":

click all elements

  • This will bring up the "Trigger Configuration" panel. Click "Some Clicks":

click some clicks radio button

  • You will see three new boxes appear underneath. Click "Click Target" and then click "Build-in Variable":

click choose builtin variable

  • You will see the "Choose Built-In Variable" panel sliding out on the right side of the screen. Click "Click Text":

click click text

  • You once again will see the "Trigger Configuration" panel. Make sure the field in the middle is set to "contains" and enter the text of the button to be tracked into the right field. For my demonstration, I entered "Ask a question":

enter the text of the button

  • In the top right corner, click the blue "Save" button.
  • On the next screen, click the same "Save" button:

click save


Step #2. Test the tracking tag

  • In the top right corner of your Google Tag Manager console, click the "Preview" button:

click preview

You will see the orange panel with the "Now Previewing Workspace" title:

now previewing workspace orange panel

  • Visit your Joomla site frontend and refresh the page with the button clicks on which you would like to track. You should see the Google Tag Manager preview panel underneath it:

the tag manager preview panel

  • Click your button. You should see that your click has been registered in the "Summary" > "Tags Fired On This Page":

click recorded

  • Now go to your Google Analytics console > "Realtime" > "Events":

go to real time events

  • You will that Google Analytics also tracked the events of the click on the button:

the click tracked by google analytics


Step #3. Submit the tracking tag

So far so good! Everything we've set so far was in the "Preview" mode. Let's move from this testing mode to the live mode.

  • In your Google Tag Manager console, in the top right corner, click "Submit":

click submit

  • You will see the "Submit Changes" box. Add a descriptive name into the "Version Name" box and click "Submit":

click publish

  • You will see your version under the "Version" tab of your Google Tag Manager:

your version listed

Documentation for Joomla 5

Once you connected your Shack Analytics Joomla 5 extension to Google Tag Manager and Google Analytics, you can start tracking how users engage with your Joomla site.

In this document, you will learn how to track clicks on a button. For this demonstration, I selected a button of a form created with the Shack Forms Joomla extension.

This is a three-step process.

  1. Create a tracking tag in Google Tag Manager
  2. Test the tracking tag
  3. Submit the tracking tag

Let's take a look at this process in more detail.


Step #1. Create a tracking tag in Google Tag Manager

  • Log into your Google Tag Manager and your Google Analytics console.
  • Click "New Tag":

click new tag

  • Enter a title for your tracking tag and click anywhere on the "Tag Configuration" panel:

create title click on the tag configuration panel

  • You will see the "Choose tag type" panel on the right side of the screen. Click "Google Analytics: Universal Analytics":

click google analytics

This will bring up the "Tag Configuration" and "Triggering" panels.

  • In the "Track Type" field, select "Event".
  • Enter something meaningful in the "Category" field. For this demonstration, I entered "Clicks".
  • Enter something meaningful in the "Action" field. For my demonstration, I entered "Ask a question":

track type category and action

  • Scroll slightly down the panel and tick the "Enable overriding settings in this tag" checkbox. Enter your Google Analytics Tracking ID into the "Tracking ID" field:

tick the checkbox copy ga tracking id

  • Click anywhere on the "Triggering" panel:

click on the triggering panel

  • In the top right corner of the next screen, click the the "+" icon:

click the plus icon

  • On the next panel, enter a title instead of the "Untitled Trigger" and click anywhere within the "Trigger Configuration" panel:

enter a title click on the panel

  • This will bring up the "Choose trigger type" sliding panel on the right side of the screen. Find the "Click" group of trigger types and click "All Elements":

click all elements

  • This will bring up the "Trigger Configuration" panel. Click "Some Clicks":

click some clicks radio button

  • You will see three new boxes appear underneath. Click "Click Target" and then click "Build-in Variable":

click choose builtin variable

  • You will see the "Choose Built-In Variable" panel sliding out on the right side of the screen. Click "Click Text":

click click text

  • You once again will see the "Trigger Configuration" panel. Make sure the field in the middle is set to "contains" and enter the text of the button to be tracked into the right field. For my demonstration, I entered "Ask a question":

enter the text of the button

  • In the top right corner, click the blue "Save" button.
  • On the next screen, click the same "Save" button:

click save


Step #2. Test the tracking tag

  • In the top right corner of your Google Tag Manager console, click the "Preview" button:

click preview

You will see the orange panel with the "Now Previewing Workspace" title:

now previewing workspace orange panel

  • Visit your Joomla 5 site frontend and refresh the page with the button clicks on which you would like to track. You should see the Google Tag Manager preview panel underneath it.
  • Click your button. You should see that your click has been registered in the "Summary" > "Tags Fired On This Page":

click recorded

  • Now go to your Google Analytics console > "Realtime" > "Events":

go to real time events

  • You will that Google Analytics also tracked the events of the click on the button:

the click tracked by google analytics


Step #3. Submit the tracking tag

So far so good! Everything we've set so far was in the "Preview" mode. Let's move from this testing mode to the live mode.

  • In your Google Tag Manager console, in the top right corner, click "Submit":

click submit

  • You will see the "Submit Changes" box. Add a descriptive name into the "Version Name" box and click "Submit":

click publish

  • You will see your version under the "Version" tab of your Google Tag Manager:

your version listed