You are here

public function Product::addDimension in Commerce Google Tag Manager 8.2

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

Add a custom dimension.

Parameters

string $dimension: The dimension to add.

Return value

\Drupal\commerce_google_tag_manager\Product The Product object.

File

src/Product.php, line 290

Class

Product
Represents a product in the domain of Google's Enhanced Ecommerce.

Namespace

Drupal\commerce_google_tag_manager

Code

public function addDimension($dimension) {
  $this->dimensions[] = $dimension;
  return $this;
}