• jeffeotto

    (@jeffeotto)


    I’m heaving this problem with a web. Any link from a newsletter campaign or external links build with url builder are like this utm_source= utm_medium and so on.

    When these links come to the web they hit like this utm-medium, utm-source.

    Dash are converted to hyphen and i loose the tracks.

    I have this on functions.php

    $full_url = pfc_full_url();
    $qs = $_SERVER[‘QUERY_STRING’];
    if(

    strpos($qs,’related_musician’) === false &&
    strpos($qs,’related_episode’) === false &&
    strpos($qs,’related_news’) === false &&
    strpos($full_url,’/the-team/’) === false &&
    strpos($full_url,’/musician/’) === false &&
    strpos($full_url,’wp-admin’) === false &&
    strpos($full_url,’wp-login’) === false &&
    strpos($full_url, ‘_’) !== false)
    {
    $full_url = str_replace(‘_’, ‘-‘, $full_url);
    header(“Location: $full_url”, true, 301);
    die;
    }

    and this in formatting.php
    $title = str_replace(‘.’, ‘-‘, $title);

    i understand that if i change str_replace all my old posts will be not found.

    Any way of add an exception to external links??

    Thank you

    Jeffe

  • The topic ‘Analytics links being rewritten!’ is closed to new replies.