MyListing Club

Google Tag Manager for MyListing Websites

Building better MyListing websites. One guide at a time.

Guide Contents

Overview

The Google Tag Manager for MyListing Websites guide will show you how to efficiently add and update your own website tags to better understand conversions, site analytics, and more.

Google Tag Manager should be used when you need to track multiple entities such as Google Analytics and Facebook Pixel.

For this guide, we assume that you already have Google Analytics set up, according to our Google Analytics for MyListing guide.

Google Tag Manager Account Setup

  1. Visit the Google Tag Manager website.
  2. Click the Create Account link.
  3. Enter an Account Name.
  4. Choose your Country.
  5. Enter the URL (without the https://) of your website for the Container Name.
  6. For the Where to use container setting, choose Web.
  7. Click Create.
  8. Check the I also accept box and click Yes to accept the terms.
  9. Close the Install Google Tag Manager dialog box.
  10. Click the Submit button in the upper right of your screen.
  11. Click the Publish button in the top right of the screen.
  12. Click Skip.

Add Another Container (Website) to Your Account

  1. Visit the Google Tag Manager website.
  2. Click on your account link.
  3. Click on the Admin tab.
  4. In the right-hand column click the ‘+’ icon to add another Container.
  5. Container Name > Enter the URL (without the https://) of your website.
  6. Target Platform > Web.
  7. Click Create.

Add Google Analytics Tag to Google Tag Manager

  1. Log into your Google Analytics account.
  2. Go to Admin > Tracking Info.
  3. Click Tracking Code.
  4. Copy your Tracking ID (UA-xxxxx…).
  5. Go back to Google Tag Manager and click the Workspace tab.
  6. Click Add a new tag.
  7. Click on the Tag Configuration box.
  8. Select Google Analytics – Universal Analytics.
  9. Check the Enable overriding settings in this tag box.
  10. Paste your copied Tracking ID into the Tracking ID box.
  11. Click the Triggering box.
  12. Click All Pages.
  13. Click Save.
  14. Accept the default tag name or set a custom one if desired.

Add Google Tag Manager to WordPress Without Plugins

We highly recommend that you use a child theme, if you’re not already, so the changes we make here are not lost when you update your parent theme.

Our preference is to do the job without adding additional plugins to the mix.

While there are plugins available for these steps, we found that there is the same amount of work/complexity involved when using those plugins.

  1. Connect to your website via FTP, using an FTP client such as FileZilla. (Note: As a general rule, you should always have access to your website via FTP, for troubleshooting purposes and general file management.).
  2. Browse to your parent theme (wp-content > themes).
  3. Download a copy of the header.php file from your parent theme to your local workstation.
  4. Edit the downloaded header.php file using your preferred text editor.
  5. Pull up Google Tag Manager and go to the Admin tab.
  6. Click Install Google Tag Manager.
  7. Using the easy instructions provided, copy/paste the code snippets into the header.php file, and save.
  8. Using your FTP client, browse to the child theme folder.
  9. Upload your edited header.php to the root of your child theme folder.

Add Google Tag Manager to WordPress With Plugins

For those more comfortable with using plugins, rather than editing theme files directly, this section is for you.

One benefit of not editing theme files directly is it reduces the chance of missing out on updates/changes to parent theme files, like header.php. 

Note: Please remember to only have GTM set up for tracking using only one method.

For example, if you’re moving over to the plugin method, be sure to address any theme files you edited previously.

So, in our case, we no longer need to have a copy of header.php in our Child Theme, so we simply remove it.

Pro Tip: We recommend keeping a changelog of everything you do on your website, in terms of adding/editing/removing files, what solutions were added, and why.

SEOPress

Both the Pro and non-Pro version of SEOPress includes the ability to easily add Google Tag Manager.

  1. Pull up Google Tag Manager and go to the Admin tab.
  2. Click Install Google Tag Manager.
  3. In another browser tab, navigate to WordPress Dashboard > SEO > Google Analytics.
  4. Google Analytics > Enable.
  5. [HEAD] > Paste in your code snippet that can be found from step 2.
  6. [BODY] > Paste in your code snippet that can be found from step 2.
  7. Save changes.

Verify Google Analytics Tracking

  1. Ensure you are logged out of your MyListing website.
  2. Pull up Google Tag Manager and go to the Workspace tab.
  3. Click on the Preview button in the upper right corner of your screen.
  4. Enter your website URL.
  5. Click the ‘Start’ button.
  6. If all goes well, you should see a message that states you have successfully connected.
  7. Click the ‘Continue’ button’

Google Tag Manager Assistant

At this point, Tag Assistant will open a new window (“Debugger”) in the your  same browser, displaying the corresponding page you entered in step #3.

Once you start interacting with your website, the Tag Assistant browser tab will start to show things “firing” and at that point you know Google Tag Manager is working.

As long as you keep this window open, you remain in ‘Debugger Mode’, where you can look back at the Tag Assistant browser tab to see how things are working/not working.

  1. Close the “Debugger” browser window to disconnect and exit debugging mode.

Add Facebook Pixel Tag to Google Tag Manager

  1. Go to your Pixels tab in Facebook Event Manager.
  2. Click the Get Started button in the Facebook Pixel: Track Website Activities section.
  3. Put in your website name for your Pixel Name.
  4. Put in your website URL.
  5. Click Create.
  6. For the Install Facebook Pixel dialog box, click Connect a Partner Platform.
  7. Choose Google Tag Manager.
  8. Click Continue.
  9. Enable Turn On Automatic Advanced Matching.
  10. Click Continue.
  11. Choose your Google account.
  12. Select your desired Google Tag Manager account and container.
  13. Close.
  14. Go back to Google Tag Manager.
  15. Click Triggers.
  16. Click New.
  17. Click the Trigger Configuration box.
  18. Choose Page View.
  19. Click Save.
  20. Click Save.
  21. Click the Submit button in the upper right of your screen.
  22. Click Publish.
  23. Click Skip.

Verify Facebook Pixel Tracking

  1. Go to Facebook Event Manager.
  2. Select your Data Source (should be the name of the Pixel you just created).
  3. Go to the Test Events section.
  4. Browse your website pages.
  5. Look back in the Test Events section and you should start to see Page View entries appear under Receiving Activity.

Note: If you’re not seeing any activity, try viewing your website using a different browser than the one you’re logged into when configuring your Facebook Pixel and/or using the same browser in Private/Incognito mode.