Support GoSquared tracking codes as well. Closes #556.

This commit is contained in:
James Brooks 2015-04-03 17:29:14 +01:00
parent cee25ba530
commit 92c1d69b16
8 changed files with 83 additions and 60 deletions

View File

@ -71,17 +71,18 @@ return [
'settings' => [
/// Application setup
'app-setup' => [
'site-name' => 'Name der Seite',
'site-url' => 'URL der Seite',
'site-timezone' => 'Wählen Sie Ihre Zeitzone',
'site-locale' => 'Wählen Sie Ihre Sprache',
'date-format' => 'Datumsformat',
'display-graphs' => 'Display graphs on status page?',
'about-this-page' => 'Über diese Seite',
'days-of-incidents' => 'Wie viele (vergangene) Tage sollen angezeigt werden?',
'banner' => 'Banner-Bild',
'banner-help' => "Wählen Sie möglichst ein Bild mit 930 px Breite.",
'google-analytics' => "Google Analytics Code",
'site-name' => 'Name der Seite',
'site-url' => 'URL der Seite',
'site-timezone' => 'Wählen Sie Ihre Zeitzone',
'site-locale' => 'Wählen Sie Ihre Sprache',
'date-format' => 'Datumsformat',
'display-graphs' => 'Display graphs on status page?',
'about-this-page' => 'Über diese Seite',
'days-of-incidents' => 'Wie viele (vergangene) Tage sollen angezeigt werden?',
'banner' => 'Banner-Bild',
'banner-help' => "Wählen Sie möglichst ein Bild mit 930 px Breite.",
'analytics_google' => "Google Analytics Code",
'analytics_gosquared' => "GoSquared Analytics Code",
],
'security' => [
'allowed-domains' => 'Erlaubte Domains',

View File

@ -80,8 +80,8 @@ return [
'about-this-page' => 'crwdns402:0crwdne402:0',
'days-of-incidents' => 'crwdns403:0crwdne403:0',
'banner' => 'crwdns404:0crwdne404:0',
'banner-help' => "crwdns405:0crwdne405:0",
'google-analytics' => "crwdns406:0crwdne406:0",
'banner-help' => 'crwdns405:0crwdne405:0',
'analytics_google' => 'crwdns406:0crwdne406:0',
],
'security' => [
'allowed-domains' => 'crwdns407:0crwdne407:0',

View File

@ -74,17 +74,18 @@ return [
'settings' => [
/// Application setup
'app-setup' => [
'site-name' => 'Site Name',
'site-url' => 'Site URL',
'site-timezone' => 'Site Timezone',
'site-locale' => 'Site Language',
'date-format' => 'Date Format',
'display-graphs' => 'Display graphs on status page?',
'about-this-page' => 'About this page',
'days-of-incidents' => 'How many days of incidents to show?',
'banner' => 'Banner Image',
'banner-help' => "It's recommended that you upload files no bigger than 930px wide .",
'google-analytics' => "Google Analytics code",
'site-name' => 'Site Name',
'site-url' => 'Site URL',
'site-timezone' => 'Site Timezone',
'site-locale' => 'Site Language',
'date-format' => 'Date Format',
'display-graphs' => 'Display graphs on status page?',
'about-this-page' => 'About this page',
'days-of-incidents' => 'How many days of incidents to show?',
'banner' => 'Banner Image',
'banner-help' => "It's recommended that you upload files no bigger than 930px wide .",
'analytics_google' => "Google Analytics Code",
'analytics_gosquared' => "GoSquared Analytics Code",
],
'security' => [
'allowed-domains' => 'Allowed domains',

View File

@ -72,17 +72,18 @@ return [
'settings' => [
/// Application setup
'app-setup' => [
'site-name' => 'Nombre del sitio',
'site-url' => 'URL del sitio',
'site-timezone' => 'Zona horaria del sitio',
'site-locale' => 'Idioma del sitio',
'date-format' => 'Formato de la fecha',
'display-graphs' => '¿Visualizar gráficas en la página de estado?',
'about-this-page' => 'Sobre esta página',
'days-of-incidents' => '¿Cuántos días de incidentes mostrar?',
'banner' => 'Imagen de inicio',
'banner-help' => "Se recomienda subir una imagen no más grande de 930px de ancho .",
'google-analytics' => "Código de Google Analytics",
'site-name' => 'Nombre del sitio',
'site-url' => 'URL del sitio',
'site-timezone' => 'Zona horaria del sitio',
'site-locale' => 'Idioma del sitio',
'date-format' => 'Formato de la fecha',
'display-graphs' => '¿Visualizar gráficas en la página de estado?',
'about-this-page' => 'Sobre esta página',
'days-of-incidents' => '¿Cuántos días de incidentes mostrar?',
'banner' => 'Imagen de inicio',
'banner-help' => "Se recomienda subir una imagen no más grande de 930px de ancho .",
'analytics_google' => "Google Analytics Code",
'analytics_gosquared' => "GoSquared Analytics Code",
],
'security' => [
'allowed-domains' => 'Dominios permitidos',

View File

@ -71,17 +71,18 @@ return [
'settings' => [
/// Application setup
'app-setup' => [
'site-name' => 'Nom du site',
'site-url' => 'URL du site',
'site-timezone' => 'Fuseau horaire du site',
'site-locale' => 'Langue du site',
'date-format' => 'Format de date',
'display-graphs' => 'Display graphs on status page?',
'about-this-page' => 'À propos de cette page',
'days-of-incidents' => 'Nombre de jours à afficher ?',
'banner' => 'Bannière',
'banner-help' => "Il est recommandé de télécharger des fichiers de moins de 930 pixels de large.",
'google-analytics' => "Google Analytics code",
'site-name' => 'Nom du site',
'site-url' => 'URL du site',
'site-timezone' => 'Fuseau horaire du site',
'site-locale' => 'Langue du site',
'date-format' => 'Format de date',
'display-graphs' => 'Display graphs on status page?',
'about-this-page' => 'À propos de cette page',
'days-of-incidents' => 'Nombre de jours à afficher ?',
'banner' => 'Bannière',
'banner-help' => "Il est recommandé de télécharger des fichiers de moins de 930 pixels de large.",
'analytics_google' => "Google Analytics Code",
'analytics_gosquared' => "GoSquared Analytics Code",
],
'security' => [
'allowed-domains' => 'Domaines autorisés. <small class="help-block"></small>',

View File

@ -74,17 +74,18 @@ return [
'settings' => [
/// Application setup
'app-setup' => [
'site-name' => 'Nome do site',
'site-url' => 'URL do site',
'site-timezone' => 'Fuso horário do site',
'site-locale' => 'Idioma do site',
'date-format' => 'Formato da Data',
'display-graphs' => '',
'about-this-page' => 'Sobre esta página',
'days-of-incidents' => 'Quantos dias de incidentes para mostrar?',
'banner' => 'Imagem do banner',
'banner-help' => "É recomendável que você faça upload de arquivos menores que 930px .",
'google-analytics' => "Código do Google Analytics",
'site-name' => 'Nome do site',
'site-url' => 'URL do site',
'site-timezone' => 'Fuso horário do site',
'site-locale' => 'Idioma do site',
'date-format' => 'Formato da Data',
'display-graphs' => '',
'about-this-page' => 'Sobre esta página',
'days-of-incidents' => 'Quantos dias de incidentes para mostrar?',
'banner' => 'Imagem do banner',
'banner-help' => "É recomendável que você faça upload de arquivos menores que 930px .",
'analytics_google' => "Google Analytics Code",
'analytics_gosquared' => "GoSquared Analytics Code",
],
'security' => [
'allowed-domains' => 'Domínios permitidos',

View File

@ -46,11 +46,19 @@
<div class="row">
<div class="col-xs-12">
<div class="form-group">
<label>{{ trans('forms.settings.app-setup.google-analytics') }}</label>
<label>{{ trans('forms.settings.app-setup.analytics_google') }}</label>
<input type="text" name="app_analytics" class="form-control" value="{{ Setting::get('app_analytics') }}" placeholder="UA-12345-12">
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div class="form-group">
<label>{{ trans('forms.settings.app-setup.analytics_gosquared') }}</label>
<input type="text" name="app_analytics_gs" class="form-control" value="{{ Setting::get('app_analytics_gs') }}" placeholder="GSN-12345-A">
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div class="form-group">

View File

@ -1,10 +1,20 @@
@if($googleId = Setting::get('app_analytics'))
@if($googleTracking = Setting::get('app_analytics'))
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '{{ $googleId }}', '{{ $_SERVER['SERVER_NAME'] or '' }}');
ga('create', '{{ $googleTracking }}', '{{ $_SERVER['SERVER_NAME'] or '' }}');
ga('send', 'pageview');
</script>
@endif
@if($gosquaredTracking = Setting::get('app_analytics_gs'))
<script>
!function(g,s,q,r,d){r=g[r]=g[r]||function(){(r.q=r.q||[]).push(
arguments)};d=s.createElement(q);q=s.getElementsByTagName(q)[0];
d.src='//d1l6p2sc9645hc.cloudfront.net/tracker.js';q.parentNode.
insertBefore(d,q)}(window,document,'script','_gs');
_gs('{{ $gosquaredTracking }}');
</script>
@endif