You are here

class Pageview in Googalytics - Google Analytics 8

Class Pageview.

Hierarchy

Expanded class hierarchy of Pageview

2 files declare their use of Pageview
DefaultCommandSubscriber.php in src/EventSubscriber/DefaultCommandSubscriber.php
PageviewTest.php in tests/src/Unit/AnalyticsCommand/PageviewTest.php

File

src/AnalyticsCommand/Pageview.php, line 8

Namespace

Drupal\ga\AnalyticsCommand
View source
class Pageview extends Send {

  /*
   * Pageview event should come before other Send commands (e.g. event), but
   * after most other commands (e.g. set dimension)
   */
  const DEFAULT_PRIORITY = -5;

  /**
   * Create constructor.
   *
   * @param array $fields_object
   *   A map of values for the command's fieldsObject parameter.
   * @param string $tracker_name
   *   The tracker name (optional).
   * @param int $priority
   *   The command priority.
   */
  public function __construct(array $fields_object = [], $tracker_name = NULL, $priority = self::DEFAULT_PRIORITY) {
    parent::__construct('pageview', $fields_object, $tracker_name, $priority);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
DrupalSettingCommandsTrait::$priority protected property Priority integer.
DrupalSettingCommandsTrait::getPriority public function An integer value for sorting by priority.
Generic::$command protected property The command name.
Generic::$fieldsObject protected property A map of values for the command's fieldsObject parameter.
Generic::$trackerName protected property The name of the tracker for this command.
Generic::getCommand public function Get the command name.
Generic::getFieldsObject public function Get the map of values for the command's fieldsObject parameter.
Generic::getTrackerName public function The tracker this command will be applied to, if specified.
Pageview::DEFAULT_PRIORITY constant Overrides Send::DEFAULT_PRIORITY
Pageview::__construct public function Create constructor. Overrides Send::__construct
Send::$hitType protected property The event hitType parameter.
Send::$hitTypes private static property
Send::getSettingCommands public function An array of commands to be sent to Google Analytics. Overrides Generic::getSettingCommands 2