Submit a template to the Community Template Gallery

  • The Google Tag Manager Community Template Gallery allows organizations to create and share custom templates with Tag Manager users worldwide.

  • Organizations benefit by increasing brand visibility, enabling faster tag deployment for clients, and ensuring easy template updates.

  • Submitting a template involves building and testing it, preparing project files (template.tpl, metadata.yaml, LICENSE, and README.md), uploading to a GitHub repository, and then submitting the repository URL through the Gallery interface.

  • Template updates are managed through the metadata.yaml file by adding new version entries with the corresponding commit SHA and change notes.

The Google Tag Manager Community Template Gallery allows your organization to create and manage tag and variable templates that natively integrate with Google Tag Manager. Your organization can build a template, publish the template repository to GitHub, and then submit your template to the Community Template Gallery to make it available to users worldwide. The benefits to your organization include:

  • Your clients will be able to add and use your templates easily.
  • Tag Manager users will be exposed to your organization's brand.
  • Your clients will be able to deploy your tags within minutes, not months.
  • You can publish updates to your templates and make those updates automatically available to your clients.

The process to submit a new template to the Community Template Gallery involves these main steps:

  1. Build your template
  2. Prepare your project files
  3. Upload your files to GitHub
  4. Submit your template

Build your template

To get started, build your template in Google Tag Manager as a custom template. Make sure your template has been thoroughly tested, that the content of your template follows the Style Guide, and that you have a plan or process in place for how to maintain and update your template should the need to do so arise in the future.

Terms of Service

Every new template submission must agree to the Google Tag Manager Community Template Gallery's Terms of Service. To confirm agreement to the Terms of Service for your template:

  1. Read the Google Tag Manager Community Template Gallery Terms of Service.
  2. In the Template Editor, open your template for editing and check the box under the Info tab labeled "Agree to the Community Template Gallery Terms of Service".

Export your template

Once your template is complete, export the template file to your local machine and rename the file template.tpl.

Prepare your project files

The next step is to prepare your repository for publishing on GitHub. Each repository should contain the following files:

  1. An exported template file named template.tpl. This file must be updated to add a categories entry.
  2. A metadata.yaml file.
  3. A LICENSE file. Filename must be in ALL CAPS and the contents of the license file must be only Apache 2.0.
  4. Add a README.md file (optional, but recommended).

Add categories to template.tpl

Update your template.tpl file with a categories entry to the INFO section, and provide at least one relevant category value selected from the following table. If more than one category is appropriate, you can provide up to three category values, ordered from most relevant to least relevant.

Example:

___INFO___

{
  "displayName": "Example Template",
  "categories": ["AFFILIATE_MARKETING", "ADVERTISING"],
  // additional template properties, etc...
}

Table of supported category values:

Category Description
ADVERTISING Advertising
AFFILIATE_MARKETING Affiliate marketing
ANALYTICS Analytics
ATTRIBUTION Attribution
CHAT Chat
CONVERSIONS Conversion measurement
DATA_WAREHOUSING Data Warehousing
EMAIL_MARKETING Email Marketing
EXPERIMENTATION A/B experiments and content optimization
HEAT_MAP Heat maps
LEAD_GENERATION Lead generation
MARKETING Marketing
PERSONALIZATION Personalization
REMARKETING Remarketing
SALES Sales and CRM
SESSION_RECORDING Session recordings
SOCIAL Social
SURVEY Surveys
TAG_MANAGEMENT Tag management systems
UTILITY Google Tag Manager utilities

metadata.yaml

The metadata.yaml file contains information about your template, including links to your organization's homepage, template documentation, and version information. Each version is denoted by a change number, also known as a SHA number, which is the change number associated with the Git commit. The changeNotes field is optional, but recommended, to inform your users of the changes included in the version.

To set up your metadata.yaml file:

  1. Add an entry homepage. This should be a URL that points to your organization's home page.
  2. Add an entry for documentation. This should be a URL that points to documentation for your template.
  3. In GitHub, find the commit that includes the changes that you want to push for your initial version of your template and copy the SHA number. An easy way to get the SHA number in GitHub is to go to a commit view and click the clipboard icon (