Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Danny van Kooten

    (@dvankooten)

    Hey @kkarpieszuk,

    Thank you – let’s fix this!

    1. Do you (think you) have many visitors with JS disabled?
    2. Alternatively, do you have many visitors with “Do Not Track” enabled in their browser settings?

    Koko Analytics uses a tiny client-side tracking script so any visitors without JavaScript enabled will not be tracked. Also, it currently honors the browsers “Do Not Track” setting, so any visitors with that setting enabled will also be excluded from the results.

    Alternatively, are you excluding any user roles in Koko Analytics settings which are not excluded for Google Analytics tracking?

    If that can’t explain it, could it be that there are pages on your website that have the Google Analytics tracking snippet but not the Koko Analytics tracking snippet? For example, any pages on your domain which are not managed by WordPress?

    I did a quick browse through your website and saw the correct tracking call for Koko Analytics on every page I visited so far, so that all looks good to me.

    Thread Starter kkarpieszuk

    (@kkarpieszuk)

    > 1. Do you (think you) have many visitors with JS disabled?
    > 2. Alternatively, do you have many visitors with “Do Not Track” enabled in their browser settings?

    I don’t think so. Let’s focus on my wpzlecenia.pl site.

    There were 666 users in last 7 days according to GA and only 4 users accordingo to Koko. That’s huge difference, I can’t imagine 662 of 666 users blocks js or has DNT set (Firefox is setting this by default but GA says it is 12% of my users only) .

    > Alternatively, are you excluding any user roles in Koko Analytics settings which are not excluded for Google Analytics tracking?

    > If that can’t explain it, could it be that there are pages on your website that have the Google Analytics tracking snippet but not the Koko Analytics tracking snippet? For example, any pages on your domain which are not managed by WordPress?

    I am affraid this is not the case too. All my subpages are wp content with correct wp_head() and wp_footer().

    Plugin Author Danny van Kooten

    (@dvankooten)

    There were 666 users in last 7 days according to GA and only 4 users accordingo to Koko. That’s huge difference, I can’t imagine 662 of 666 users blocks js or has DNT set (Firefox is setting this by default but GA says it is 12% of my users only) .

    Yeah, that doesn’t sound right at all.

    One thing I do notice on wpzlecenia.pl is that visiting your website asks me for HTTP Basic Authentication. Also I can see that the Koko Analytics tracking request is failing because of a HTTP 401 Unauthorized response. You can check this by opening your developer tools and checking the Network tab. Is your WP Admin on this website behind HTTP Basic Auth by any chance?

    If so, you should most likely exclude the /wp-admin/admin-ajax.php file from this check, as it is also commonly used for AJAX requests that are not admin related. It’s a little weird that WordPress chose to place in the /wp-admin/ subdirectory…

    Thread Starter kkarpieszuk

    (@kkarpieszuk)

    @dvankooten, yes I am using auth for wp-admin. I excluded now admin-ajax.php by adding to htaccess:

    <Files admin-ajax.php>
      Order allow,deny
      Allow from all
      Satisfy any
    </Files>

    let’s see if it works

    Plugin Author Danny van Kooten

    (@dvankooten)

    Hi @kkarpieszuk,

    The network request for collecting data is returning HTTP 200 OK for me now, so that part looks good!

    Thread Starter kkarpieszuk

    (@kkarpieszuk)

    Yes, I confirm Koko registered 86 visitors and 247 pageviews for yesterday so it works! Thank you and sorry for bad review, it is 5 stars now.

    Other question:

    I am going to recommend your plugin on dev.wpzlecenia.pl – I will write short post there. It is portal dedicated for wp developers so for sure there will be a question in comments about performance. Could you tell me which part of your plugin is responsible for saving data in DB? I will check the code and see how it goes

    Plugin Author Danny van Kooten

    (@dvankooten)

    @kkarpieszuk Awesome, glad that’s sorted now. Thank you for the plugin review, much appreciated!

    The relevant code for saving the pageview request in a temporary buffer file is here: https://github.com/ibericode/koko-analytics/blob/master/src/functions.php#L11

    This file is append-only, so this write is really, really fast.

    The plugin then runs a separate process every minute to aggregate the pageviews into your database, the code for that is here: https://github.com/ibericode/koko-analytics/blob/master/src/class-aggregator.php

    This set-up allows Koko Analytics to perform really well. In my benchmarks on a cheap $5 VPS it was able to record well over 1.000 pageviews per minute.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Not relevant data’ is closed to new replies.