You are here

function _google_analytics_et_example_set_selectors_array in Google Analytics Event Tracking 6

Same name and namespace in other branches
  1. 7 google_analytics_et_example/google_analytics_et_example.module \_google_analytics_et_example_set_selectors_array()

Internal function returns the example selectors array.

1 call to _google_analytics_et_example_set_selectors_array()
google_analytics_et_example_google_analytics_et_api in google_analytics_et_example/google_analytics_et_example.module
Implements hook_google_analytics_et_api().

File

google_analytics_et_example/google_analytics_et_example.module, line 20
Google Analytics Event Tracking Module API Example.

Code

function _google_analytics_et_example_set_selectors_array() {
  $selectors = array();
  $selectors = array(
    array(
      'event' => 'mousedown',
      'selector' => '#main-menu li a',
      'category' => 'main navigation',
      'action' => 'click',
      'label' => '!text',
      'value' => 0,
      'noninteraction' => TRUE,
    ),
    array(
      'event' => 'mousedown',
      'selector' => 'div',
      'category' => 'main navigation',
      'action' => 'click',
      'label' => '!test',
      'value' => 0,
      'noninteraction' => TRUE,
    ),
    array(
      'event' => 'mousedown',
      'selector' => 'a#logo',
      'category' => 'Home Link',
      'action' => 'click',
      'label' => 'Logo',
      'value' => 0,
      'noninteraction' => TRUE,
    ),
    array(
      'event' => 'mousedown',
      'selector' => 'div#site-name a[rel="home"]',
      'category' => 'Home Link',
      'action' => 'click',
      'label' => 'Site Name',
      'value' => 0,
      'noninteraction' => TRUE,
    ),
    array(
      'event' => 'blur',
      'selector' => '#edit-name',
      'category' => 'test',
      'action' => 'click',
      'label' => '!test',
      'value' => 0,
      'noninteraction' => TRUE,
    ),
  );
  return $selectors;
}