From 8a08aef3d540c8212b8c0504c12a7270cadb3a02 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Fri, 13 Oct 2017 16:10:29 +0300 Subject: [PATCH] Fix GA currency code --- app/Listeners/AnalyticsListener.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Listeners/AnalyticsListener.php b/app/Listeners/AnalyticsListener.php index 2e291046d9..9b8ba4b15e 100644 --- a/app/Listeners/AnalyticsListener.php +++ b/app/Listeners/AnalyticsListener.php @@ -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);