There each steps to set up and deploy Google Analytics tracking with Google Tag Manager which includes:
Table of Contents
Toggle1. Create a Google Analytics Property
- Sign in to Google Analytics:
- Go to Google Analytics (analytics.google.com) and sign in using your Google account.
- Create a New Property:
- Click on “Admin” in the lower-left corner.
- In the “Property” column, click on “Create Property.”
- Follow the prompts to enter information about your website (e.g., website name, URL).
- Choose your reporting time zone and currency.
- Click “Create” to finish creating your property.
- Note Your Tracking ID:
- After creating the property, you’ll be provided with a Tracking ID (e.g., UA-XXXXX-Y).
- This Tracking ID will be used later in Google Tag Manager.
2. Set Up Google Tag Manager
- Sign in to Google Tag Manager:
- Go to Google Tag Manager (tagmanager.google.com) and sign in using the same Google account.
- Create an Account and Container:
- If you’re new to GTM, you’ll need to create an account and container for your website.
- Enter an account name (e.g., MyWebsite) and container name (e.g., WebsiteContainer).
- Choose where you want to use GTM (e.g., web, iOS, Android).
- Click “Create” to finish creating your container.
3. Install Google Tag Manager on Your Website
- Get Your Container Snippet:
- In GTM, go to your container dashboard.
- Click on “Admin” in the lower-left corner.
- Under “Container” column, click on “Install Google Tag Manager.”
- Copy the entire container snippet provided (looks like <script>…</script>).
- Add the Container Snippet to Your Website:
- Paste the container snippet into the <head> section of every page of your website.
- You can do this manually by editing your website’s HTML or by using a CMS like WordPress.
4. Set Up Google Analytics Tag in GTM
- Create a New Tag:
- In GTM, go to your container dashboard.
- Click on “Tags” in the left sidebar.
- Click on the “New” button to create a new tag.
- Configure the Google Analytics Tag:
- Choose “Tag Configuration” and select “Google Analytics: Universal Analytics.”
- Enter your Google Analytics Tracking ID that you obtained earlier.
- Configure other settings such as track type (e.g., Page View, Event), tracking ID, and more based on your tracking requirements.
5. Create Triggers
- Define Triggers:
- Triggers determine when your tags are fired.
- Common triggers include page views, form submissions, button clicks, etc.
- In GTM, go to “Triggers” in the left sidebar and click on “New” to create a new trigger.
- Set Up Trigger Conditions:
- Choose the trigger type that matches your tracking needs.
- Configure trigger conditions (e.g., URL, click classes) based on when you want the tag to fire.
6. Test Your Setup
- Use Preview Mode:
- In GTM, click on “Preview” in the top-right corner to enter Preview mode.
- Visit your website to test if your tags are firing correctly based on the triggers you’ve set up.
7. Publish Changes
- Publish Your Container:
- Once you’re satisfied with your setup and testing, click on “Submit” in GTM.
- Enter a version name and description for your changes.
- Click “Publish” to make your changes live on your website.
8. Monitor and Analyze
- Analyze Data in Google Analytics:
- Go back to Google Analytics to monitor and analyze the data collected.
- Explore various reports such as audience, acquisition, behavior, and conversions to gain insights into your website’s performance.
Congratulations! You’ve successfully set up and deployed Google Analytics tracking with Google Tag Manager on your website. Remember to regularly monitor your analytics data to optimize your website and marketing efforts effectively.
