Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolves issue 77 #78

Merged
merged 3 commits into from
Mar 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions config/cookieconsent.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,21 @@

'policy' => null,

/* Google Analytics configuration
|--------------------------------------------------------------------------
|
| If you use Google Analytics, you can configure the package to automatically
| load the Google Analytics script when the user gives his consent.
|
| The ID parameter is required and represents your Google Analytics ID.
|
| The anonymize parameter is optional and determines whether the user's IP
| address should be anonymized before being sent to Google Analytics.
|
*/
'google_analytics' => [
'id' => env('GOOGLE_ANALYTICS_ID', ""),
'anonymize_ip' => env('GOOGLE_ANALYTICS_ANONYMIZE_IP', true)
],

];
4 changes: 2 additions & 2 deletions stubs/CookiesServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ protected function registerCookies(): void
// Register all Analytics cookies at once using one single shorthand method:
// Cookies::analytics()
// ->google(
// id: env('GOOGLE_ANALYTICS_ID'),
// anonymizeIp: env('GOOGLE_ANALYTICS_ANONYMIZE_IP'),
// id: config('cookieconsent.google_analytics.id'),
// anonymizeIp: config('cookieconsent.google_analytics.anonymize_ip')
// );

// Register custom cookies under the pre-existing "optional" category:
Expand Down