No matter what type of website you have, it is important to know how visitors interact with it. Google Analytics (GA) has traditionally been used by webmasters to analyze website traffic. GA provides statistics and user reports on:
- the number of visitors to your site;
- which country they are from;
- how many pages they visited in a session
- The most popular pages of your site
- How many site visitors returned (left without any action)
- Google Ads
- Events
- Facebook Pixel Code
- Remarketing
- Custom HTML / JavaScript
- If you don’t already have a Google Tag Manager account, create one.
- If you don’t already have a Google Tag Manager account, one setting .
- Add your account name, country, container setting (your domain) and target platform (select Internet). Then click “Create”.
- After you accept Google’s terms of service, you will see your container ID with two code snippets.
- You need to add both snippets to every page on your site to complete the customization process. Make sure you add them in the correct place. One belongs to the of your page. Another comes after the opening tag.
- If you need more help installing Snippets, read the Google Quick Start Guide Or, if you are using WordPress, you can use multiple plugins.
- Once you’ve created your container, you can start adding tags and triggers to get an idea of ??your site’s visitors.
- Download.
- Add to cart.
- Click to call.
- Subscribe.
- Register.
- Get started.
- Get a free report.
- Learn more.
- Join us.
- Click Variables and then Customize in the left navigation bar.
- Scroll down and click Element, Classes, Identifier, Target, URL, and Text.
- Click on Variables and then on Initialize from the navigation to the right.
- Scroll down and click Element, Categories, ID, Target, URL and Text .
- The next step is to enable a trigger that fires on all clicks. Click Triggers in the left navigation bar and click NEW.
- Then give your trigger a name. Let’s call this “Button Press”.
- To select a trigger type, click inside the trigger window, scroll down to the bottom of the pop-up page, and click All Items.
- Make sure you set this trigger to fire on all clicks, and click Save.
- To verify that the tag is working as expected, click the View button. An orange bar will appear to let you know that you are in preview mode.
- Open your website in a new browser tab and refresh the page. You will see the summary items in quick view. Since in this example we are setting a trigger that fires whenever someone clicks anywhere on your site, it will register as a GTM click.
- If you want to identify a specific button on a page, select one of the clicks in the Google Tag Manager preview pane. Then click Variables.
- Go to this trigger and select Some Clicks.
- To change this inside GTM, select Click – All Items and change it to Links Only.
- Use the class you captured in preview and add it to the empty field to the right of Click Classes and click Save.
- Click Tags in the left navigation and click New.
- Click Tags from the left navigation bar and press New .
- Click inside the Tag Configuration box to open the tag types. Scroll down and select Custom HTML.
- You can use variables within this custom HTML section by enclosing them in brackets {}.
- When you start typing parentheses, you will see a quick search menu from which you can select your specific existing variables.
- Now you need to connect this to the trigger you just created. Click inside the Run box, select a trigger, and click Save.
- Refresh the preview page again to test the button. Click on your button to see if the tag is activated. If that doesn’t work, go back and check all your settings.
- If they are correct, you will see that tags have been activated for this event. Now you track when your button is pressed.
- Return to GTM and select the tag you just created. Be sure to give it a meaningful name.
- Change the tag type from Custom HTML to Google Analytics: Google Analytics: Universal Analytics.
- Go back to GTM and locate the tag you just created. Make sure to name it with a recognizable name.
- Change the tag type from Custom HTML to Google Analytics: Google Analytics : Universal Analytics .
- Select an event for the tracking type, CTA button for event tracking options, click for action, and add an identifying name for the label.
- Scroll down to Google Analytics settings, select {{Google Analytics}} and click Save. You are now tracking your clicks in Google Analytics as an event.
- Submit your event and then publish it.
- In the Container Version Description section, add a descriptive name for your event and click Continue.
- Your new trigger and new tag are now placed on your website and allow you to track every time a website visitor clicks a button.
Google Tag Manager To Analyze Your Website Traffic”/>
To track key metrics such as page views, session duration, and bounce rate with GA, you need to place GA tracking code or GA JavaScript snippet on each web page. This is ideal for tracking general information.
However, for more specific metrics or multiple interactions, it becomes more difficult to track each action. For example, a website owner who wants to keep track of several different forms and different functions will take a long time to set up and run all the required tags.
Google Tag Manager (GTM) is a free tag management tool that makes it easy to keep track of all your tags.
What is Google Tag Manager?
Instead of replacing GA, GTM works with GA (which itself is a tag) to help users add tracking code (tags), define rules, and deploy code snippets.
The data collected by GTM is sent and stored in GA and other tools like Google Ads, PayPal and Facebook.
– / –
Examples of tags that website owners may want to track are:
Website owners must decide which behavior will give them the insight they need to make more effective strategic marketing decisions. Then use Google Tag Manager to collect data and analyze the results.
In this article, we’ll show you how to get started using GTM for your website.
Set up your website
Google Tag Manager To Analyze Your Website Traffic”/>
Google Tag Manager To Analyze Your Website Traffic”/>
Below is an example of a website activity to help you gauge your marketing efforts.
Tracking button clicks
Button clicks refer to the number of times your website’s call to action (CTA) is clicked. Many sites have multiple CTAs, for example:
Customizing some variables
Set up some variables
Google Tag Manager To Analyze Your Website Traffic”/>
Google Tag Manager To Analyze Your Website Traffic”/>
Google Tag Manager To Analyze Your Website Traffic”/>
Google Tag Manager To Analyze Your Website Traffic”/>
Google Tag Manager To Analyze Your Website Traffic”/>
You will see click classes, click elements, and click texts. All different clicks and click classes are notated. Once you find the variables, figure out what to filter for the button you want to track.
Click this website’s button and it will highlight the summary section in the GTM preview below your website.
Take a look at the variables associated with the button you selected, such as click classes, click element, and click id. Use this information to customize the button press. Return to Google Tag Manager Go to the Click button.
For the purposes of this article, let’s set up a button to get a free report, so rename it to “Get a free report” call to action.
Google Tag Manager To Analyze Your Website Traffic”/>
Google Tag Manager To Analyze Your Website Traffic”/>
Here you will be able to filter on the variables found in the preview.
Google Tag Manager To Analyze Your Website Traffic”/>
Go back to your website preview and write down the variables for the button you want to track. Depending on where you click, different parts of the button can have different classes.
The best solution for this is to switch the tracking to link click, because the classes are the same no matter where you click. Clicking on a link is a hyperlink that remains permanent.
Google Tag Manager To Analyze Your Website Traffic”/>
Google Tag Manager To Analyze Your Website Traffic”/>
Create a tag
Create a Tag
Google Tag Manager To Analyze Your Website Traffic”/>
Google Tag Manager To Analyze Your Website Traffic”/>
Make the Tag Event
Google Tag Manager To Analyze Your Website Traffic”/>
Google Tag Manager To Analyze Your Website Traffic”/>
There is no limit to the number of activities you can track with Google Tag Manager The more data you collect and measure, the better you can customize your marketing and ad campaigns to increase conversions and sales.
–