Skip to content

Commit

Permalink
Merge pull request #76 from elgentos/WouterSteen-patch-8
Browse files Browse the repository at this point in the history
Removed userid From transaction Object
  • Loading branch information
WouterSteen authored Feb 5, 2025
2 parents b543900 + 5c1f085 commit beb8a5f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
4 changes: 0 additions & 4 deletions Model/GAClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ public function setTrackingData(DataObject $data): void
$this->getRequest()->setClientId($data->getClientId()); // '2133506694.1448249699'

$this->getRequest()->setTimestampMicros($this->getMicroTime());

if ($data->getUserId()) {
$this->getRequest()->setUserId((string) $data->getUserId()); // magento customer_id
}
}

public function getRequest()
Expand Down
7 changes: 1 addition & 6 deletions Model/SendPurchaseEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,7 @@ public function execute(Order $order, string $eventName = 'unknown')
'document_path' => '/checkout/onepage/success/'
]
);

$userId = $order->getCustomerId();
if ($userId) {
$trackingDataObject->setData('user_id', $userId);
}


$transactionDataObject = $this->getTransactionDataObject($order, $elgentosSalesOrder);
$products = $this->collectProducts($order);
$userData = $this->collectUserData($order);
Expand Down

0 comments on commit beb8a5f

Please sign in to comment.