• Resolved mojopowder

    (@mojopowder)


    Hello. Is it possible to exclude an IP address or addresses from the analytics (visits)? In checking the site as regular users, it registers it as visits or return visits. This would help staff that needs to constantly check the site, most of the time clearing all cookies for each visit.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Lap

    (@lapzor)

    You can make a slight adaption on this code snippet:

    https://github.com/ibericode/koko-analytics/blob/master/code-snippets/disable-tracking-on-certain-urls.php

    Of course instead of

    if ( stripos( $_SERVER[‘REQUEST_URI’], ‘/wp-admin/’ ) === 0 ) { ….

    you would do something like

    if ( $_SERVER[‘REMOTE_ADDR’] === “123.234.345.456” ) { ….

    Hope that helps. If you have any questions, please let me know!

    erdincyildiz

    (@erdincyildiz)

    Hi @lapzor that was also what i wanted to ask. I understood thet a code will do but could you please wrıte the whole code for excluding wp-admin and multiple ip’s at once? How to separate the ip’s, since i saw two lines in the code at github.

    You may have noticed that i have no clue in writing codes but adding them 🙂

    Do i have to add multiple snippets for every ip address or does one code do it?

    Thank you and nice plugin by the way.

    Plugin Support Lap

    (@lapzor)

    I’m sorry, at this time we can’t provide fully tested custom code via this support channel.

    I recommend you hire someone on one of the crowdsourcing sites to write the code for you, it shouldn’t be much work given the examples above.

    Hope that helps. If you have any questions, please let me know!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Exclude IP address’ is closed to new replies.