public function Timing::__construct in Googalytics - Google Analytics 8
Create constructor.
Parameters
string $category: A string for categorizing all user timing variables into logical groups.
string $var: A string to identify the variable being recorded.
int $value: The number of milliseconds in elapsed time.
string|null $label: A string that can be used to add flexibility in visualizing user timings in the reports.
array $fields_object: A map of values for the command's fieldsObject parameter.
string $tracker_name: The tracker name (optional).
int $priority: The command priority.
Overrides Send::__construct
File
- src/
AnalyticsCommand/ Timing.php, line 57
Class
- Timing
- Class Timing.
Namespace
Drupal\ga\AnalyticsCommandCode
public function __construct($category, $var, $value, $label = NULL, array $fields_object = [], $tracker_name = NULL, $priority = self::DEFAULT_PRIORITY) {
$this->timingCategory = $category;
$this->timingVar = $var;
if (!is_int($value)) {
throw new \InvalidArgumentException("Timing value must be an integer");
}
$this->timingValue = $value;
$this->timingLabel = $label;
parent::__construct('timing', $fields_object, $tracker_name, $priority);
}