Add GA and Facebook Pixel in Google Tag Manager

Before we start, if you have not implemented your Google Tag Manager, check out my previous article How to implement Google Tage Manager (GTM) first. If you have done so, let’s get started.

Add Google Pageview tracking tag

  1. Login to your Google Tag Manager.

  2. In your Workspace, click on the “Add a new tag”.

    GTM Dashboard

  3. Give a proper name for your tag. I will name is GA – Pageview – All Pages. This tag will track pageview on my site.

    GTM Give this tag a name

  4. Click on the Tag Configuration section.

    GTM click tag configuration

  5. Under Featured and select the first option “Google Analytics: Universal Analytics”

    GTM select google analytics universal analytics

  6. For Track Type, select Pageview.

    GTM tag configure

  7. For Google Analytics Settings, select New Variable.

    GTM Google analytics setting

  8. Give a name for the Variable, I used my Google Analytics ID as the name. Under Tracking ID, also paste your Google Analytics ID in the field. After that click Save.

    Login to your Google Analytics Account to find your ID or you can check my earlier post on How to setup Google Analytics for your website to set up an account or how to find in Google Analytics.

    GTM Google Variable

  9. Now click on the Triggering section.

    GTM click triggering

  10. Select All Pages

    GTM select all pages

  11. Once everything is done, click the Save button.

    GTM configure done

  12. Now click Submit.

    GTM submit

  13. Give a proper version name and description so you know what changes you have made. Then click Publish and GTM will activate the new changes.

    GTM published setting

Add Facebook Pixel code into Google Tag Manager

  1. Go to your dashboard and click “Add a new tag”.

    dashboard mainpage

  2. Give it a proper name. I name it “Facebook Pixel – Pageview – All pages. After that click on the Tag Configuration.

    Give the new tag name

  3. There is no Facebook Tag type so we have to use a “Custom HTML” tag. Select Custom HTML tag.

    Select custom html

  4. Paste the Facebook Pixel code into the box. If you do not have a Facebook Pixel code, you can read my previous article “What is Facebook Pixel and how to set it up” to see how you can generate one for your website.

    paste in the facebook pixel code

  5. Click on the triggering section.

    select triggering

  6. Select “All pages”.

    select all pages

  7. Click “Save”.

    click save

  8. Click “Submit”.

    click submit

  9. Give it a version name and description and click “Publish”.

    name the version and submit

That it, you have successfully added Google Analytics tracking code and Facebook Pixel code into Google Tag Manager.

Share the article with your friends

facebook icon twitter icon linkedin icon

Comments