mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Added goal tracking
This commit is contained in:
parent
aa7542c2fa
commit
4d2473dc9f
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -8,7 +8,7 @@
|
||||
@if (!Auth::user()->account->isPro())
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div style="font-size:larger;" class="col-md-8 col-md-offset-2">{{ trans('texts.pro_plan_advanced_settings', ['link'=>'<a href="#" onclick="showProPlan()">'.trans('texts.pro_plan.remove_logo_link').'</a>']) }}</div>
|
||||
<div style="font-size:larger;" class="col-md-8 col-md-offset-2">{{ trans('texts.pro_plan_advanced_settings', ['link'=>'<a href="#" onclick="showProPlan(\''.$feature.'\')">'.trans('texts.pro_plan.remove_logo_link').'</a>']) }}</div>
|
||||
<p/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -95,7 +95,7 @@
|
||||
var contents = $(this).parent().contents();
|
||||
contents[contents.length - 1].nodeValue = '';
|
||||
$(this).after('<img src="' +$(this).attr('data-imageUrl') + '" /><br />');
|
||||
$(this).parent().children().last().after('<a href="' + $(this).attr('data-siteUrl') + '">Create an account</a>');
|
||||
$(this).parent().children().last().after('<a href="#" onclick="openUrl(\'' + $(this).attr('data-siteUrl') + '\')">Create an account</a>');
|
||||
});
|
||||
|
||||
|
||||
|
@ -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();
|
||||
|
@ -276,7 +276,7 @@
|
||||
|
||||
@if (!Auth::user()->account->isPro())
|
||||
<div style="font-size:larger">
|
||||
{{ trans('texts.pro_plan.remove_logo', ['link'=>'<a href="#" onclick="showProPlan()">'.trans('texts.pro_plan.remove_logo_link').'</a>']) }}
|
||||
{{ trans('texts.pro_plan.remove_logo', ['link'=>'<a href="#" onclick="showProPlan(\'remove_logo\')">'.trans('texts.pro_plan.remove_logo_link').'</a>']) }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
@ -51,7 +51,7 @@
|
||||
|
||||
<body>
|
||||
|
||||
@if (App::environment() == ENV_PRODUCTION && isset($_ENV['ANALYTICS_KEY']) && $_ENV['ANALYTICS_KEY'])
|
||||
@if (isset($_ENV['ANALYTICS_KEY']) && $_ENV['ANALYTICS_KEY'])
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
|
@ -23,7 +23,7 @@
|
||||
background-image: url({{ asset('/images/hero-bg-1.jpg') }});
|
||||
}
|
||||
.hero-about {
|
||||
background-image: url({{ asset('/images/hero-bg-3.jpg.jpg') }});
|
||||
background-image: url({{ asset('/images/hero-bg-4.jpg') }});
|
||||
}
|
||||
.hero-plans {
|
||||
background-image: url({{ asset('/images/hero-bg-plans.jpg') }});
|
||||
@ -98,6 +98,7 @@
|
||||
<li>{{ link_to('about', 'About Us' ) }}</li>
|
||||
<li>{{ link_to('plans', 'Plans' ) }}</li>
|
||||
<li>{{ link_to('contact', 'Contact Us' ) }}</li>
|
||||
<li>{{ link_to('http://blog.invoiceninja.com', 'Blog' ) }}</li>
|
||||
<li>{{ link_to('login', Auth::check() ? 'My Account' : 'Login' ) }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
@ -157,6 +158,7 @@
|
||||
<li>{{ link_to('about', 'About Us' ) }}</li>
|
||||
<li>{{ link_to('plans', 'Plans' ) }}</li>
|
||||
<li>{{ link_to('contact', 'Contact Us' ) }}</li>
|
||||
<li>{{ link_to('http://blog.invoiceninja.com', 'Blog' ) }}</li>
|
||||
<li>{{ link_to('login', Auth::check() ? 'My Account' : 'Login' ) }}</li>
|
||||
</ul>
|
||||
|
||||
|
@ -95,7 +95,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- <p>or {{ link_to('features', 'View Our Features' ) }}</a></p> -->
|
||||
<p><i>No signup needed</i></p>
|
||||
<p>No signup needed</p>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<img src="{{ asset('images/devices.png') }}">
|
||||
|
@ -39443,3 +39443,13 @@ function setDocHexDraw(doc, hex) {
|
||||
var b = hexToB(hex);
|
||||
return doc.setDrawColor(r, g, b);
|
||||
}
|
||||
|
||||
function openUrl(url) {
|
||||
trackUrl(url);
|
||||
window.open(url, '_blank');
|
||||
}
|
||||
|
||||
function trackUrl(url) {
|
||||
url = '/track' + url.replace('http:/', '');
|
||||
ga('send', 'pageview', url);
|
||||
}
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
@ -1727,3 +1727,13 @@ function setDocHexDraw(doc, hex) {
|
||||
var b = hexToB(hex);
|
||||
return doc.setDrawColor(r, g, b);
|
||||
}
|
||||
|
||||
function openUrl(url) {
|
||||
trackUrl(url);
|
||||
window.open(url, '_blank');
|
||||
}
|
||||
|
||||
function trackUrl(url) {
|
||||
url = '/track' + url.replace('http:/', '');
|
||||
ga('send', 'pageview', url);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user