Adds Google Analytics. Closes #350
This commit is contained in:
@@ -61,6 +61,7 @@ return [
|
||||
'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",
|
||||
],
|
||||
'security' => [
|
||||
'allowed-domains' => 'Allowed domains',
|
||||
|
||||
@@ -61,6 +61,7 @@ return [
|
||||
'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",
|
||||
],
|
||||
'security' => [
|
||||
'allowed-domains' => 'Domaines autorisés. <small class="help-block"></small>',
|
||||
|
||||
@@ -60,6 +60,7 @@ return [
|
||||
'days-of-incidents' => 'Quantos dias de incidentes para mostrar?',
|
||||
'banner' => 'Imagem do banner',
|
||||
'banner-help' => "É recomendável que você fazer upload de arquivos menores que 930px.",
|
||||
'google-analytics' => "Google Analytics code",
|
||||
],
|
||||
'security' => [
|
||||
'allowed-domains' => 'Domínios permitidos',
|
||||
|
||||
@@ -36,6 +36,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label>{{ trans('forms.settings.app-setup.google-analytics') }}</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">
|
||||
|
||||
10
app/views/partials/analytics.blade.php
Normal file
10
app/views/partials/analytics.blade.php
Normal file
@@ -0,0 +1,10 @@
|
||||
@if($googleId = 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'] }}');
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
@endif
|
||||
@@ -9,3 +9,5 @@
|
||||
</p>
|
||||
@endif
|
||||
</footer>
|
||||
|
||||
@include("partials.analytics")
|
||||
|
||||
Reference in New Issue
Block a user