GA4 Ecommerce Tracking For ResBook

To complete this tracking, you may need access to:

  • Google Tag Manager

  • ResBook Admin Panel

  • Google Analytics GA4 Property

NOTE These instructions assume the client already has UA Ecommerce Tracking Set Up

The below instructions outline the full process of creating GA4 Ecommerce Tracking for a ResBook client. HOWEVER this is the shortcut using the importing function of GTM

GTM SHORTCUT

  1. Go to GTM Container

  2. Go to Admin Settings

  3. Select Import Container

  4. Choose Container File → Digital Performance Folder → Digital Marketing Templates → Tracking → GA4 Ecommerce Tag + variables - GTM Import.json

  5. Choose Existing Workspace → Default Workspace/most recent workspace

  6. Select Merge Import option

  7. Should look like this

  8. Confirm.

  9. This will create the GA4 Ecommerce Tag, Trigger and 11 Variables needed for GA4 Ecommerce Tracking.

  10. Open up new GA4 Purchase tag and ensure the Configuration Tag is the clients GA4 Variable.

  11. Publish Container

  12. You will need to wait till the next eCommerce purchase occurs to confirm this is working.

Creating GA4 Purchase Tag

  1. Create a new GTM Tag and call it “GA4 Purchase Tag”

  2. Tag Type = Google Analytics: GA4 Event

  3. Configuration Tag = GA4 Configuration Tag (or your base GA4 install tag)

  4. Event Name = purchase  **must be lowercase

  5. Create Event Parameters. This step is time-consuming but it is important. Event parameters are what translate the eCommerce data layers on the website to metrics GA4 can measure and report on. Each parameter needs to be set up as its own line, with its own customer variable as the value.

 

                               i.     Let us step you through the first one for the Parameter Name of “value”

                             ii.     Add an event parameter and call it “value”.

                           iii.     In the Value field next to it, select the battery icon

                           iv.     Then select the PLUS in the top right to create the custom variable.

                             v.     Name the Variable “Ecommerce Revenue Variable”

                           vi.     Variable Type = Data Layer Variable

                         vii.     Data Layer Variable Name: ecommerce.purchase.actionField.revenue

                       viii.     It should look like the below. Push SAVE

It should then look like the below in the GA4 Purchase Tag

6.  This needs to be repeated for the other 10 variables below:

 

Parameter Name

Value

Data Layer Variable Name

value

Ecommerce Revenue Variable

ecommerce.purchase.actionField.revenue

transaction_id

Ecommerce Transaction ID Variable

ecommerce.purchase.actionField.id

affiliation

Ecommerce Affiliation Variable

ecommerce.purchase.actionField.affiliation

items

Ecommerce Product Variable

ecommerce.purchase.products

currency

Ecommerce Currency Variable

cCurrency

item_category

Ecommerce Item Category Variable

ecommerce.purchase.products.category

item_id

Ecommerce Item ID Variable

ecommerce.purchase.products.id

price

Ecommerce Item Price Variable

ecommerce.purchase.products.price

quantity

Ecommerce Item Quantity Variable

ecommerce.purchase.products.quantity

item_name

Ecommerce Product Name Variable

ecommerce.purchase.products.name

tax

Ecommerce Tax Variable

ecommerce.purchase.actionField.tax

 

 

­After completing doing so, it should look like this

7. Set the Trigger for the tag

8. Click the blue Plus to create a Trigger

9. Name the Trigger “GA4 Purchase Trigger”

10.     Trigger Type = Custom Event

11.     Event Name = RBTransactionComplete

12.     This trigger fires on  = All Custom Events

13.     Save

14.     Last step is to Publish the container.