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),
|
||||
|
@ -7,9 +7,9 @@
|
||||
<h1><img src="{{ asset('images/icon-features.png') }}"><span class="thin">THE</span> FEATURES</h1>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<section class="features features1">
|
||||
<section class="features features1">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-5 valign">
|
||||
@ -19,7 +19,7 @@
|
||||
</div>
|
||||
<p class="first">Set the code free! Here at Invoice Ninja, we’re all about being non-evil, and providing full code transparency is a central manifestation of this value.</p>
|
||||
<p>Our users started seeing the benefits of open source within days of our launch, when we rolled out v1.0.2, which included some key code improvements that our friends on GitHub sent our way.
|
||||
</p>
|
||||
</p>
|
||||
<p>We firmly believe that being an open source product helps everyone involved. We’re looking forward to seeing what the developers out there can do to take Invoice Ninja into new realms of usefulness.</p>
|
||||
|
||||
|
||||
@ -45,14 +45,14 @@
|
||||
</div>
|
||||
<p class="first">Set the code free! Here at Invoice Ninja, we’re all about being non-evil, and providing full code transparency is a central manifestation of this value.</p>
|
||||
<p>Our users started seeing the benefits of open source within days of our launch, when we rolled out v1.0.2, which included some key code improvements that our friends on GitHub sent our way.
|
||||
</p>
|
||||
</p>
|
||||
<p>We firmly believe that being an open source product helps everyone involved. We’re looking forward to seeing what the developers out there can do to take Invoice Ninja into new realms of usefulness.</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="features features3">
|
||||
</section>
|
||||
<section class="features features3">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
@ -82,7 +82,7 @@
|
||||
</div>
|
||||
<p class="first">With Invoice Ninja, we’ve done away with the need for cumbersome multi-click invoice previewing after each save.</p>
|
||||
<p>When you enter the details of your customer and/or invoice in our editor, you can instantly see the results in the pdf preview pane below. Want to see what your invoice would look like in a different layout style? The live pdf can show you four beautiful preset styles in real time too.
|
||||
</p><p><i>Just create, save, send, and you’re done!</i></p>
|
||||
</p><p><i>Just create, save, send, and you’re done!</i></p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@ -104,7 +104,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="upper-footer features center">
|
||||
<section class="upper-footer features center">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
|
@ -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