diff --git a/database/seeders/PortfolioSeeder.php b/database/seeders/PortfolioSeeder.php index cdf1a2e55..7ddfcd490 100644 --- a/database/seeders/PortfolioSeeder.php +++ b/database/seeders/PortfolioSeeder.php @@ -12,6 +12,7 @@ use App\Services\Contracts\ServiceInterface; use App\Services\Contracts\SkillInterface; use App\Services\Contracts\VisitorInterface; +use Config; use Illuminate\Database\Seeder; use Log; use Str; @@ -60,8 +61,8 @@ public function run() //google analytics ID $data = [ 'setting_key' => CoreConstants::PORTFOLIO_CONFIG__GOOGLE_ANALYTICS_ID, - 'setting_value' => '', - 'default_value' => '', + 'setting_value' => Config::get('custom.demo_mode') ? 'G-PS8JF33VLD' : '', + 'default_value' => Config::get('custom.demo_mode') ? 'G-PS8JF33VLD' : '', ]; $portfolioConfig->insertOrUpdate($data); diff --git a/resources/views/common/googleAnalytics.blade.php b/resources/views/common/googleAnalytics.blade.php new file mode 100644 index 000000000..63dd1ed2d --- /dev/null +++ b/resources/views/common/googleAnalytics.blade.php @@ -0,0 +1,11 @@ +@if (!empty($portfolioConfig['googleAnalyticsId']) && $portfolioConfig['googleAnalyticsId'] != '') + + + +@endif \ No newline at end of file diff --git a/resources/views/frontend/theme/procyon.blade.php b/resources/views/frontend/theme/procyon.blade.php index f43baa5fb..bb8b9734f 100644 --- a/resources/views/frontend/theme/procyon.blade.php +++ b/resources/views/frontend/theme/procyon.blade.php @@ -16,18 +16,7 @@ - @if (!empty($portfolioConfig['googleAnalyticsId']) && $portfolioConfig['googleAnalyticsId'] != '') - - - - - @endif + @include('common.googleAnalytics') @if (!empty($portfolioConfig['script']['header']) && $portfolioConfig['script']['header'] != '') - - - @endif + @include('common.googleAnalytics') @if (!empty($portfolioConfig['script']['header']) && $portfolioConfig['script']['header'] != '') - - - @endif + @include('common.googleAnalytics') @if (!empty($portfolioConfig['script']['header']) && $portfolioConfig['script']['header'] != '')