Add enums for the custom analytics fields

This commit is contained in:
Nabeel Shahzad 2018-01-18 22:32:50 -05:00
parent a54ff2643f
commit 7e09cf6c28
3 changed files with 29 additions and 1 deletions

View File

@ -0,0 +1,14 @@
<?php
namespace App\Models\Enums;
/**
* Class AnalyticsDimensions
* @package App\Models\Enums
*/
class AnalyticsDimensions
{
const PHP_VERSION = 1;
const MYSQL_VERSION = 2;
const PHPVMS_VERSION = 3;
}

View File

@ -0,0 +1,13 @@
<?php
namespace App\Models\Enums;
/**
* Class AnalyticsMetrics
* @package App\Models\Enums
*/
class AnalyticsMetrics
{
# Track the lookup time for airports from vaCentral
const AIRPORT_LOOKUP_TIME = 1;
}

View File

@ -2,6 +2,7 @@
namespace Modules\Installer\Http\Controllers; namespace Modules\Installer\Http\Controllers;
use App\Models\Enums\AnalyticsDimensions;
use Log; use Log;
use Irazasyed\LaravelGAMP\Facades\GAMP; use Irazasyed\LaravelGAMP\Facades\GAMP;
use Illuminate\Http\Request; use Illuminate\Http\Request;
@ -270,7 +271,7 @@ class InstallerController extends Controller
$gamp = GAMP::setClientId(uniqid('', true)); $gamp = GAMP::setClientId(uniqid('', true));
$gamp->setDocumentPath('/install'); $gamp->setDocumentPath('/install');
$gamp->setCustomDimension(PHP_VERSION, 1); $gamp->setCustomDimension(PHP_VERSION, AnalyticsDimensions::PHP_VERSION);
$gamp->sendPageview(); $gamp->sendPageview();
# If analytics are disabled # If analytics are disabled