How to Track Shack Forms Submissions with Google Analytics

How to Track Shack Forms Submissions with Google Analytics

One of our customers asked how to track their Shack Forms submissions with Google Analytics.

Setting such tracking is a six-step process.

  1. Connect your Joomla site to Google Analytics.
  2. Create a "Thank You" Joomla article for your form.
  3. Create a hidden menu item for the "Thank You" article.
  4. Set your form to redirect to the "Thank You" article page upon submissions.
  5. Create a goal in Google Analytics to track the URL of the "Thank You" page.
  6. Test the goal conversion in your Google Analytics.

In this blog post, I'll walk you through this process step-by-step in more detail.

Step #1. Connect Joomla to Google Analytics

Before proceeding with this tutorial, you need to make sure that Google Analytics is tracking your site. This guide will get you set up.

Step #2. Create a "Thank You" article

  • In your Joomla administrator panel, go to "Content" > "Articles" > "Add New Article".
  • Create a "Thank You for Contacting Us" Joomla article:

create a thank you joomla article

Good! You now have a "Thank You" page. Every time someone submits your Shack Form, they will get automatically redirected to this page.

For this redirection to work, your Shack Form needs a Joomla menu item linking to the "Thank You" article. This menu item doesn't have to be displayed to your site visitors. It can be hidden. But it does have to exist in your Joomla system. Let's create this menu item.

Step #3. Create a menu item

  • Go to a Joomla menu of your choice. For my demonstration, I go to the separate menu called "Hiden Menu". I created it specifically for menu items that won't be displayed. Click "Add New Menu Item":

my hidden menu item

  • Create a new menu item linked to the "Thank You" Joomla article. As you can see on the screenshot below, I called mine "Thank You":

my thank you menu item

Good job! You now have your "Thank You" Joomla page. You also created a Joomla menu item for this page.

Now is a good time to set your Shack Form submitters to get redirected to the "Thank You" page.

Step #4. Set your form to redirect to the "Thank You" page upon submissions

go to events tab

  • Scroll down to the "Redirect after send". Set the "Redirect menu item" parameter to the "Thank You" menu item:

set the redirect to thank you menu item

  • Click "Save & Close".
  • Go to your Joomla site frontend. Submit your Shack Form with some test data. 
  • Your form will get redirected to the "Thank You" page. Copy its URL:

copy the url of the thank you page

Well done! Shack Forms is all set for tracking the form's submissions in your Google Analytics. 

Let's set your Google Analytics to track them. You will achieve this by creating a Google Analytics goal for the URL you just copied.

Step #5. Create a goal in Google Analytics

  • In your Google Analytics, click the "Admin" icon in the bottom left corner:

click admin

  • Under the "View" column, click "Goals":

under the view click goals

  • Click "NEW GOAL":

click new goal

  • On the next screen, click "Custom" and then click "Continue":

click custom and click continue

  • Enter your goal description, click "Destination" and click "Continue":

enter goal descriptions click destination click continue

  • Enter your URL without your domain name into the "Destination" field and click "Save":

enter the url and click save

  • You will see your Google Analytics goal listed:

your goal listed

Good job! Now is a good time to test your Joomla form submissions tracking.

Step #6. Test the goal conversion in your Google Analytics 

  • Go to the frontend of your Joomla site. Submit your form with test data.
  • In your Google Analytics account, go to "Realtime" > "Conversions":

go to real time conversions

  • You will see that Google Analytics successfully tracked your goal-related hit:

your will see the goal hit tracked

About the author

Alex is a self-taught Microsoft Certified Professional based in England. He enjoys learning Joomla and helping beginners and web site administrators make the most of it.