function _google_analytics_et_example_set_selectors_array in Google Analytics Event Tracking 7
Same name and namespace in other branches
- 6 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 31 - Google Analytics Event Tracking Module API Example.
Code
function _google_analytics_et_example_set_selectors_array() {
$selectors = array();
$selectors = array(
array(
'event' => 'mousedown',
'selector' => 'a',
'category' => 'main navigation',
'action' => 'click',
'label' => '!test',
'value' => 0,
'noninteraction' => TRUE,
),
array(
'event' => 'mousedown',
'selector' => '#page-title',
'category' => 'main navigation',
'action' => 'click',
'label' => '!test',
'value' => 0,
'noninteraction' => TRUE,
'options' => array(
'trackOnce' => TRUE,
),
),
array(
'event' => 'mousedown',
'selector' => 'a#logo',
'category' => 'Home Link',
'action' => 'click',
'label' => 'Logo',
'value' => 0,
'noninteraction' => TRUE,
),
array(
'event' => 'mousedown',
'selector' => 'div',
'category' => 'Home Link',
'action' => '[site:name]',
'label' => 'test',
'value' => 0,
'noninteraction' => TRUE,
),
array(
'event' => 'blur',
'selector' => '#edit-name',
'category' => '[TEST] blurred from the user login username/email input field.',
'action' => 'BLUR',
'label' => '!test',
// !test token causes the the output to be alerted to the screen.
'value' => 0,
'noninteraction' => TRUE,
),
);
return $selectors;
}