What's my plan?
All Suites Growth, Professional, Enterprise, or Enterprise Plus
Support with Guide Professional or Enterprise

You can implement Google Tag Manager for your help center.

This article covers the following topics:
  • About Google Tag Manager
  • Implementing Google Tag Manager
  • Next steps

About Google Tag Manager

According to Google, "Google Tag Manager is a tag management system that allows you to quickly and easily update tags and code snippets on your website or mobile app, such as those intended for traffic analysis and marketing optimization. You can add and update AdWords, Google Analytics, Firebase Analytics, Floodlight, and 3rd party or custom tags from the Tag Manager user interface instead of editing site code."

Google Tag Manager requires you to implement the JavaScript and HTML embed code provided by Google Tag Manager in your help center (see Sign up for Google Tag Manager). From there, it’s able to dynamically embed code snippets into your site. The best part is that you manage the code from the Google Tag Manager interface, rather than implementing custom code in your help center.

Implementing Google Tag Manager

Follow these steps in the following sections to implement Google Tag Manager for your help center:
  • Sign up for Google Tag Manager
  • Add the embed code to your help center
  • Create your tag in Google Tag Manager
  • View changes in your help center

Sign up for Google Tag Manager

First, you need to sign up for a free Google Tag Manager account.

  1. Sign up for Google Tag Manager for free.
  2. Set up a new account.

    Be sure to select Web as Where to use the container.

  3. Once your new container is created, copy the two snippets of code to embed in your help center.

Add the embed code to your help center

Now you'll paste the embed code from Google Tag Manager into two templates in your help center theme.

  1. In Knowledge admin, click Customize design () in the sidebar.
  2. Click Customize on the theme you want to edit.
  3. Click Edit code.
  4. Paste the first snippet in the Document Head (document_head.hbs) template.

  5. Paste the second snippet in the Header (header.hbs) template.

  6. Save your changes.

Create your tag in Google Tag Manager

From here you’ll need to create a tag to test out in your new container. See Set up and install Tag Manager in Google Tag Manager Help.

View changes in your help center

Now you can see the tag you built in your help center. Refresh the preview of your help center to view your new tag.

Next steps

Now, you’ve configured a container and an example tag from Google Tag Manager and embedded it into your help center.

Google Tag Manager is an incredibly powerful tool for managing analytics and traffic performance tools. Google has put together a lot of resources on use and best practices with Google Tag Manager here.

Powered by Zendesk