> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.spreadsimple.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Setting up Google Tag Manager

Use Google Tag Manager to manage all your website tags without editing code. 

### To set up Google Tag Manager:

1. Create a new account at [Google Tag Manager](https://tagmanager.google.com/) (refer to [this article](https://support.google.com/tagmanager/answer/14842164) for more guidance).

2. Copy the **GTM Container ID** from the accounts list:

![](https://storage.crisp.chat/users/helpdesk/website/918f9541750fe800/gtm-id_gxiuhz.png)

3. In your SpreadSimple Dashboard, open `Add-ons` Tab and select Google Tag Manager. Then toggle on **Enable**.

4. Paste the ID and click **Save**. 

![](https://storage.crisp.chat/users/helpdesk/website/918f9541750fe800/gtm2_pxr0ge.png)

5. Publish your website.

### Tracking Events

As you can see, we support the tracking Events feature. 

It means that after a customer makes a purchase on your website, their order information (like total amount, items quantity, etc) can be sent to your Google Tag Manager. Then you can redirect this event to any analytics services or tools of your choice to analyze the conversion and other e-marketing metrics. 

We recommend you to set up Google Tag Manager and connect Google Analytics there.

###### To enable Track Purchase Events:

1. Toggle on **Track Purchase Events**.

2. Insert currency in ISO 4217 code e.g. USD, EUR, etc (you can find your currency code [here](https://en.wikipedia.org/wiki/ISO_4217)) and click **Save**. 

![](https://storage.crisp.chat/users/helpdesk/website/918f9541750fe800/gtm-tpe_4glmnj.png)

3. Publish your website.

###### For our tech-savvy users

Here's a sample of dataLayer event that will be sent after a customer makes the purchase:

`dataLayer.push({
  "event": "purchase",
  "ecommerce": {
    "purchase": {
      "value": 3775,
      "currency": "USD",
      "items": [
        {
          "item_id": "FTC-1221",
          "item_name": "Fabric three-cushion sofa",
          "item_price": 1385,
          "quantity": 1
        },
        {
          "item_id": "VHS-1212",
          "item_name": "Velour home sofa",
          "item_price": 1195,
          "quantity": 2
        }
      ]
    }
  }
})`
