> For the complete documentation index, see [llms.txt](https://docs.adpage.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.adpage.io/extensions/plugins/magento-module.md).

# Magento Module

Install and validate AdPage Tagging for your Magento store.

Use the AdPage Tagging Magento module to add ecommerce tracking to your store.

<a href="https://github.com/AdPageGroup/Magento/releases" class="button primary" data-icon="github">Download the latest release</a>

### Before you start

Have access to your Magento admin, server, and Google Tag Manager container. Remove duplicate ecommerce tracking before testing the module.

Back up your store and test the installation on a staging environment first.

### Install the module

{% stepper %}
{% step %}

#### Download AdPage Tagging

Open the release page and download the latest module release. Review the release notes before upgrading an existing installation.
{% endstep %}

{% step %}

#### Install and configure the module

Install the downloaded release using the included release instructions. In Magento admin, open the AdPage Tagging configuration and complete the required setup for your store.
{% endstep %}

{% step %}

#### Publish your changes

Save the module configuration and publish your Google Tag Manager container. Use preview mode before publishing production changes.
{% endstep %}
{% endstepper %}

### Validate the installation

Use Google Tag Manager Preview to test your storefront. Complete these actions during one test session:

1. View a product list and product page.
2. Add an item to the cart and begin checkout.
3. Place a test order and open the success page.

Confirm the expected `trytagging_*` events appear in the data layer. Check prices, currency, product IDs, quantities, and transaction IDs.

### Available Magento events

The module provides ecommerce events across the purchase journey:

* `trytagging_view_item_list`
* `trytagging_view_item`
* `trytagging_add_to_cart`
* `trytagging_view_cart`
* `trytagging_remove_from_cart`
* `trytagging_begin_checkout`
* `trytagging_add_shipping_info`
* `trytagging_add_payment_info`
* `trytagging_purchase`

It also sends `trytagging_user_data` on every page. See [AdPage's ecommerce dataLayer](https://docs.adpage.io/extensions/cms-tracking/adpages-ecommerce-datalayer.md) for event parameters.

{% hint style="warning" %}
Do not test purchases with a live payment method. Use a Magento test payment method or a staging store.
{% endhint %}

### Troubleshooting

If events do not appear, confirm the module is enabled. Then clear Magento caches and verify your Google Tag Manager container ID.

If events duplicate, disable overlapping ecommerce or tag-manager integrations. Retest in an incognito window after clearing your cart.

### Settings

#### Include lifetime value

This setting will give the total amount of value a user has spend and will only show this if the user is logged in, in the front-end of the website.

#### Debug

Is used to add logging for debugging

#### Choose script placement

This option will disable the tracking scripts in the module.\
\
If you want to control on where the scripts are placed you can enable this option. Then the module will not load the files and you have to do it on your own. \
\
NOTE; If all necessary scripts are not included, tracking will not function

#### Change webhook trigger

This will set the order status trigger for sending the webhook.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.adpage.io/extensions/plugins/magento-module.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
