30 lines
895 B
Smarty
30 lines
895 B
Smarty
{if !isLocalDevelopment()}
|
|
<script src="/common/static/js/sentry-6.16.1.min.js"></script>
|
|
|
|
<script>
|
|
Sentry.init({
|
|
dsn: 'https://bfce65214ee44aed9bbf7bb7bddc3113@sentry.wpj.cz/11',
|
|
denyUrls: [
|
|
/extensions\//i,
|
|
/^chrome:\/\//i,
|
|
/kupshop\.local/i
|
|
],
|
|
});
|
|
|
|
function getParameterByName(name, url = window.location.href) {
|
|
name = name.replace(/[\[\]]/g, '\\$&');
|
|
var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
|
|
results = regex.exec(url);
|
|
|
|
if (!results) return null;
|
|
if (!results[2]) return '';
|
|
return decodeURIComponent(results[2].replace(/\+/g, ' '));
|
|
}
|
|
|
|
Sentry.setTag("user", "{if isSuperuser()}wpjadmin{else}admin{/if}");
|
|
Sentry.setTag("s", getParameterByName('s'));
|
|
Sentry.setTag("l", getParameterByName('l'));
|
|
Sentry.setTag("r", getParameterByName('r'));
|
|
</script>
|
|
{/if}
|