<commit_before><?php

/*
 * This file is part of the gumnut package.
 * (c) 2009-2010 <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

/**
 * rtAnalyticsHelper defines provides Google Analytics integration.
 *
 * @package    gumnut
 * @subpackage helper
 * @author     <NAME> <<EMAIL>>
 */

/**
 * Returns the Analytics integration code snippet.
 *
 * See: http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html
 * 
 * @param string $web_property_id
 * @return string
 */
function analytics($web_property_id = null)
{
  if(is_null($web_property_id) && !sfConfig::has('app_rt_analytics_web_property_id'))
  {
    return '';
  }

  $web_property_id = is_null($web_property_id) ? sfConfig::get('app_rt_analytics_web_property_id') : $web_property_id;
  
  $string = <<< EOS
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', '$web_property_id']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTartame('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>

EOS;

  return $string;
}
<commit_msg>Corrected rt back to gn.<commit_after><?php

/*
 * This file is part of the gumnut package.
 * (c) 2009-2010 <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

/**
 * rtAnalyticsHelper defines provides Google Analytics integration.
 *
 * @package    gumnut
 * @subpackage helper
 * @author     <NAME> <<EMAIL>>
 */

/**
 * Returns the Analytics integration code snippet.
 *
 * See: http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html
 * 
 * @param string $web_property_id
 * @return string
 */
function analytics($web_property_id = null)
{
  if(is_null($web_property_id) && !sfConfig::has('app_rt_analytics_web_property_id'))
  {
    return '';
  }

  $web_property_id = is_null($web_property_id) ? sfConfig::get('app_rt_analytics_web_property_id') : $web_property_id;
  
  $string = <<< EOS
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', '$web_property_id']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagname('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>

EOS;

  return $string;
}

{'fraction_non_alphanumeric': 0.1619992910315491, 'fraction_numerical': 0.006380716058135413, 'mean_word_length': 4.1875, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 19, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5694552', 'n_tokens_mistral': 971, 'n_tokens_neox': 939, 'n_words': 206}