diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php
index 22a8a1c00407..5adac2baa1bb 100755
--- a/app/controllers/AccountController.php
+++ b/app/controllers/AccountController.php
@@ -184,7 +184,8 @@ class AccountController extends \BaseController {
else if ($section == ACCOUNT_ADVANCED_SETTINGS)
{
$data = [
- 'account' => Auth::user()->account
+ 'account' => Auth::user()->account,
+ 'feature' => $subSection
];
return View::make("accounts.{$subSection}", $data);
diff --git a/app/controllers/ReportController.php b/app/controllers/ReportController.php
index b872251cb9bc..8404f839e66f 100755
--- a/app/controllers/ReportController.php
+++ b/app/controllers/ReportController.php
@@ -96,7 +96,8 @@ class ReportController extends \BaseController {
'chartType' => $chartType,
'startDate' => $startDate->format(Session::get(SESSION_DATE_FORMAT)),
'endDate' => $endDate->modify('-1'.$padding)->format(Session::get(SESSION_DATE_FORMAT)),
- 'groupBy' => $groupBy
+ 'groupBy' => $groupBy,
+ 'feature' => ACCOUNT_CHART_BUILDER,
];
return View::make('reports.report_builder', $params);
diff --git a/app/ninja/repositories/AccountRepository.php b/app/ninja/repositories/AccountRepository.php
index d6d5102fb0ea..63aeb24ec486 100755
--- a/app/ninja/repositories/AccountRepository.php
+++ b/app/ninja/repositories/AccountRepository.php
@@ -198,6 +198,7 @@ class AccountRepository
$client = new Client;
$client->public_id = Auth::user()->account_id;
$client->user_id = $ninjaAccount->users()->first()->id;
+ $client->currency_id = 1;
foreach (['name', 'address1', 'address2', 'city', 'state', 'postal_code', 'country_id', 'work_phone'] as $field)
{
$client->$field = Auth::user()->account->$field;
diff --git a/app/views/accounts/nav_advanced.blade.php b/app/views/accounts/nav_advanced.blade.php
index 63c5c32d421c..538a14146ab8 100644
--- a/app/views/accounts/nav_advanced.blade.php
+++ b/app/views/accounts/nav_advanced.blade.php
@@ -8,7 +8,7 @@
@if (!Auth::user()->account->isPro())
diff --git a/app/views/accounts/payments.blade.php b/app/views/accounts/payments.blade.php
index 47c92811f32c..dad6767e3673 100755
--- a/app/views/accounts/payments.blade.php
+++ b/app/views/accounts/payments.blade.php
@@ -95,7 +95,7 @@
var contents = $(this).parent().contents();
contents[contents.length - 1].nodeValue = '';
$(this).after('.attr('data-imageUrl') + ')
');
- $(this).parent().children().last().after('Create an account');
+ $(this).parent().children().last().after('Create an account');
});
diff --git a/app/views/header.blade.php b/app/views/header.blade.php
index f9ff544111b5..76aa74764d21 100755
--- a/app/views/header.blade.php
+++ b/app/views/header.blade.php
@@ -489,6 +489,7 @@ Want something changed? We're {{ link_to('https://github.com/hillelcoren/invoice
'&new_last_name=' + encodeURIComponent($('form.signUpForm #new_last_name').val()) +
'&go_pro=' + $('#go_pro').val(),
success: function(result) {
+ trackUrl('/signed_up');
if (result) {
localStorage.setItem('guest_key', '');
NINJA.isRegistered = true;
@@ -526,15 +527,19 @@ Want something changed? We're {{ link_to('https://github.com/hillelcoren/invoice
function showSignUp() {
$('#signUpModal').modal('show');
+ trackUrl('/view_sign_up');
}
@if (Auth::check() && !Auth::user()->isPro())
- function showProPlan() {
+ var proPlanFeature = false;
+ function showProPlan(feature) {
+ proPlanFeature = feature;
$('#proPlanModal').modal('show');
+ trackUrl('/view_pro_plan/' + feature);
}
function submitProPlan() {
-
+ trackUrl('/submit_pro_plan/' + proPlanFeature);
if (NINJA.isRegistered) {
$('#proPlanDiv, #proPlanFooter').hide();
$('#proPlanWorking').show();
diff --git a/app/views/invoices/edit.blade.php b/app/views/invoices/edit.blade.php
index 7d5fcd1e0812..2d5043fda490 100755
--- a/app/views/invoices/edit.blade.php
+++ b/app/views/invoices/edit.blade.php
@@ -276,7 +276,7 @@
@if (!Auth::user()->account->isPro())
@endif
diff --git a/app/views/master.blade.php b/app/views/master.blade.php
index 04d8c7dad021..58ae3b71fc3c 100755
--- a/app/views/master.blade.php
+++ b/app/views/master.blade.php
@@ -51,7 +51,7 @@
- @if (App::environment() == ENV_PRODUCTION && isset($_ENV['ANALYTICS_KEY']) && $_ENV['ANALYTICS_KEY'])
+ @if (isset($_ENV['ANALYTICS_KEY']) && $_ENV['ANALYTICS_KEY'])