Anonymous Segment.com tracking. Closes #91.

This commit is contained in:
James Brooks
2015-01-23 17:24:34 +00:00
committed by Joseph Cohen
parent a63c65a6c3
commit 5c391cc888
23 changed files with 523 additions and 8 deletions

View File

@@ -60,6 +60,11 @@ class DashTeamController extends Controller
$user = User::create(Binput::all());
if (! $user->isValid()) {
segment_track('Dashboard', [
'event' => 'Added User',
'success' => false,
]);
return Redirect::back()->withInput(Binput::except('password'))
->with('title', sprintf(
'<strong>%s</strong> %s',
@@ -69,6 +74,11 @@ class DashTeamController extends Controller
->with('errors', $user->getErrors());
}
segment_track('Dashboard', [
'event' => 'Added User',
'success' => true,
]);
$successMsg = sprintf(
'<strong>%s</strong> %s',
trans('dashboard.notifications.awesome'),
@@ -98,6 +108,11 @@ class DashTeamController extends Controller
$user->update($items);
if (! $user->isValid()) {
segment_track('Dashboard', [
'event' => 'Updated User',
'success' => false,
]);
return Redirect::back()->withInput(Binput::except('password'))
->with('title', sprintf(
'<strong>%s</strong> %s',
@@ -107,6 +122,11 @@ class DashTeamController extends Controller
->with('errors', $user->getErrors());
}
segment_track('Dashboard', [
'event' => 'Updated User',
'success' => true,
]);
$successMsg = sprintf(
'<strong>%s</strong> %s',
trans('dashboard.notifications.awesome'),