Adding custom dataLayer item - receipt event

Created on 12 November 2024, about 1 month ago

Problem/Motivation

Client needs to understand if the customer is new or returning from a Guest / Logged Account Drupal perspective.

Proposed resolution

Simply added a line of code to line 63 in Event/Commerce/PurchaseEvent - but would like to understand how to do this without hacking the module...

 $result = [
      // Add the ability to pass whether a user is logged in or not to the purchase event as a User dimension
      'is_guest'=> $order->getCustomer()->isAnonymous(),

Maybe worth adding the code as is to the module - or document how to override / extend the PurchaseEvent?

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom newaytech

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024