You are here

function googleanalytics_token_info in Google Analytics 7

Same name and namespace in other branches
  1. 7.2 googleanalytics.tokens.inc \googleanalytics_token_info()

Implements hook_token_info().

File

./googleanalytics.tokens.inc, line 11
Builds placeholder replacement tokens for user-related data.

Code

function googleanalytics_token_info() {
  $user['role-names'] = array(
    'name' => t('User role names'),
    'description' => t('The role names the user account is a member of as comma separated list.'),
    'needs-data' => 'user',
  );
  $user['role-ids'] = array(
    'name' => t('User role ids'),
    'description' => t('The role ids the user account is a member of as comma separated list.'),
    'needs-data' => 'user',
  );
  return array(
    'tokens' => array(
      'user' => $user,
    ),
  );
}