Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Allow FF to send events.
James Cole75d92bc7f000
diff --git a/.env.example b/.env.exampleindex fdf834d3ef..6e6fd0fa1a 100644--- a/.env.example+++ b/.env.example@@ -12,6 +12,7 @@ CACHE_DRIVER=fileSESSION_DRIVER=fileEMAIL_SMTP=+EMAIL_DRIVER=smtpEMAIL_USERNAME=EMAIL_PASSWORD=ANALYTICS_ID=\ No newline at end of filediff --git a/app/Http/Controllers/Auth/AuthController.php b/app/Http/Controllers/Auth/AuthController.phpindex 89668589df..97bb5bc4b1 100644--- a/app/Http/Controllers/Auth/AuthController.php+++ b/app/Http/Controllers/Auth/AuthController.php@@ -81,6 +81,8 @@ class AuthController extends Controller// set flash messageSession::flash('success', 'You have registered successfully!');+ Session::flash('gaEventCategory', 'user');+ Session::flash('gaEventAction', 'new-registration');return redirect($this->redirectPath());diff --git a/resources/views/layouts/default.blade.php b/resources/views/layouts/default.blade.phpindex e0c8eea327..6eafcace52 100644--- a/resources/views/layouts/default.blade.php+++ b/resources/views/layouts/default.blade.php@@ -146,6 +146,11 @@ga('create', '<?php echo env('ANALYTICS_ID', 'XXX-XX-X'); ?>', 'auto');ga('send', 'pageview');+ // send an event if relevant:+ @if(Session::has('gaEventCategory') && Session::has('gaEventAction'))+ ga('send','event','{{Session::get('gaEventCategory')}}','{{Session::get('gaEventAction')}}');+ @endif+</script></body></html>