You are here

private function EventStorageService::hash in Commerce Google Tag Manager 8.2

Same name and namespace in other branches
  1. 8 src/EventStorageService.php \Drupal\commerce_google_tag_manager\EventStorageService::hash()

Compute a hash from the given event data.

Parameters

array $event_data: The event data to store.

Return value

string The hash value.

1 call to EventStorageService::hash()
EventStorageService::addEvent in src/EventStorageService.php
Add event data to the storage.

File

src/EventStorageService.php, line 102

Class

EventStorageService
Stores all tracked Enhanced Ecommerce events in a private tempstore.

Namespace

Drupal\commerce_google_tag_manager

Code

private function hash(array $event_data) {
  return md5(json_encode($event_data));
}