Javascript variable value in page source for seo from Drupal.settings
I think you're over-estimating the potential SEO value of making such a change, but if you don't want to use Drupal settings you can just interpolate the value into a static string and use that:

$var = variable_get('my-variable');
$js = &lt;&lt;&lt;EOF
function() { 
  window['my-val'] = '{$var}';
}
EOF;
drupal_add_js($js, 'inline');


I'll leave data-sanitising up to you, how far you need to go will depend on the source of the variable.