@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | $urlParts = parse_url($url); |
| 73 | 73 | $url = $urlParts['path'] ?? '/'; |
| 74 | 74 | if (isset($urlParts['query'])) { |
| 75 | - $url .= '?' . $urlParts['query']; |
|
| 75 | + $url .= '?'.$urlParts['query']; |
|
| 76 | 76 | } |
| 77 | 77 | } |
| 78 | 78 | |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | $path = parse_url($url, PHP_URL_PATH); |
| 114 | 114 | $pathFragments = explode('/', rtrim($path, '/')); |
| 115 | 115 | $fileName = end($pathFragments); |
| 116 | - $trackingUrl = UrlHelper::siteUrl('instantanalytics/pageViewTrack/' . $fileName, $urlParams); |
|
| 116 | + $trackingUrl = UrlHelper::siteUrl('instantanalytics/pageViewTrack/'.$fileName, $urlParams); |
|
| 117 | 117 | |
| 118 | 118 | InstantAnalytics::$plugin->logAnalyticsEvent( |
| 119 | 119 | 'Created pageViewTrackingUrl for: {trackingUrl}', |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | $urlParams = compact('url', 'eventName', 'params'); |
| 145 | 145 | |
| 146 | 146 | $fileName = pathinfo(parse_url($url, PHP_URL_PATH), PATHINFO_BASENAME); |
| 147 | - $trackingUrl = UrlHelper::siteUrl('instantanalytics/eventTrack/' . $fileName, $urlParams); |
|
| 147 | + $trackingUrl = UrlHelper::siteUrl('instantanalytics/eventTrack/'.$fileName, $urlParams); |
|
| 148 | 148 | |
| 149 | 149 | InstantAnalytics::$plugin->logAnalyticsEvent( |
| 150 | 150 | 'Created eventTrackingUrl for: {trackingUrl}', |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | $result = true; |
| 169 | 169 | $request = Craft::$app->getRequest(); |
| 170 | 170 | |
| 171 | - $logExclusion = static function (string $setting) |
|
| 171 | + $logExclusion = static function(string $setting) |
|
| 172 | 172 | { |
| 173 | 173 | if (InstantAnalytics::$settings->logExcludedAnalytics) { |
| 174 | 174 | $request = Craft::$app->getRequest(); |
@@ -277,7 +277,7 @@ discard block |
||
| 277 | 277 | $cid = $_COOKIE['_ia']; |
| 278 | 278 | } else { |
| 279 | 279 | // Generate our own client id, otherwise. |
| 280 | - $cid = static::gaGenUUID() . '.1'; |
|
| 280 | + $cid = static::gaGenUUID().'.1'; |
|
| 281 | 281 | } |
| 282 | 282 | |
| 283 | 283 | if (InstantAnalytics::$settings->createGclidCookie && !empty($cid)) { |
@@ -296,7 +296,7 @@ discard block |
||
| 296 | 296 | { |
| 297 | 297 | $sessionString = ''; |
| 298 | 298 | $measurementId = App::parseEnv(InstantAnalytics::$settings->googleAnalyticsMeasurementId); |
| 299 | - $cookieName = '_ga_' . StringHelper::removeLeft($measurementId, 'G-'); |
|
| 299 | + $cookieName = '_ga_'.StringHelper::removeLeft($measurementId, 'G-'); |
|
| 300 | 300 | |
| 301 | 301 | if (isset($_COOKIE[$cookieName])) { |
| 302 | 302 | $parts = explode(".", $_COOKIE[$cookieName], 5); |