1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Add UTM to billing portal purchase

This commit is contained in:
David Bomba 2023-04-29 11:11:51 +10:00
parent d05b41e452
commit 4a3846dce8

View File

@ -529,6 +529,8 @@ class BillingPortalPurchasev2 extends Component
->adjustInventory()
->save();
$utm = isset($this->request_data['utm']) ? $this->request_data['utm'] : null;
Cache::put($this->hash, [
'subscription_id' => $this->subscription->hashed_id,
'email' => $this->email ?? $this->contact->email,
@ -537,6 +539,7 @@ class BillingPortalPurchasev2 extends Component
'context' => 'purchase',
'campaign' => $this->campaign,
'bundle' => $this->bundle,
'utm' => $utm,
], now()->addMinutes(60));
$this->emit('beforePaymentEventsCompleted');