Giter Site home page Giter Site logo

ibericode / koko-analytics Goto Github PK

View Code? Open in Web Editor NEW
357.0 18.0 29.0 4.07 MB

Privacy-friendly, open-source and lightweight analytics for your WordPress site.

Home Page: https://www.kokoanalytics.com/

License: GNU General Public License v3.0

PHP 79.49% JavaScript 15.49% CSS 5.02%
analytics privacy wordpress charts google-analytics marketing vanilla-javascript website website-analytics website-stats

koko-analytics's People

Contributors

alpipego avatar austinginder avatar dannyvankooten avatar davidnixon avatar dependabot[bot] avatar hirasso avatar intentionally-left-nil avatar mountbatt avatar ocean90 avatar sdegetaus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

koko-analytics's Issues

Database error when installing

image

At first, I thought I was making a mistake when installing the project via the command line, but it is happening also from the WordPress official repo.

It has happened in my live website and also in my local environment.

Inside phpMyAdmin, the table koko_analytics_referrer_urls was missing (as well as the wp-option koko_analytics_settings). Naturally, the plugin admin area didn't show anything!

To fix it, I created the table koko_analytics_referrer_urls by myself, and that fixed the issue.

I found this explanation on StackOverflow, but I am not sure exactly how to fix it.

Perhaps an important note: I am using a custom table prefix.

Let me know if you need more info πŸ™‚.

Oudated scripts.js caused 400 errors with tracker

Noticed the tracker was causing 400 errors via Chrome devtools as shown here. This was due to my CDN serving up an old copy of the scripts.js file. I was able to manually correct by purging my CDN. I'm wondering if cache busting could be built into the plugin itself. One method would be to rename scripts.js to a dated version and updated if it includes breaking changes.

Bar chart is not stacking properly

It adds the number pageviews to visitors, instead of overlapping. How I could have missed this, I don’t know. At least it seems no one noticed yet. πŸ˜‚

Feature suggestion: Setting to disable cookie

Currently, Koko Analytics sets a simple cookie that expires in 6 hours to keep track of pages viewed so we can determine whether a pageview is unique.

A setting to disable the cookie would stop us from detecting new visitors or unique pageviews, but it may be worth it for some that don't want to set a cookie in the visitor's browser.


Notify when done:


Please vote on this feature suggestion using πŸ‘ or πŸ‘Ž below.

Feature suggestion: Email Reports

Send a weekly or monthly e-mail report to the client with all the most important information. This is important for those clients that don't access the dashboard frequently or ever. Thank you for your amazing work!!


Please vote on this feature suggestion using πŸ‘ or πŸ‘Ž below.

Total visitor count not displayed correctly above 100K

The total visitor count shows only two (instead of three) numbers before the "K" when the count exceeds 100.000. See the screenshot below, where it should read "17xK".

I tested this in Chrome, Firefox and Opera with the same result.

kokoanalytics

Blank screen bug

Description

When visiting a date range containing only two days, Koko shows a completely blank screen (due to a javascript error).

[Error] RangeError: Invalid time value β€” admin.js:1:29852

How to reproduce

Select two dates next to each other, and refresh the page.

(Alternatively, just visit https://yoursite.com/wp-admin/index.php?page=koko-analytics#/?start_date=2020-1-28&end_date=2020-1-29)

Another form of this bug occurs if, when making a date selection, the user chooses only a single date, then refreshes the page before selecting the second date.

2020-01-27 09-44-54 2020-01-27 09_46_14

Temporary fix

Since the date range is stored in Local Storage, refreshing the page doesn't help. Nor does manually specifying different dates. The user needs to empty their browser's Local Storage.

Aggregate certain referrer hosts

  • google.de | google.de/url | google.de/search
  • bing.com | bing.com/search
  • facebook.com | l.facebook.com | m.facebook.com
  • pinterest.com | pinterest.com/pin/xxx (the xxx standing for an individual pin url)

This is not an exhaustive list, so suggestions are welcome.

Feature suggestion: Count 404 errors (page not found)

Like we keep track of post, page and post type views, we could also keep track of pages that return a 404 page not found error. This can be helpful in discovering dead links.


Please vote on this feature suggestion using πŸ‘ or πŸ‘Ž below.

Feature suggestion: track visitors to archive pages

Like category and tag pages. Currently these are ignored, to save some processing and because usually they are not as important as the homepage and singular post-type pages.


Please vote on this feature suggestion using πŸ‘ or πŸ‘Ž below.

Option to show last xx days in the analytics view

I'd like to suggest adding the option to show the last 28 days in the main chart - similar to the last 14 days view of the dashboard widget.

Last 28 days is the default view in Google Analytics, and I think there are good reasons for this. For instance, it is the best use of screen "real estate", as most other views that include the current day (e.g. this week, month, year) also show future days without any data yet. In contrast to that, a "floating" view of xx days would make sure that the chart always shows the maximum amount of data and information possible.

However, I also understand that there has to be a limit regarding the one-click options for the date picker.

My idea would be to limit the other options to "today, this week, this month, this year" and add the option to click through to the previous/next respective period (maybe with arrows above the chart like in the visits and pageview tables).

So when I want to see the stats for december I would switch to "this month" and then navigate back via the arrows.

Shortcut for yesterday stats

Hi,

I miss a shortcut to jump straight to yesterday stats in this screen:

Captura de Tela 2020-02-01 Γ s 17 46 55

It's also a matter of consistency, I guess, since every range has "this" and "last" options ("This week" and "Last week", for example), except "Today".

Feature suggestion: Track time on page

This is one of those features that while cool, I never really use it or use it for decision making. So I am fine leaving this out personally.

Please do let me know in the comments below if you feel otherwise though, I might be overlooking something.


Please vote on this feature suggestion using πŸ‘ or πŸ‘Ž below.

Feature suggestion: Exclude views by IP addresses

I am not sure if this feature might break the privacy following the plugin has, but it would be a super nice feature to include.

Personally, I would find this feature useful when I am testing something and I need to be logged off from my WordPress site to do it properly (normally, I just go into Incognito Mode, or a different device that I am not signed in).

Excluding by IP address is a good and standard way of doing this. What do you think?


Please vote on this feature suggestion using πŸ‘ or πŸ‘Ž below.

Hide visitors column if "use_cookie" setting is disabled

Now that #16 is merged into master, when the use of a cookie is disabled, Koko Analytics can no longer determine whether a visitor is returning so the number of visitors and the number of pageviews will always be the same.

We should probably just hide the "visitors" column in those cases.

Some issues with the "less than/more than previous period" count

Two issues, to be precise :-)

