mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-27 17:31:09 -06:00
Allow FF to send events.
This commit is contained in:
parent
74aa6e911e
commit
75d92bc7f0
@ -12,6 +12,7 @@ CACHE_DRIVER=file
|
||||
SESSION_DRIVER=file
|
||||
|
||||
EMAIL_SMTP=
|
||||
EMAIL_DRIVER=smtp
|
||||
EMAIL_USERNAME=
|
||||
EMAIL_PASSWORD=
|
||||
ANALYTICS_ID=
|
@ -81,6 +81,8 @@ class AuthController extends Controller
|
||||
|
||||
// set flash message
|
||||
Session::flash('success', 'You have registered successfully!');
|
||||
Session::flash('gaEventCategory', 'user');
|
||||
Session::flash('gaEventAction', 'new-registration');
|
||||
|
||||
|
||||
return redirect($this->redirectPath());
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user