> For the complete documentation index, see [llms.txt](https://docs.magecomp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.magecomp.com/magento-2-google-analytics-4-with-gtm/google-tag-manager-import-container.md).

# Google Tag Manager Import Container

Now go to your Google Tag Manager dashboard, select the **Admin** tab, and then click on the **Import Container** option.

<figure><img src="https://807210804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8wMgNeFnYjVGQmgdxMv4%2Fuploads%2FqoV7VvBtye5EdHjlW9Da%2FImport%20container.png?alt=media&amp;token=91ed89af-20f3-421a-976f-2ac06817bd03" alt=""><figcaption></figcaption></figure>

Now **upload JSON file** to be imported, **select workspace**, and choose the **import option**. After that, click on the **Add to Workspace** button.

<figure><img src="https://807210804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8wMgNeFnYjVGQmgdxMv4%2Fuploads%2F5rWNjoj9EGNg4H42UZdB%2FUpload%20json%20file.png?alt=media&amp;token=4a46f601-32c3-4ae3-9330-e330cbce1c4a" alt=""><figcaption></figcaption></figure>

Click on **Preview** to see if the event triggered on the frontend or not.

<figure><img src="https://807210804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8wMgNeFnYjVGQmgdxMv4%2Fuploads%2FAcf7zl7MNjWJRJusWbaT%2FPreview.png?alt=media&amp;token=7d1f5d4a-58c9-44f5-8e63-e930ad58e29b" alt=""><figcaption></figcaption></figure>

Click on **Connect** to see the Google Tag Manager preview on your site

<figure><img src="https://807210804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8wMgNeFnYjVGQmgdxMv4%2Fuploads%2FHxVE3Y8JSD1W5J2p5BNL%2FConnect.png?alt=media&amp;token=51796d7b-f25c-4da6-b7c3-3cb418c8c007" alt=""><figcaption></figcaption></figure>

Google Tag Manager tracking event for **home page**

<figure><img src="https://807210804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8wMgNeFnYjVGQmgdxMv4%2Fuploads%2FDVRSzWKBk5HxwxskFwGX%2FHome%20page.png?alt=media&amp;token=75d930af-e9c7-4dd3-8b61-f678bff42e1e" alt=""><figcaption></figcaption></figure>

Google Tag Manager tracking event for **category page**

<figure><img src="https://807210804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8wMgNeFnYjVGQmgdxMv4%2Fuploads%2F2Tqy5rDWCF70ls8KjlVE%2FCategory%20page.png?alt=media&amp;token=c368acee-864d-4f0d-8f12-b579c8d0097c" alt=""><figcaption></figcaption></figure>

Google Tag Manager tracking event for **product view page**

<figure><img src="https://807210804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8wMgNeFnYjVGQmgdxMv4%2Fuploads%2FAHQ7LhqWgzcv5pGQCZ8H%2FProduct%20view%20page.png?alt=media&amp;token=50e110de-4219-4f70-b167-5b971880082b" alt=""><figcaption></figcaption></figure>

Google Tag Manager tracking event for **add to cart**

<figure><img src="https://807210804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8wMgNeFnYjVGQmgdxMv4%2Fuploads%2Fg0ZDJM76P1KVmnxzfkcd%2FAdd%20to%20cart.png?alt=media&amp;token=214daf54-b043-4bc5-80b9-5c79a58a26ee" alt=""><figcaption></figcaption></figure>

Google Tag Manager tracking event for **shopping cart**&#x20;

<figure><img src="https://807210804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8wMgNeFnYjVGQmgdxMv4%2Fuploads%2FfIrWkeULPlM7ODA4LVbM%2FShopping%20cart.png?alt=media&amp;token=b88c3769-04e3-4b2a-b106-131956169d2c" alt=""><figcaption></figcaption></figure>

Google Tag Manager tracking event for **checkout (shipping & payment method)**

<figure><img src="https://807210804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8wMgNeFnYjVGQmgdxMv4%2Fuploads%2FlUwh9BQwIc3rnys0DNyG%2FCheckout.png?alt=media&amp;token=27e83a64-67f0-43bf-97dc-d0d0f22747f2" alt=""><figcaption></figcaption></figure>

Google Tag Manager tracking event for **success page**

<figure><img src="https://807210804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8wMgNeFnYjVGQmgdxMv4%2Fuploads%2F9SJD9If9n5XcvDG53oTd%2FSuccess%20page.png?alt=media&amp;token=a433e85b-7bfc-4bc4-8364-62a0852991e4" alt=""><figcaption></figcaption></figure>

Google Tag Manager **purchase data layer**

<figure><img src="https://807210804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8wMgNeFnYjVGQmgdxMv4%2Fuploads%2F9uoOWPB8v2lo8jqx5ht4%2FPurchase%20data%20layer.png?alt=media&amp;token=766db871-d39d-42c6-9504-1f9b32e32145" alt=""><figcaption></figcaption></figure>

Auto-generated JSON file contains the following

**Tags**

<figure><img src="https://807210804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8wMgNeFnYjVGQmgdxMv4%2Fuploads%2FrRcVqzwZtijO9i2oynd1%2FTags.png?alt=media&amp;token=9bc4d77d-5c8f-4e63-bc5c-bdd2c8539ddf" alt=""><figcaption></figcaption></figure>

**Triggers**

<figure><img src="https://807210804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8wMgNeFnYjVGQmgdxMv4%2Fuploads%2FsEwhUz7yj5xavicH0gys%2FTrigger.png?alt=media&amp;token=1889cf35-819c-4287-8ecc-9cf73d22bac8" alt=""><figcaption></figcaption></figure>

**Variables**

<figure><img src="https://807210804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8wMgNeFnYjVGQmgdxMv4%2Fuploads%2FNkByI56qOI7Sg9RBr7nU%2FVariables.png?alt=media&amp;token=2edaae3e-89cf-4e72-89f9-906d6546eed3" alt=""><figcaption></figcaption></figure>

**Folders**

<figure><img src="https://807210804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8wMgNeFnYjVGQmgdxMv4%2Fuploads%2FaN1zpvJYJmVdNgU5NDVK%2FFolders.png?alt=media&amp;token=1ac5eb14-cb7e-4d8c-8cdc-db0a316f94eb" alt=""><figcaption></figcaption></figure>
