---
title: "Install website tracking with Google Tag Manager Template"
description: "Watch a video walkthrough: alt text{height=315 width=560} Prerequisites Tracklution account (create one at www.tracklution.com) Google Tag Manager account <section class=\"info box\" If you are using this GTM template with a<strong &nbsp;Tracklution private server</strong , you should use your private server's subdomain as /path with the first party container's domain. This format is automatically provided in the installation instructions of each container in your private serve…"
slug: "gtm-template"
category_slug: "data-sources"
category_name: "Data Sources"
order: 4000000007
published_at: "2025-06-26T10:30:33+00:00"
updated_at: "2026-04-16T08:26:27+00:00"
language_code: "en-US"
tags: []
---

## Watch a video walkthrough:

![alt text](video:https://www.youtube.com/watch?v=2FF-koaHqB0){height=315 width=560}

## Prerequisites

- Tracklution account (create one at [www.tracklution.com)](www.tracklution.com%29)
- Google Tag Manager account

<section class="info-box">If you are using this GTM template with a<strong>&nbsp;Tracklution private server</strong>, you should use your private server's subdomain as /path with the first-party container's domain. This format is automatically provided in the installation instructions of each container in your private server. <br><br>Example: if LeadSpark uses a private server on subdomain leadspark.tracklution.com, then the container's first-party domain would be tralut.website.com/leadspark.</section>
## Step 1: Install the Tracklution Template

1. Open your Google Tag Manager (GTM) container.
2. Go to the Templates section.
3. Click Search Gallery under Tag Templates.
4. Search for Tracklution.
5. Select the official Tracklution tag template (look for the verified checkmark).
6. Click Add to Workspace.

The template works like the standard script method, but with fewer manual errors and easier tag maintenance.

## Step 2: Create a PageView Tag

1. Go to the Tags section and click New.
2. Choose the Tracklution tag type.
3. In the Container ID field, paste your ID from the Tracklution installation instructions (Installation-tab) or from your container info (visible at the end of the dashboard):
    - Log in at tracklution.com
    - Go to Installation-tab
    - Copy the Container ID (looks like "LS-12345678-9")
    - Copy the Tracklution domain (looks like "tralut.myshop.com")
4. Choose PageView as the event type.
5. Add a trigger like All Pages or Initialization - All Pages.
6. Name the tag clearly (e.g. Tracklution - PageView) and click Save.

![templatepageview](https://support.tracklution.com/kb/agent/attachment/article/7/inline?token=eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEyNCIsIm9yZ2lkIjoiMTQ3NzgiLCJpc3MiOiJzdXBwb3J0LnRyYWNrbHV0aW9uLmNvbSJ9.TQZ6XgCZ80itr0KjBuTZUSvA8FMkdeKEYEsAl7VBfAU)

The GTM template reads consent status automatically from the GTM data layer if you're using built-in Consent Mode. No extra configuration is needed. For manual consent integration, refer to the [documentation on implementing Cookie Consent manually](https://support.tracklution.com/kb/article/30/compatibility-with-cookie-banners-and-consent-mode-v2#loading-tracklution-tags-always-%28%22advanced-consent-mode%22%29).
<section class="info-box">Additional Configuration: Main Tag Loading is&nbsp;<strong>Depreciated</strong>. If you have or have not been using this setting, no changes are needed in either case.</section>
## Step 3: Implement other events

1. Create a new tag using the Tracklution tag type.
2. Paste your Container ID and Tracklution Domain
3. Select the event name (e.g. CompleteRegistration)  
![templatecompleteregistration](https://support.tracklution.com/kb/agent/attachment/article/7/inline?token=eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEyOSIsIm9yZ2lkIjoiMTQ3NzgiLCJpc3MiOiJzdXBwb3J0LnRyYWNrbHV0aW9uLmNvbSJ9.tB3L66mc5vb-K8RuQeSDIF-Y-W8Q01QGIRKnkrYNxYk)
4. Optional: Add custom parameters. Custom parameters in your events let you send detailed, relevant data like user email, product ID, or plan type.
    - The key is the name of the parameter. It identifies what the data represents. For example: user\_id, transaction\_value, or product\_name
    - The value is the data or variable that will be sent with the key. It can be:
        - A static value (e.g., 12345, "thank-you-page")
        - A GTM variable, such as {{Page URL}}, {{Click Text}}, or {{Custom JavaScript}}. It dynamically pulls the value at runtime when the tag fires.
    - **What if I don't have data layer variables?** (Nothing relevant pops up when I start typing {{). Please contact your Google Tag Manager administrator / web developer. Here's Google's article on how to create custom variables in GTM. [https://support.google.com/tagmanager/topic/9125128](https://support.google.com/tagmanager/topic/9125128)
5. Add a suitable trigger (e.g., button click, form submission).
6. Name the tag and Save.

## Step 4: Set DNS for First Party Data Collection

Setting up the DNS CNAME allows Tracklution to load scripts under your own domain, enabling the use of First Party Cookies. This improves data accuracy, ensures more reliable tracking, and helps you get the most out of your tracking setup. See instructions from here: [First-Party Mode (DNS)](https://support.tracklution.com/kb/article/12/first-party-mode-dns).

## Validate your setup

Example with GTM -&gt; you can sometimes see tags firing in Preview, but no data seen in Tracklution's dashboard. This usually means that the tag fired, but the network request to your server failed -&gt; common causes are [CSP](https://support.tracklution.com/kb/article/53/content-security-policy-csp "https://support.tracklution.com/kb/article/53/content-security-policy-csp") or network restrictions before [first-party mode](https://support.tracklution.com/kb/article/12/first-party-mode-dns "https://support.tracklution.com/kb/article/12/first-party-mode-dns") is configured.

Once you have installed all events, you can validate your installation with these instructions: [Tracklution Dashboard: Event Validation & Debugging](https://support.tracklution.com/kb/article/28/tracklution-dashboard-event-validation--debugging)
<section class="warning-box">Note! If you use the&nbsp;Google Tag Manager's preview and debug mode, Tracklution will deduplicate the Purchase and Lead events you create automatically as it recognizes these come from the same user.&nbsp;</section>