First, the numbers just don't seem to match up. Intuitively, I would expect a comparison between the period that is currently selected and the respective period preceding it.

So for instance: week 10 had 10.000 pageviews, week 11 had 11.000 pageviews. When selecting week 11, it should put out "1K more than previous period / +10%".

However, it doesn't do that at all. Generally speaking, the numbers are way too high, in one case even indicating there were 13K less pageviews although the pageviews were exactly the same for both weeks.

I'm using Koko Analytics without Cookies, so maybe it has something to do with that?

And second, the "less than previous period / more than previous period" strings are not translateable right now. If you set this up with the next update, we could have a 100% German version of Koko Analytics soon :-)

Feature suggestion: show realtime visitor count

Technically this is a little hard to build into the current set-up, but there are options. Visitors is problably impossible without hurting performance and/or the privacy centric approach, but pageviews in last X minutes should be doable.


Please vote on this feature suggestion using πŸ‘ or πŸ‘Ž below.

Feature suggestion: Event tracking

Personally I feel event tracking, like keeping track of the number of people submitting a contact form, is one of the most important metrics for a lot of website where the main goal is to get people to reach out to the website owner.

Two possible ways of going about this:

  • Automatically keep track of all form submissions and use the form ID or other information in the form element as a sort of label.
  • Manually add event tracking to just the interactions a site owner needs: link clicks, form submissions, focusing on a form input, etc.

We could start out with just the manual approach and when that's working well enough, slowly shift to a more automated way.


Please vote on this feature suggestion using πŸ‘ or πŸ‘Ž below.

Feature Suggestion - Remove query string from referrer

Hi, I think this is a really great product. One suggestion would be to remove the query string from referrers, or show it separately. If you have a long query string then it completely messes up the display:
Screenshot 2019-11-03 at 20 01 47
I am thinking something similar to this (although this does compress referrers by changing the different locales of Google, Facebook etc to a single entry):
Screenshot 2019-11-03 at 20 03 39

Feature suggestion: Purge data older than X days

Would be nice if data could be purged after a set number of days, months or years.

This shouldn't normally be necessary for performance or storage size reasons given that data only takes up a single row per day, but I'd say that it's almost never really required to see how your website was doing 5 years ago.


Please vote on this feature suggestion using πŸ‘ or πŸ‘Ž below.

Feature suggestion: Count operating systems

For each new site visitors, keep track of their operating system.

Personally I feel this is almost never required. It has certainly never influenced any decision I made in building or managing a website.


Please vote on this feature suggestion using πŸ‘ or πŸ‘Ž below.

User role exclusion UI enhancement

Hello! I stumbled upon your plugin and immediately was hooked! Just yesterday I was researching for Google Analytics alternatives, but hadn't thought about a built-in solution! I have been meaning to contribute to open-source projects, so here it goes!

In my opinion, the current system to exclude pageviews by user role is clunky. For example, once a single user is selected, there is no way to unselect it.

In the screenshot I have attached, I propose a different system. I am not going to explain it, as I think it is a pretty common and intuitive system, understood by the majority.

proto_settings_00

What do you guys think? πŸ™‚

Feature suggestion: Count browser language statistics

For each new visitor, we could keep track of the browser language and show stats (like a pie chart) on the language distribution. Unlike geo-location IP addresses, this does not require installation of a geo-IP database, so it would be a relatively easy and cheap (in terms of computing power) operation to add.


Please vote on this feature suggestion using πŸ‘ or πŸ‘Ž below.

Automatically reload data

This could be useful for people showing their Koko Analytics on a dashboard and leaving it open for hours at a time.

Minimum interval should be 1 minute, as that is the interval used by the aggregation process.

Feature suggestion: Count device types

For each new site visitor, keep track of their device type so we can show a simple device split in the totals bar at the top of the dashboard page.

Personally I think a "mobile" and "desktop" split is good enough, but I'd love to get some input on this from others.


Please vote on this feature suggestion using πŸ‘ or πŸ‘Ž below.

Feature suggestion: Option for hourly stat collection

I think the daily stat collection makes sense as the default option. That goes with the performance focus of the plugin. I would be interested to see an hourly increment option. Even if that includes a warning that it may impact performance.

Also an hourly option would allow me to potentially import historically stats from another open source stats tracking system. πŸ˜‰


Please vote on this feature suggestion using πŸ‘ or πŸ‘Ž below.

Feature suggestion: Export to CSV / Import from CSV

For example, to make it easier to migrate data for Koko Analytics alone from one website to another website.

Would also help in #7 so data can be stored permanently while also purging it from the production database.


Please vote on this feature suggestion using πŸ‘ or πŸ‘Ž below.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.