Google Tag Manager Integration

Send events to Klime directly from Google Tag Manager.

Overview

The Google Tag Manager integration lets you send events to Klime directly from GTM, with no code changes needed. If your team already manages tracking through GTM, this is the fastest way to get started with Klime.

GTM supports track, identify, and group events, which map directly to Klime's event model.

Setup

  1. Download the Klime template
  2. In Google Tag Manager, go to Templates > Tag Templates > New
  3. Click the three-dot menu (⋮) in the top-right and select Import
  4. Upload the downloaded template file, then click Save
  5. Go to Tags > New > Tag Configuration and select Klime from the Custom section
  6. Enter your Write Key from Settings > Integrations
  7. Choose the Event Type (Track, Identify, or Group)
  8. Configure the event fields (see below)
  9. Add a Trigger to control when the tag fires
  10. Click Save, then Submit and Publish your container

Event types

Track

Sends a custom event to Klime. Configure:

  • Event Name (required) — The name of the event, e.g. page_view, button_click
  • User ID (optional) — The user performing the action
  • Properties — Key-value pairs with additional data about the event

Identify

Associates traits with a user. Configure:

  • User ID (required) — The user to identify
  • Traits — Key-value pairs like name, email, plan

Group

Associates a user with a group (e.g. a company). Configure:

  • Group ID (required) — The group's unique identifier
  • User ID (optional) — The user to associate
  • Traits — Key-value pairs like company_name, industry, plan

Without group events, Klime receives your events but can't attribute them to specific companies. Your dashboard will show events are arriving but company-level metrics will be empty.

Learn more about GTM group routing.

Using GTM variables

All text fields support GTM variables. For example, you can set User ID to {{User ID}} or Event Name to {{Event}} to pull values dynamically from the data layer or other variables.

How it works

The Klime tag loads the Klime browser SDK and calls the appropriate method. Events are batched and sent to Klime's ingestion API with automatic retries and flush-on-unload, so you get the same reliability as a direct SDK installation.

Write Key

You can find your write key in Settings > Integrations. Store it securely and avoid sharing it publicly.