You are here

function ga_push_method_ga_js in GA Push 7

Same name and namespace in other branches
  1. 8 inc/ga_push.ga_js.inc \ga_push_method_ga_js()

GA Push Method callback: Javascript Classic (javascript).

1 string reference to 'ga_push_method_ga_js'
ga_push_ga_push_method in ./ga_push.module
Implements hook_ga_push_method().

File

inc/ga_push.ga_js.inc, line 11
Classic GA Javascript: method and functions.

Code

function ga_push_method_ga_js($push, $type, $options) {
  $push_info = array(
    'push' => $push,
    'type' => $type,
  );
  $key = 'ga_push_' . GA_PUSH_METHOD_GA_JS;
  if (!isset($_SESSION[$key])) {
    $_SESSION[$key] = array();
  }
  $_SESSION[$key][] = $push_info;
}