Tracking is the most important part in digital marketing no matter if you are doing email marketing, PPC, affiliate marketing, social media marketing, and so on, tracking is a must. Today, let me share with my readers the common tracking method in B2B marketing: leads tracking.

In order to track queries successfully, there are different implementations with different web authoring technology but I will focus on WordPress + contact 7 form that many people will use (23/3/2018 update: contact form 7 version must be 4.7 or newer).

What is GTM?

Before I continue with the topic of the article, let me sidetrack a little bit and first talk about what GTM is and why you need to use GTM. The full name of GTM is Google Tag Manager. Its purpose is to make life easier for website owners to manage a wide range of tags on their websites. For example, you can install Google analytics to measure site visitors and/or use Adwords tags to build your re-marketing list etc.

Why do you need GTM?

Apart from the reason of easy implementation, another main reason to use GTM is prevent slow loading of your website. It is particular true if you require many tags install on your site. Since those tags are often built in javascript technology, and it will make your site slow if you have too much. This is a very critical issue in user experience. ThTherefore if you install the tags with GTM, you basically just need to install one GTM tag on your website and thus solve the slowness issue.

Implementing GTM with WordPress and Contact 7 Form

Step #1:Login to GTM and create an account

To use GTM, first login to the platform with google account. If you do not have a Google account, you can register one for free.

You can use Google Account to login GTM

I assume you have set up Google analytics on the site. After logging in to GTM, it will ask you to create an account.

Type in your desired account name in the “Create Account” field, select a region, and choose whether to share anonymous data with Google. When you finish typing, click on next.

Step 2: Set up a Container

A container is the basic unit of GTM. Basically you must create a container before you can create tags. Enter a name for the container (enter the site name) and select “web” in “Where to use the frame”.

A “Accept Terms” popup window will then be displayed. Click on “Accept Terms” to accept the terms and then install the GTM tag on your website. One of the installation methods is to copy the required code to the header file (header.php) in theme file E.g:



Note that the GTM code must be set on the first line after the and and tags.

Step 3: Set Google Analytics Tags on GTM

To set up the Google analytics tags, press “tags” on the GTM workspace page as shown below.

Press “new” again on the next page. On the new page, enter the tag name and press “Pencil” on the right in the tag configuration column.

Then select “Universal analytics” on the next page. Then select “New variable” in the Analytics settings.

Finally, in the “variable configuration” window, enter “Tracking ID”, as shown in the figure below, and then press “Save” twice to save. Pay attention to the “CookieDomain” column and leave it as “auto”.

When you press “Save” twice, it will return to the above picture showing “GA Screen”. Press the “Pencil” on the right side of the trigger window this time.

Then on the next page, select “Page View”

After the following page appears, press “Save” again to save. This completes the steps to install the Google analytics tags.

The GA steps are completed. The next step is to create a javascript tag in the GTM to track the submission of web form.

I will continue to share the technical links in the next time. If you don’t want to miss it, remember to like it on my FB, or if you’re using Google Chrome, subscribe to “Push Notifications”.

Facebook Comments

Leave a comment

Your email address will not be published. Required fields are marked *

Digital Marketing News & Trends
× How can I help you?