Skip to content

Commit 5ae11e1

Browse files
committed
Added a google tag manager exemple in the stub
1 parent 83d69c7 commit 5ae11e1

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

stubs/CookiesServiceProvider.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,27 @@ protected function registerCookies(): void
1919

2020
// Register all Analytics cookies at once using one single shorthand method:
2121
// Cookies::analytics()
22-
// ->google(
22+
// ->googleAnalytics(
2323
// id: config('cookieconsent.google_analytics.id'),
2424
// anonymizeIp: config('cookieconsent.google_analytics.anonymize_ip')
2525
// );
2626

27+
// Cookies::analytics()
28+
// ->googleTagManager(
29+
// id: config('cookieconsent.google_tag_manager.id'),
30+
// config: [
31+
// 'ad_user_data',
32+
// 'ad_personalization',
33+
// 'ad_storage',
34+
// 'analytics_storage',
35+
// ]
36+
// );
37+
2738
// Register custom cookies under the pre-existing "optional" category:
2839
// Cookies::optional()
2940
// ->name('darkmode_enabled')
3041
// ->description('This cookie helps us remember your preferences regarding the interface\'s brightness.')
3142
// ->duration(120)
3243
// ->accepted(fn(Consent $consent, MyDarkmode $darkmode) => $consent->cookie(value: $darkmode->getDefaultValue()));
3344
}
34-
}
45+
}

0 commit comments

Comments
 (0)