Setting up conversion tracking with Google Tag Manager (GTM) allows you to measure specific actions that users take on your website, such as form submissions, button clicks, or purchases. Here’s a step-by-step guide to help you set up conversion tracking using GTM:
Step-by-Step Guide to Set Up Conversion Tracking with Google Tag Manager
1. Create a Conversion Goal in Google Analytics (if applicable)
Before setting up conversion tracking in GTM, ensure you have a clear goal defined in Google Analytics (GA) that corresponds to the conversion action you want to track (e.g., a form submission, a purchase completion).
- Navigate to Google Analytics: Go to your Google Analytics account and select the property for the website where you want to set up conversion tracking.
- Create a Goal: In GA, go to Admin > Goals > New Goal. Follow the prompts to set up a new goal based on the specific conversion action you want to track (e.g., Destination, Duration, Pages/Screens per session, Event).
- Note the Goal ID: Once you create the goal, note down the Goal ID as you will need it later in GTM.
2. Install Google Tag Manager on Your Website (if not already installed)
If GTM is not installed on your website yet, follow the steps mentioned earlier to install GTM and add the GTM container snippet to your website.
3. Create a Trigger for Your Conversion
In GTM, triggers specify when tags should be fired. You’ll create a trigger that corresponds to the specific conversion action on your website.
- Navigate to Triggers: In GTM, go to Triggers > New to create a new trigger.
- Choose Trigger Type: Select the appropriate trigger type based on the conversion action you want to track (e.g., Click Trigger for button clicks, Form Submission Trigger for form submissions).
- Configure Trigger Conditions: Set up trigger conditions to specify when the trigger should fire. For example, you might set conditions based on the CSS class or ID of a button or form element.
4. Create a Conversion Tag in Google Tag Manager
After creating the trigger, you’ll create a tag that sends conversion data to Google Analytics when the trigger conditions are met.
- Navigate to Tags: In GTM, go to Tags > New to create a new tag.
- Choose Tag Type: Select Google Analytics: GA4 Configuration (or Universal Analytics if you are using UA) as the tag type.
- Configure Tag Settings:
- Tag Configuration: Choose the appropriate configuration (GA4 Configuration or Universal Analytics) and enter your GA Property ID.
- Event Configuration: Set the Event Name to match the event you are tracking (e.g., formSubmit, purchase).
- Triggering: Select the trigger you created earlier to specify when the tag should fire.
5. Test Your Conversion Tracking
Before publishing your tag, use GTM’s Preview mode to test whether your conversion tracking is working correctly.
- Enable Preview Mode: Click on Preview in GTM to enter preview mode.
- Test the Conversion: Navigate to your website and perform the conversion action (e.g., submit a form, complete a purchase) to verify that the tag fires correctly in GTM Preview mode.
6. Publish Your GTM Container
Once you’ve confirmed that your conversion tracking tag works as expected in Preview mode, publish your GTM container to make your changes live on your website.
- Publish Changes: Click on Submit in GTM to publish your container with the new conversion tracking tag.
7. Verify Conversion Tracking in Google Analytics
After publishing, verify that conversion data is being recorded in Google Analytics.
- Navigate to Real-Time or Conversions: In Google Analytics, go to Real-Time > Conversions (or Conversions > Goals) to check if your conversions are being tracked.
8. Monitor and Optimize
Regularly monitor your conversion tracking in both GTM and Google Analytics to ensure accurate data collection. Use the data to optimize your website and marketing campaigns based on conversion insights.
By following these steps, you can effectively set up conversion tracking with Google Tag Manager, enabling you to measure and analyze important actions users take on your website to improve your marketing efforts and achieve your business goals.