# metricool/2.1.1/views/public/tracking-script.php

Metricool – Social media and site statistics, version 2.1.1. 13 lines.

- Page: https://pluginprobe.com/plugins/metricool/2.1.1/code/views/public/tracking-script.php
- Raw: https://pluginprobe.com/plugins/metricool/2.1.1/raw/views/public/tracking-script.php
- Modified: 2026-08-20T14:08:30+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/metricool/2.1.1/code/views/public/tracking-script.php#L10-L20`.

```php
<?php

if (!defined('ABSPATH')) {
    exit;
}

/**
 * Variables that should be passed to the view
 * @var string $script_url
 * @var string $hash
 */
?>
<script>function loadScript(a){var b=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.src="<?php echo esc_attr($script_url) ?>",c.onreadystatechange=a,c.onload=a,b.appendChild(c)}loadScript(function(){beTracker.t({hash:"<?php echo esc_html($hash) ?>"})});</script>
```
