Custom referrer snippet not working - koko-analytics

Followup for #75 .1. how to filter out the referrers I add from my previous data? 2. @dannyvankooten I have had the filter on for a week and the URLs I shared above are not being blocked.

Asked Sep 25 '21 23:09
avatar askel45
askel45

5 Answer:

Hello @askel45,

Please share the complete and exact snippet you have in place and also where you placed it on your website (in what file). That way I can take a look.

1
Answered Jul 01 '20 at 13:58
avatar  of dannyvankooten
dannyvankooten

This is the code I have...

// Add custom referrers to Koko's refferer blocklist
add_filter( 'koko_analytics_referrer_blocklist', function() {
    return array(
        'int.search.myway.com',
        'int.search.tb.ask.com',
    );
});

I place my Koko analytics plugin codes in a custom plugin in the plugins directory (that I use for the theme functions and WP purposes). The full URLs are as follows: 1. int.search.myway.com/search/GGmain.jhtml 2. int.search.tb.ask.com/search/GGmain.jhtml 3. static.bangnewsinfo.com/searchResult 4, lavasoft.gosearchresults.com

1
Answered Jul 01 '20 at 14:54
avatar  of askel45
askel45

That snippet looks correct to me, are you sure your custom plugin is loaded and executed correctly?

Also, please note that the snippet will only filter these referrer domains going forward so any previous data will not automagically be deleted.

1
Answered Jul 08 '20 at 08:44
avatar  of dannyvankooten
dannyvankooten

I just confirmed this to be a bug in the Koko Analytics plugin, it'll be fixed in the next plugin update (without any necessary changes to your snippet already in place).

1
Answered Jul 08 '20 at 08:52
avatar  of dannyvankooten
dannyvankooten

Cool, thanks. I have decided to go back to GA for now. But I will install the plugin afresh when you implement the feature to export data (and to count 404s as well, but this is minor).

1
Answered Jul 18 '20 at 08:19
avatar  of askel45
askel45