Google Tag Manager is a free tool that allows you to manage and deploy marketing and analytics tags (snippets of code) on your website without having to modify the code of your website directly. In this tutorial, we will guide you through the process of setting up a Google Tag Manager account.
Step 1: Create a Google Tag Manager account
To get started, head over to the Google Tag Manager website at https://tagmanager.google.com/. If you don’t already have a Google account, you’ll need to create one. Once you’re signed in, click the “Create Account” button.
Step 2: Add your website to Google Tag Manager
Once you’ve created your account, you’ll be prompted to add a new container. A container is a snippet of code that you’ll need to add to your website to enable Google Tag Manager. Enter a name for your container, and then select the type of website you’re working with (web, iOS, Android, AMP). If you’re working with a website, select “Web” and enter your website’s URL. Click “Create.”
Step 3: Install the Google Tag Manager code on your website
Next, you’ll need to install the Google Tag Manager code on your website. After creating a container, you will be taken to a page that displays two code snippets: the “head” and “body” tags. Copy and paste these code snippets onto your website’s HTML code. The easiest way to do this is to paste the code snippets into your website’s header and footer templates.
Step 4: Create and publish your first tag
Once you’ve installed the Google Tag Manager code on your website, you can begin creating tags. A tag is a snippet of code that sends data to a third-party service, such as Google Analytics. To create your first tag, click “Tags” from the main menu and then click “New.” Enter a name for your tag and select the tag type. For example, if you want to track pageviews, select “Google Analytics: Universal Analytics.” Enter your Google Analytics tracking ID and any additional settings. Click “Save.”
Step 5: Test and publish your container
Before publishing your container, it’s important to test it to ensure that it’s working correctly. To test your container, click “Preview” from the main menu. This will open a new tab with your website. Any tags that you’ve created will be in preview mode, so you can test them before publishing. Once you’ve confirmed that everything is working correctly, click “Submit” from the main menu and then click “Publish.”
Conclusion
Congratulations, you’ve successfully set up a Google Tag Manager account! Now you can create and deploy tags to track user behavior and other important metrics on your website.