• Resolved Marroiak

    (@marroiak)


    Is it there an option to merge different domain referrers into a single one?

    Example:
    google.com, google.es, google.fr, etc…
    All together displayed as google.com

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    @marroiak this is currently not possible out of the box, but you could use a filter to accomplish this:

    function my_burst_data($data) {
        $referrer = $data['referrer'];
        if ( strpos($referrer, 'google.es')!==false ) {
            $referrer = str_replace('google.es', 'google.com', $referrer);
        }
        $data['referrer'] = $referrer;
        return $data;
    }
    add_filter( 'burst_before_track_hit', 'my_burst_data');

    You can extend the above to merge referrers to your liking.

    Thread Starter Marroiak

    (@marroiak)

    Thanks for your reply but it is not working.
    Both domains are still displayed (google.es and google.com)

    Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    Please note that this only applies to new hits, existing hits won’t get updated.

    I’ll add it to our feature request list, I can’t say when it will get implemented at this moment, but if it’s a quick fix we can add it somewhere between new features.

    Thread Starter Marroiak

    (@marroiak)

    It is still displaying google.com and .es separately. two days after I added the code into functions.php it

    Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    Ok, we will add it to our feature request list for upcoming updates. Thank you for your suggestion.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Merge Referrers’ is closed to new replies.