Skip to content

Commit

Permalink
Removed google analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
dsbilling committed Apr 5, 2022
1 parent 5029622 commit 5c7d1da
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 35 deletions.
6 changes: 5 additions & 1 deletion app/Console/Commands/RefreshSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ public function handle()
$this->info('Renmamed SEATING_SEAT_PRICE_CURRENCY to MAIN_CURRENCY');
}

if (Setting::has('GOOGLE_ANALYTICS_TRACKING_ID')) {
Setting::forget('GOOGLE_ANALYTICS_TRACKING_ID');
$this->info('Removed GOOGLE_ANALYTICS_TRACKING_ID');
}

Setting::save();

// Add description to settings
Expand All @@ -150,7 +155,6 @@ public function handle()
'MAIN_ENABLE_GRASROTANDELEN_WIDGET' => 'Set this to "0" (without quotes) to disable Grasrotandelen on the homepage. If it is set to "1" (without quotes) Grasrotandelen will be visible on the homepage.',
'FACEBOOK_MESSENGER_APP_ID' => 'This is used for the messenger integration for users. Create an app on <a target="_blank" href="https://developers.facebook.com/">https://developers.facebook.com/</a> and paste its ID here. Example: 1234567890123456',
'FACEBOOK_MESSENGER_PAGE_ID' => 'This is used for the messenger integration for users. This is the ID not the URL of the page. You will find it under "about" on the bottom on your page. Example: 1234567890123456',
'GOOGLE_ANALYTICS_TRACKING_ID' => 'This is used for tracking traffic on your website. Example: UA-12345678-0',
'GOOGLE_CALENDAR_API_KEY' => 'Please refer to <a target="_blank" href="https://portal.kilobyte.no/knowledgebase/7/Google-Calendar-Integration.html">this guide</a>.',
'GOOGLE_CALENDAR_ID' => 'Please refer to <a target="_blank" href="https://portal.kilobyte.no/knowledgebase/7/Google-Calendar-Integration.html">this guide</a>.',
'GOOGLE_CALENDAR_START_DATE' => 'This will be the date you want the calendar to start. Example: 1970-01-30',
Expand Down
1 change: 0 additions & 1 deletion database/seeders/SettingsTableSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public function run()
Setting::set('LOGIN_ENABLED', true);

Setting::set('GOOGLE_MAPS_API_KEY', '');
Setting::set('GOOGLE_ANALYTICS_TRACKING_ID', '');
Setting::set('GOOGLE_CALENDAR_API_KEY', '');
Setting::set('GOOGLE_CALENDAR_ID', '');
Setting::set('GOOGLE_CALENDAR_START_DATE', '1970-01-30');
Expand Down
11 changes: 0 additions & 11 deletions resources/views/vobilet-admin/layouts/main.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -301,16 +301,5 @@
});
</script>

@if(Setting::get('GOOGLE_ANALYTICS_TRACKING_ID'))
<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', '{{ Setting::get('GOOGLE_ANALYTICS_TRACKING_ID') }}', 'auto');
ga('send', 'pageview');
</script>
@endif

</body>
</html>
11 changes: 0 additions & 11 deletions resources/views/vobilet/layouts/auth.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,6 @@
}
})});
</script>

@if(Setting::get('GOOGLE_ANALYTICS_TRACKING_ID'))
<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', '{{ Setting::get('GOOGLE_ANALYTICS_TRACKING_ID') }}', 'auto');
ga('send', 'pageview');
</script>
@endif

</body>
</html>
Expand Down
11 changes: 0 additions & 11 deletions resources/views/vobilet/layouts/main.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -407,17 +407,6 @@ function notificationDismiss (url) {
}
</script>

@if(Setting::get('GOOGLE_ANALYTICS_TRACKING_ID'))
<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', '{{ Setting::get('GOOGLE_ANALYTICS_TRACKING_ID') }}', 'auto');
ga('send', 'pageview');
</script>
@endif

@if(Setting::get('FACEBOOK_MESSENGER_APP_ID') && Setting::get('FACEBOOK_MESSENGER_PAGE_ID'))
<script>
window.fbAsyncInit = function() {
Expand Down

0 comments on commit 5c7d1da

Please sign in to comment.