ipunkt / laravel-analytics

Analytics tracking package for Laravel
MIT License
263 stars 54 forks source link

Add GA config env vars, allow cookieDomain tracking from local env #39

Closed WaveHack closed 7 years ago

WaveHack commented 7 years ago

This PR changes the following things:

Add optional env() vars for the remaining Google Analytics config variables.

Allow having cookieDomain: auto (or anything else than none) on Laravel app env 'local'; I particularly needed this for making userId work on a local env'd site.

This works in conjunction with the first change by having an ANALYTICS_DEBUG env var which overrides the App::environment('local') check. By default it still enables debug mode on local by having env('APP_ENV') === 'local' as default value on said ANALYTICS_DEBUG env.

Add missing doc entry to config > configurations > GoogleAnalytics for a change from my earlier PR.



You might want to update the README.me with these changes. Or tell me what needs doing and I'll gladly add it to the PR.