Tracking your Shack Forms submissions in Google Analytics is a six-step process.
- Connect your Joomla site to Google Analytics.
- Create a "Thank You" Joomla article for your form.
- Create a hidden menu item for the "Thank You" article.
- Set your form to redirect to the "Thank You" page upon submissions.
- Create a goal in Google Analytics to track the form submissions.
- Test the goal conversion in your Google Analytics
Let's go through this process step-by-step in more detail.
Note: to follow instructions in this tutorial, make sure you are logged into your Google Mail account.
Step #1. Connect your Joomla site to Google Analytics
- Sign in to your Google Mail account.
- Visit analytics.google.com.
- Under the "Admin" tab, click "Create Account":
- You will be taken to the "Create account" screen. Enter your Google Analytics account name and click "Next":
- On the next screen, make sure the "Measure your website" radio button is selected:
- Scroll down the page and click "Next":
- On the next screen, enter your Google Analytics Property name, your website URL, select its industry category, reporting time zone and click "Create":
- On the next screen, agree to the Google Data Processing Terms, Data Protecting Terms, and click "I Accept":
- You will see the tracking code with the Global Site Tag displayed. Copy the tag's snippet:
- FTP to your site. Copy this snippet right after the opening <head> tag of your template's index.php file and save your changes:
Excellent! Google Analytics is now capable to track your Joomla site.
Step #2. Create a "Thank You" Joomla article for your form
- In your Joomla administrator panel, go to "Content" > "Articles" > "Add New Article":
- Create a "Thank You for Contacting Us" Joomla article:
- Click "Save & Close".
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 such a menu item.
Step #3. Create a hidden menu item for the "Thank You" articles
- 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":
- 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":
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
- In your Shack Form, go to the "Events" tab:
- Scroll down to the "Redirect after send". Set the "Redirect menu item" parameter to the "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:
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 your Google Analytics to track the form submissions
- In your Google Analytics, click the "Admin" icon in the bottom left corner:
- Under the "View" column, click "Goals":
- Click "NEW GOAL":
- On the next screen, click "Custom" and then click "Continue":
- Enter your goal description, click "Destination" and click "Continue":
- Enter your URL without your domain name into the "Destination" field and click "Save":
- You will see your Google Analytics 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":
- You will see that Google Analytics successfully tracked your goal-related hit: