<commit_before><?php
/**
 * @package        Metrics
 * @category       plugins
 * @author         <NAME> <<EMAIL>>
 * @copyright      Copyright (c) 2011-2013, <NAME>
 * @license        MIT License, see license.txt
 */
namespace	cs;
Event::instance()->on(
	'System/Page/render/before',
	function () {
		if (User::instance()->admin() || !in_array('Metrics', Config::instance()->components['plugins'])) {
			return;
		}
		Page::instance()->post_Body	.= '<!-- Yandex.Metrika counter --><script type="text/javascript">(function (d, w, c) { (w[c] = w[c] || []).push(function() { try { w.yaCounter1250519 = new Ya.Metrika({id:1250519, webvisor:true, clickmap:true, trackLinks:true, accurateTrackBounce:true, trackHash:true}); } catch(e) { } }); var n = d.getElementsByTagName("script")[0], s = d.createElement("script"), f = function () { n.parentNode.insertBefore(s, n); }; s.type = "text/javascript"; s.async = true; s.src = (d.location.protocol == "https:" ? "https:" : "http:") + "//mc.yandex.ru/metrika/watch.js"; if (w.opera == "[object Opera]") { d.addEventListener("DOMContentLoaded", f, false); } else { f(); } })(document, window, "yandex_metrika_callbacks");</script><noscript><div><img src="//mc.yandex.ru/watch/1250519" style="position:absolute; left:-9999px;" alt="" /></div></noscript><!-- /Yandex.Metrika counter -->';
	}
);<commit_msg>Do not include Yandex.Metrics on page for those visitors who do not want to be tracked<commit_after><?php
/**
 * @package   Metrics
 * @category  plugins
 * @author    <NAME>rynskyi <<EMAIL>>
 * @copyright Copyright (c) 2011-2016, <NAME>
 * @license   MIT License, see license.txt
 */
namespace cs;
Event::instance()->on(
	'System/Page/render/before',
	function () {
		if (
			User::instance()->admin() ||
			Request::instance()->header('dnt') == '1' ||
			!in_array('Metrics', Config::instance()->components['plugins'])
		) {
			return;
		}
		Page::instance()->post_Body .=
			'<!-- Yandex.Metrika counter --><script type="text/javascript">(function (d, w, c) { (w[c] = w[c] || []).push(function() { try { w.yaCounter1250519 = new Ya.Metrika({id:1250519, webvisor:true, clickmap:true, trackLinks:true, accurateTrackBounce:true, trackHash:true}); } catch(e) { } }); var n = d.getElementsByTagName("script")[0], s = d.createElement("script"), f = function () { n.parentNode.insertBefore(s, n); }; s.type = "text/javascript"; s.async = true; s.src = (d.location.protocol == "https:" ? "https:" : "http:") + "//mc.yandex.ru/metrika/watch.js"; if (w.opera == "[object Opera]") { d.addEventListener("DOMContentLoaded", f, false); } else { f(); } })(document, window, "yandex_metrika_callbacks");</script><noscript><div><img src="//mc.yandex.ru/watch/1250519" style="position:absolute; left:-9999px;" alt="" /></div></noscript><!-- /Yandex.Metrika counter -->';
	}
);
{'fraction_non_alphanumeric': 0.22344975053456878, 'fraction_numerical': 0.02459016393442623, 'mean_word_length': 4.716904276985743, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 38, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '5920678', 'n_tokens_mistral': 1009, 'n_tokens_neox': 941, 'n_words': 191}