Improvements to analytics
This commit is contained in:
parent
c638b40f83
commit
9fd85f1f26
1 changed files with 2 additions and 1 deletions
|
|
@ -28,13 +28,14 @@ class AnalyticsListener
|
|||
$analyticsId = env('ANALYTICS_KEY');
|
||||
$client = $payment->client;
|
||||
$amount = $payment->amount;
|
||||
$item = $invoice->invoice_items->last()->product_key;
|
||||
|
||||
$base = "v=1&tid={$analyticsId}&cid={$client->public_id}&cu=USD&ti={$invoice->invoice_number}";
|
||||
|
||||
$url = $base . "&t=transaction&ta=ninja&tr={$amount}";
|
||||
$this->sendAnalytics($url);
|
||||
|
||||
$url = $base . "&t=item&in=plan&ip={$amount}&iq=1";
|
||||
$url = $base . "&t=item&in={$item}&ip={$amount}&iq=1";
|
||||
$this->sendAnalytics($url);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue