Google Tag Manager

How To Setup Install Google Tag Manager In Flatsome Theme Powered Websites

Are you looking to setup Google Tag Manager (GTM) in your website?

In this guide, we will show you how to properly install and setup Google Tag Manager for your Flatsome Theme Powered Website.

Before we begin, let’s know more about G TM and its benefits. You are probably wondering what is Google Tag Manager if you are not familiar with the term. Let’s answer some most common questions around it.

What is Google Tag Manager?

Google Tag Manager is a great tool for your digital tracking needs. Without editing your code, it allows you to deploy tags on your site. This tool allows you to deploy and update different code snippets called tags.

A good example of a tag is the Google Analytics tracking code which you add to your website. So that you can track details of your traffic.

You can check this tutorial to add Google Analytics in Flatsome theme powered website.

Not only Google Analytics, there are many other tracking services or tag vendors require you to add a few lines of HTML or JavaScript code to your website to integrate their services. Such as Facebook Pixel, Adobe Analytics, LinkedIn Insight and advertising tools like Google AdWords.

You can easily add and manage all these codes from a single interface and you don’t need to edit website’s code. There’s built-in tag templates for popular services like Google Analytics, AdWords, DoubleClick, etc. However, you can also add custom tags to your website.

What are the benefits of Google Tag Manager?

You can do in pretty amazing things in Google Tag Manager once you get over the learning curve. A couple of main benefits includes:

  • All third-party code is in one place.
  • It allows you to deploy tags quickly.
  • Migrate all existing tags to GTM.
  • Before you make anything live, you can see what’s working and what’s not.
  • It offers you to deploy multiple tags and manage them from an intuitive interface. 

Setting up Google Tag Manager

To set up Google Tag Manager, there are two main methods you can use. One is manual and the other one is with a plugin. The stages are almost the same in each method.

Setup your Google Tag Manager Account

First, visit the Google Tag Manager website and sign up using the same Google account you used for Google Analytics. 

tag manager site

Next, you need to sign in with your Google account. You can notice the Google Tag Manager’s Create Account page once done. Simply click on the ‘Create Account’ button to get started.

Simply enter your account name and select your country from the drop-down. You can use your company name as your account name.

create tag manager account

Next, you need to setup your container. It is the collection of tags, triggers and all the configurations installed in a website.

You can use your website’s domain name for the container name. A container could be a website, or an app on iOS or Android platforms. In this case we will use the web. Click on the Create button to continue once you are done.

container setup

Now you will need to accept the Terms of Service Agreement of Google Tag Manager to proceed. Check the box to accept the Data Processing Terms and then click the Yes button on the top right corner.

tag manager agreement

You will notice a new popup window appear on screen upon accepting the terms of service with code snippets to install tag manager on your website.

There are two code snippets to be added. One is inside the <head> tag and another one is in the <body> tag on your website.

install google tag manager

You will need these two codes to setup Google Tag Manager on your Flatsome theme powered website. So keep the above tab open. It offers instruction on where to paste the code. But if you are an absolute beginner, it can be challenging.

Do not worry, we are going to show you upcoming steps.

Add Google Tag Manager Code Manually

Head to your WordPress admin dashboard in a new tab. Then navigate to Theme Editor under the Appearance section.

Then click on the Theme Header from the right side to launch header.php within the theme editor.

As per GTM account instructions, copy the first code and paste it in the <head> element as shown in this image.

Then copy the second code and paste immediately after the <body> tag as shown on the image.

Hit the Update File button at the bottom of the screen to save your settings once done.

There is another method to add GTM code to your Flatsome Powered website.

Add Google Tag Manager on Flatsome Theme option

Head to your WP admin dashboard.  Look for Advanced under Flatsome and click on Global Settings.

You’ll find both Header Scripts and Body Scripts to paste your analytics code.

Save All Changes clicking on the button below on that page.

Note: we suggest you to use a WordPress child theme, if you go to the manual route. Otherwise, your tracking code will be overwritten if you switch or update the theme.

Add Google Tag Manager using a Plugin

If other methods seems difficult for you, then add using a third-party plugin.

Let’s see how you can take help of a plugin to insert the Meta tag exactly where it is needed.

Navigate to Add New under Plugins on your WP admin dashboard.

There are different plugin that you can use to add the GTM code. But here I recommend Insert Headers and Footers plugin.

You can follow this guide to get help on how to install a WordPress plugin.

Once you install and active the plugin, then visit Insert Headers and Footers from Settings.

Then simply copy and paste the GTM code in the header section and click on the save button to store the settings.

Add and Publish Tags in your Tag Manager

Once you have done installing GTM on your website, you are ready to add code snippets (tag) provided by different tracking tools on your website.

Now go back to the GTM dashboard and click on the ‘New Tag’ button and follow the steps to create your first tag. You can add different tags in your GTM container by following the same method and integrate your Flatsome powered site with various tracking tools.

Google Tag Manager supports over 50 tag types. Tags in Google Tag Manager will not go live until you publish the container. So you will have to submit from the GTM dashboard once you create your new tag.

Google Tag Manager is a powerful tool that helps putting a lot of power in your hands to manage tags and collect actionable data. When you can setup the tool easily and quickly, that means you have more time to plan how you will use all the data you could collect.

We hope this guide helped you to learn how to install and setup Google Tag Manager in your Flatsome Theme powered website.