Skip to content

Commit 09273b6

Browse files
Save utms
1 parent 48061f0 commit 09273b6

1 file changed

Lines changed: 29 additions & 30 deletions

File tree

src/CmsSeoComponent.php

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -302,38 +302,37 @@ public function bootstrap($application)
302302
'forcePageParam' => $this->forcePageParam,
303303
]);
304304

305-
if (ENV == 'dev') {
306-
if (\Yii::$app->request->queryParams) {
307-
$utms = [];
308-
foreach (\Yii::$app->request->queryParams as $paramName => $paramValue) {
309-
if (in_array($paramName, [
310-
'from',
311-
'_openstat',
312-
313-
'utm_source',
314-
'utm_medium',
315-
'utm_campaign',
316-
'utm_content',
317-
'utm_term',
318-
'utm_referrer',
319-
320-
'pm_source',
321-
'pm_block',
322-
'pm_position',
323-
324-
'clid',
325-
'yclid',
326-
'ymclid',
327-
'frommarket',
328-
'text',
329-
])) {
330-
$utms[$paramName] = $paramValue;
331-
}
305+
306+
if (\Yii::$app->request->queryParams) {
307+
$utms = [];
308+
foreach (\Yii::$app->request->queryParams as $paramName => $paramValue) {
309+
if (in_array($paramName, [
310+
'from',
311+
'_openstat',
312+
313+
'utm_source',
314+
'utm_medium',
315+
'utm_campaign',
316+
'utm_content',
317+
'utm_term',
318+
'utm_referrer',
319+
320+
'pm_source',
321+
'pm_block',
322+
'pm_position',
323+
324+
'clid',
325+
'yclid',
326+
'ymclid',
327+
'frommarket',
328+
'text',
329+
])) {
330+
$utms[$paramName] = $paramValue;
332331
}
332+
}
333333

334-
if ($utms) {
335-
$this->setUtms($utms);
336-
}
334+
if ($utms) {
335+
$this->setUtms($utms);
337336
}
338337
}
339338
});

0 commit comments

Comments
 (0)