|
3 | 3 | namespace Ipunkt\LaravelAnalytics\Providers;
|
4 | 4 |
|
5 | 5 | use App;
|
| 6 | +use Illuminate\Support\Arr; |
6 | 7 | use InvalidArgumentException;
|
7 | 8 | use Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface;
|
8 | 9 | use Ipunkt\LaravelAnalytics\Data\Campaign;
|
@@ -138,14 +139,14 @@ class GoogleAnalytics implements AnalyticsProviderInterface
|
138 | 139 | */
|
139 | 140 | public function __construct(array $options = [])
|
140 | 141 | {
|
141 |
| - $this->trackingId = array_get($options, 'tracking_id'); |
142 |
| - $this->optimizeId = array_get($options, 'optimize_id'); |
143 |
| - $this->trackingDomain = array_get($options, 'tracking_domain', 'auto'); |
144 |
| - $this->trackerName = array_get($options, 'tracker_name', 't0'); |
145 |
| - $this->displayFeatures = array_get($options, 'display_features', false); |
146 |
| - $this->anonymizeIp = array_get($options, 'anonymize_ip', false); |
147 |
| - $this->autoTrack = array_get($options, 'auto_track', false); |
148 |
| - $this->debug = array_get($options, 'debug', false); |
| 142 | + $this->trackingId = Arr::get($options, 'tracking_id'); |
| 143 | + $this->optimizeId = Arr::get($options, 'optimize_id'); |
| 144 | + $this->trackingDomain = Arr::get($options, 'tracking_domain', 'auto'); |
| 145 | + $this->trackerName = Arr::get($options, 'tracker_name', 't0'); |
| 146 | + $this->displayFeatures = Arr::get($options, 'display_features', false); |
| 147 | + $this->anonymizeIp = Arr::get($options, 'anonymize_ip', false); |
| 148 | + $this->autoTrack = Arr::get($options, 'auto_track', false); |
| 149 | + $this->debug = Arr::get($options, 'debug', false); |
149 | 150 |
|
150 | 151 | if ($this->trackingId === null) {
|
151 | 152 | throw new InvalidArgumentException('Argument tracking_id can not be null');
|
|
0 commit comments