# 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="<https://1923190518-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MhDVIwCi_IMhrBtbXDD-1972196547%2Fuploads%2FVxuNgRtnEmoBVPuNGmXJ%2Fgtm-template-2.1.0.json?alt=media&token=7b122cec-d2b5-4f82-ae87-7e0cb005b7a6>" %}
Save the content of the file as gtm-template.json
{% endfile %}

For Shopware 6.5 and older:

{% file src="<https://1923190518-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MhDVIwCi_IMhrBtbXDD-1972196547%2Fuploads%2FGB2OdSb92SfniotilyJ5%2Fgtm-template-1.1.2.json?alt=media&token=b8070f17-7339-4b7f-8db4-dccf4087e4b3>" %}
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.

![](https://1923190518-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MhDVIwCi_IMhrBtbXDD%2F-MhSjr-NX6PzywXPocdn%2F-MhSjyTy_7lydWKCZWfO%2Fimage.png?alt=media\&token=f40f95e1-8aeb-4175-854e-99d4c6573b89)

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.&#x20;
{% endhint %}

![](https://1923190518-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MhDVIwCi_IMhrBtbXDD%2F-MhSjr-NX6PzywXPocdn%2F-MhSkdOJASuFZGU33f96%2Fimage.png?alt=media\&token=41bc39df-fe19-445f-ac9f-0e2ca96fcba4)

## 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`.

![](https://1923190518-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MhDVIwCi_IMhrBtbXDD%2F-MhSjr-NX6PzywXPocdn%2F-MhSkjpEWLiLMaDRoe9-%2Fimage.png?alt=media\&token=753e1929-dbd7-41b9-8698-474c6cb287e6)
