You are here

function ga_tokenizer_token_values in Google Analytics Tokenizer 6

Implementation of hook_token_values(). (token.module)

File

./ga_tokenizer.module, line 15

Code

function ga_tokenizer_token_values($type = 'all', $object = NULL) {
  $values = array();
  if ($type == 'global' || $type == 'all') {
    $aux = new GA_Parse($_COOKIE);
    $values['ga-source'] = $aux->campaign_source;
    $values['ga-campaign'] = $aux->campaign_name;
    $values['ga-medium'] = $aux->campaign_medium;
    $values['ga-content'] = $aux->campaign_content;
    $values['ga-term'] = $aux->campaign_term;
    $values['ga-first-visit'] = $aux->first_visit;
    $values['ga-previous-visit'] = $aux->previous_visit;
    $values['ga-current-visit'] = $aux->current_visit_started;
    $values['ga-times-visited'] = $aux->times_visited;
  }
  return $values;
}