This template variable would convert the classic/standard e-commerce transaction data layer into a Custom Object that can be used in the GA4 event tag to send the purchase event.
- Once the template is downloaded from the Gallery (or imported using this repository), go to
Variables
>New
>GA4 Purchase Custom Object from Standard Ecommerce DataLayer
- Enter the Currency code manually or reference it to a variable (currency is a required parameter in GA4)
- Give a name to the variable & Save
- Open the GA4 purchase event tag & go to
More Settings
- Expand
Ecommerce
- Check
Send Ecommerce data
- Select
Custom Object
from the Data Source drop down - Select the variable from the Ecommerce Object drop down