[insert_php]
$ret = $param = “”;
$params = [];
parse_str(parse_url($_SERVER[‘HTTP_REFERER’], PHP_URL_QUERY), $params);
if(!empty($params[‘gclid’])) {
$param = “google-ranking”;
}
elseif(!empty($params[‘utm_source’]) && $params[‘utm_source’]==”taboola”) {
$param = “taboola-ranking”;
}
elseif(!empty($params[‘utm_source’])) {
$param = $params[‘utm_source’];
}
$ret = “https://www.grinday.com/pl/sklep/12-mind-up-enegry-for-mind.html?utm_source={$param}-{$_SERVER[‘HTTP_HOST’]}&utm_campaign={$param}”;
[/insert_php]