> For the complete documentation index, see [llms.txt](https://docs.getlimy.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.getlimy.ai/limy-pixel/gtm-pixel/adding-limy-via-tag-manager.md).

# Limy E-commerce Pixel: add with GTM Template

This guide will help you add the Limy tags to a Google Tag Manager container

### General context

* The Limy E-commerce Pixel template for Google Tag Manager sends your shoppers key actions to Limy. You set it up in Tag Manager, with no new code on your site, as long as your site already sends these events to its data layer.
* Limy links each event to the AI assistant that referred the visit, so you can see which assistants bring shoppers who buy.
* Revenue is calculated from purchase events: the price of each product multiplied by its quantity.

### Assumptions: <a href="#what-you-already-have" id="what-you-already-have"></a>

1. You have GTM set up on your site.
2. The events you want to send to Limy are already in your data layer.

You also need your Limy token, which can be found in the Limy platform.

{% stepper %}
{% step %}

### Step 1: Add the Limy template to your container&#x20;

1. Get the template from [HERE](https://github.com/limyai/limy-ecommerce-pixel-gtm/releases/latest/download/template.tpl) and add it to your container.
2. Optional: save your Limy token as a Constant variable, so you can reuse it in every Limy tag.
   {% endstep %}

{% step %}

### Step 2: Create an init tag

1. Tag type: Limy Ecommerce Pixel.
2. Event Type: Initiate.
3. Trigger: All Pages.
   {% endstep %}

{% step %}

### Step 3: One Limy tag per event

For each event you want Limy to receive, create a tag.

1. Tag type: Limy Ecommerce Pixel.
2. Event Type: Track Event.
3. Event Name: choose the event for the tag.
4. Trigger: Custom Event with the name of the event your site pushes.
   {% endstep %}

{% step %}

### Step 4: Publish

**Optional: Preview**

Test your tags in Google's preview mode before you publish: [Google: Preview and debug containers](https://support.google.com/tagmanager/answer/6107056). Check that each Limy tag fires on its event.

**Publish**

Publish your Tags, so your website will load them.
{% endstep %}
{% endstepper %}

### Troubleshooting <a href="#troubleshooting" id="troubleshooting"></a>

Still stuck? Send the Limy team your GTM container ID, a screenshot of Tag Assistant, and the time of your test.
