# Setup

Setting up tracking is done in a few steps on the Shopware shop.

## Set up account <a href="#set-up-account" id="set-up-account"></a>

The first step is, as always, to set up the account. Of course, you can do it manually OR you import a ready-made template with all variables, triggers & tags for Facebook, Google Ads, Google Analytics, Pinterest & Hotjar, which we have prepared especially for you 😃

You can find the template here. If necessary you have to put the content of the page into a separate .json file (e.g. template.json):\
\
For Shopware 6.6 and newer:

{% file src="/files/prOHKx5wmBWVKYOTszpe" %}
Save the content of the file as gtm-template.json
{% endfile %}

For Shopware 6.5 and older:

{% file src="/files/OfjQlrehIu7Dnw3WGPwJ" %}
Save the content of the file as gtm-template.json
{% endfile %}

To import the template, you have to go to `Admin > Import Container` in your Google Tag Manager container (Web) and upload the JSON file.

![](/files/-MhSjyTy_7lydWKCZWfO)

Make sure you change all the tracking IDs with the value "CHANGE\_IT". This includes:

* Facebook - Pixel ID
* Google Ads - Conversion ID
* Google Ads - Conversion - Add to cart - Conversion label
* Google Ads - Conversion - Purchase - Conversion label
* Google Ads - Conversion - View item - Conversion label
* Google Ads - Conversion - View item list - Conversion label
* Google Ads - Conversion - View search results - Conversion label
* Google Ads - Dynamic remarketing - Add to cart - Conversion label
* Google Analytics - Tracking ID
* Hotjar - Site ID
* Pinterest - Tag ID

## Enable tracking <a href="#enable-tracking" id="enable-tracking"></a>

To activate the Google Tag Manager, you have to go to `Extensions > My Extensions > Apps` in the admin and then at the app "Google Tag Manager" right click on `... > Configuration` on the right.

Now you are in the settings for the app. Next, you need to complete the following two steps: First you have to check the checkbox `Enable tracking` and then you have to enter the `Container ID`. If you now click on the `Save` button, the tracking should be active.

{% hint style="info" %}
**Tip**

If necessary, it might make sense to explicitly clear the store cache again if no data is transferred at first attempt.
{% endhint %}

![](/files/-MhUuRO0xQ7o-2kkrlPK)

## Enable event debugging <a href="#enable-event-debugging" id="enable-event-debugging"></a>

To understand exactly which data is sent to Google Tag Manager at which point, there is the possibility to get a detailed view in the Javascript console.

Simply activate the checkbox `Enable pixel event debugging in Javascript console` and then press the button `Save`.

![](/files/-MhSkjpEWLiLMaDRoe9-)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.shop-studio.io/shopware/extensions/google-tag-manager-cloud/setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
