# Configuration

Once you have successfully installed the extension and created an account in Google Analytics and Google Tag Manager, go to **Stores -> Configuration** to configure the extension for use.

**Google Tag Manager**

<figure><img src="/files/n239kPPkJAPmdT1xU2Iy" alt=""><figcaption></figcaption></figure>

* **Enable GTM -** Enable or disable extension from here.
* **GTM and GA4 Regular Code -** Paste the GTM \<head> code and GA4 script you received and the time of account creation respectively.
* **GTM No-Script Code -** Paste the GTM \<body> code.

**Container Import**

<figure><img src="/files/D8Q8uEhVuQBDRBllqktC" alt=""><figcaption></figcaption></figure>

* **GTM: Account ID -** Enter the GTM Account ID received at the time of account creation from the URL.
* **GTM: Container ID -** Enter the GTM Account ID received at the time of account creation from the URL.
* **GA4: Measurement ID -** Enter the GA4 Measurement ID received at the time of account creation from the URL.
* **Download File for Google Analytics 4 -** Click this button to download the predefined JSON file that you need to upload to the Google Tag Manager dashboard.&#x20;

**Attribute Mapping**

<figure><img src="/files/9ph5PaF7lspMX0OqMxoZ" alt=""><figcaption></figcaption></figure>

* **Product Identifier -** Select the product identifier as ID or SKU.
* **Brand -** Select the product attribute from the dropdown menu.
* **Custom Dimensions and Metrics -** Set the dimensions and attributes for configurable products.
* **Identifier Resolution -** Select the identifier as parent or child.


---

# 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.magecomp.com/magento-2-google-analytics-4-with-gtm/configuration.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.
