• Resolved lokonie

    (@lokonie)


    Hi,
    I want to exclude visitors of the page https://www.inge-koepsell.de/archiv/ to be counted. How can I do this in the statify__skip_tracking function?

    As I am not familiar with php I would like to know how to create this special “condition”

    add_filter(
    ‘statify__skip_tracking’,
    function() {
    if ( condition ) {
    return true;
    }

    return false;
    }
    );

    Thanks in advance for your help!
    lokonie

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Torsten Landsiedel

    (@zodiac1978)

    Hi @lokonie

    if I follow the link I get a 404 error.

    If this is normal page, like you wrote, you can use the is_page function as condition:
    https://developer.www.ads-software.com/reference/functions/is_page/

    Untested, but should work:

    add_filter(
        'statify__skip_tracking',
        function() {
            if ( is_page( 'archiv' ); ) {
                return true;
            }
    	
            return false;
        }
    );

    This means, the plugin should skip tracking if it is processing the page that has the title/slug “archiv”.

    (We could always switch to German if this is easier for you.)

    All the best
    Torsten

    Thread Starter lokonie

    (@lokonie)

    Hallo Torsten,
    hab vielen, vielen Dank in dreifacher Hinsicht:
    – für die Probleml?sung (“archiv” war nur als Beispiel zu verstehen)
    – für den Link zu der Code Reference und
    – für den Tipp mit der dt. Sprache ??
    Viele Grü?e
    lokonie

    Plugin Support Torsten Landsiedel

    (@zodiac1978)

    Hallo @lokonie

    Sehe gerade noch einen Fehler in meinem Code. Das mitkopierte Semikolon geh?rt da natürlich nicht rein!

    Beste Grü?e
    Torsten

    Plugin Support Torsten Landsiedel

    (@zodiac1978)

    add_filter(
        'statify__skip_tracking',
        function() {
            if ( is_page( 'archiv' ) ) {
                return true;
            }
    	
            return false;
        }
    );
    Thread Starter lokonie

    (@lokonie)

    Hallo Torsten,
    vielen Dank, das Semikolon hatte ich schon weggelassen.
    Viele Grü?e
    lokonie

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to exclude a special page with the function statify__skip_tracking’ is closed to new replies.