How can I add customer email, phone, name to the 'purchase' event's datalayer?

How can I add customer email, phone, name to the 'purchase' event's datalayer?

By default, the extension does not add customer's personal data to the 'purchase' event. But it is possible to obtain the needed information by creating the conversion for the 'purchase' event and turning on the Enable Enhanced Conversion with User-Provided Data setting in Amasty Extensions > Google Analytics 4 with GTM > Google AdWords Conversion tab.


In order to locate Conversion ID and Conversion Label, follow these steps:
Step 1. Sign in to your Google Ads account.
Step 2. In your Google Ads account, click the Goals menu.
Step 3. Select Summary, which opens to the Conversion Actions table.
Step 4. Select the name of the conversion that you want to use from the Conversion action column (in our case it is 'purchase' event).
Step 5. Expand the tab for Tag setup to view the tag details.
Step 6. Select Use Google Tag Manager.
Step 7. Copy the Conversion ID and Conversion Label.
Step 8. Please, make sure to enable Enhanced Conversions for the conversion as well.


After filling in the settings, and turning on the Enable Enhanced Conversion with User-Provided Data setting, please, export the Json file with the variables, tags and events anew.


Import the file to the GTM container by navigating to Admin > Container > Import Container in the GTM account.



As a result, customer's email address, first and last name, phone number, email will be added to the Data Layer of the 'purchase' event.



      • Related Articles

      • Events are not firing in the GTM. How to fix this?

        The most common reason is the Tracking via Measurement Protocol functionality enabled for all the events. As a result, events are sent directly to Google Analytics servers via HTTP requests, and these events data are not added to the tag manager, so ...
      • Can I add Google Analytics cookies to the essential group?

        Essential cookies are a site's basic form of memory, used to store the settings selected by a user on a given site. As the name implies, they are essential to a website's functionality and cannot be disabled by users. On that note, neither Marketing ...
      • Will the module work with GTM?

        Out of the box, the module is tested and guaranteed compatible with the following ways of GTM implementation: 1) Magento's native Google Analytics functionality (Stores → Configuration → Sales → Google API → Google Analytics). 2) Amasty Google ...
      • How to install an Amasty PWA add-on?

        At the moment Amasty PWA add-ons are installed via yarn. The add-ons could be downloaded from the Products tab in the customer account after the purchase. Before starting the installation process, make sure that the Magento instance meets the ...
      • How do I specify estimated delivery time in the shipping method name?

        The specified delivery date/time is shown in shipping method's name for informational purposes only to let customers know how long they should wait for the order to arrive. Shipping Table Rates extension is unable to provide the options of delivery ...