Merge GA currency fix

This commit is contained in:
Hillel Coren 2017-10-14 21:08:33 +03:00
parent b9e91f02e4
commit 02edf9f61a

View File

@ -38,8 +38,9 @@ class AnalyticsListener
$client = $payment->client;
$amount = $payment->amount;
$item = $invoice->invoice_items->last()->product_key;
$currencyCode = $client->getCurrencyCode();
$base = "v=1&tid={$analyticsId}&cid={$client->public_id}&cu=USD&ti={$invoice->invoice_number}";
$base = "v=1&tid={$analyticsId}&cid={$client->public_id}&cu={$currencyCode}&ti={$invoice->invoice_number}";
$url = $base . "&t=transaction&ta=ninja&tr={$amount}";
$this->sendAnalytics($url);