How can I store the user agent string and referrer for Webform 4.x submissions?
This issue is Closed (won't fix) on Drupal.org

If you want them back, you basically need to create a module that implements hook_tokens() and hook_token_info(), as described in the API. I don't think anyone did it already.

Here is how I'd do it:

function yourmodule_token_info() {
  $type = array(
    'name' =&gt; t('Server'),
    'description' =&gt; t('Tokens related to $_SERVER superglobal.'),
  );
  $tokens = array();
  foreach($_SERVER as $key =&gt; $val) { //discard $val now
    $tokens[$key] = array(
      'name' =&gt; $key,
      'description' =&gt; "\$_SERVER['$key']",
    );
  }
  return array(
    'types' =&gt; array('server' =&gt; $type),
    'tokens' =&gt; array('server' =&gt; $tokens),
  );
}

function yourmodule_tokens($type, $tokens, array $data = array(), array $options = array()) {
  if($type == 'server') {
    $replacements = array();
    foreach ($tokens as $name =&gt; $original) {
        $replacements[$original] = (string)$_SERVER[$name];
    }
    return $replacements;
  }
}


Of course code above is not production ready, it ignores proper type handling, security issues and so on. It's meant to set you on the right track, but you need to apply your own sanity before deploying it. I take no responsibility for abuse. Read about the reasons it was removed in the first place before you decide to add it back, and be careful to restore only what you really need.