• Resolved Francesco

    (@francesco_5005)


    hi,

    to avoid the creation of the cookie slimstat_tracking_code it’s necessary to change two rows of code in slimstat.php . In short we’ve to modify this:

    $is_set_cookie = apply_filters('slimstat_set_visit_cookie', true);

    with this:

    $is_set_cookie = apply_filters('slimstat_set_visit_cookie', false);

    but after the plugin upgrade, the change is lost. I know that slimstat_tracking_code contains an hash to distinguish the different visitors of a web site, and it can be useful if two or more visitors have the same IP.

    But in my company they prefer to avoid the creation of the cookie without anonymizing the IP of the visitors, so I ask if it’s possibile, in the future versions of Slimstat, to have a checkbox to disable, once and for all, the slimstat_tracking_code.

    https://ww.wp.xz.cn/plugins/wp-slimstat/

Viewing 1 replies (of 1 total)
  • Plugin Contributor Jason Crouse

    (@coolmann)

    That’s exactly why apply_filters is there. To allow users to change that value based on their needs. Note that a switch (checkbox) would not offer the same kind of flexibility, since your true/false could be based on many different conditions (username, ip address, etc). Long story short, you can simply code an add-on for Slimstat that does what you need. Please take a look at our knowledge base for more info on how to implement a Slimstat add-on, with code snippets and info on all the hooks exposed by Slimstat.

    Cheers
    Camu

Viewing 1 replies (of 1 total)

The topic ‘slimstat_tracking_code’ is closed to new replies.