# Google Tag Manager

The tracking setup works via the `Google Tag Manager Pixel` and is done in a few steps.

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

You can configure the following steps per sales channel & language individually, which ultimately gives you more tracking flexibility.
{% endhint %}

### 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%2FUxGe5cYViRFhfl9yqXnD%2Fgtm-template-2.0.0.json?alt=media&token=d78e8469-22f6-481f-b426-8eda60edad22>" %}

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%2FdfNF2KUYrkTErQeiwvGt%2Fgtm-template-1.5.0.json?alt=media&token=980215e9-021d-4c61-9bdd-acbc0c92cdb6>" %}
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-Mj0Hj_BUYlmqVKtft44%2F-Mj0HqV2ZxFM_8EyRrsc%2Fimage.png?alt=media\&token=faaa37bf-10ec-4e83-997f-2fab7af5802b)

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 - Begin checkout - 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 - Remarketing - Add to cart - Conversion label
* Google Ads - Remarketing - Purchase - Conversion label
* Google Ads - Remarketing - View item - Conversion label
* Google Analytics - Tracking ID
* Hotjar - Site ID
* Pinterest - Tag ID

{% hint style="warning" %}
**Attention**

Use at least Pixel Your Shop version 1.8.0 so that everything works smoothly with the GTM template. Previous versions have less data for Google Tag Manager.<br>
{% endhint %}

### Activate tracking <a href="#activate-tracking" id="activate-tracking"></a>

To activate the `Google Tag Manager Pixel` you have to go to `"Your sales channel" > Pixel Your Shop > Google Tag Manager` in Admin and activate the `Opt-In` switch.

### Connect accounts <a href="#connect-accounts" id="connect-accounts"></a>

After activation, you simply need to add your `Google Tag Manager Container ID`. Note that you must can also connect multiple accounts at the same time by simply placing multiple IDs in the same input.

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

By default, all tracking events are disabled. To activate the individual events you simply have to activate the corresponding switch. If you do not know exactly which events you need, we recommend simply activate all tracking events. Collecting more data can never hurt!
