Code Monkey home page Code Monkey logo

vince's People

Contributors

ankitsridhar16 avatar gernest 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

Watchers

 avatar  avatar

vince's Issues

Duplicated date on timeseries

Hello, me again...

I notice that when I retrieve data via Postman, I have dates that are duplicated, without having the same data... I don't know how this happens, maybe the timezone, but not sure.

Query:
https://vince.shikkanime.fr/api/v1/stats/timeseries?site_id=shikkanime.fr&period=6mo&metrics=visitors,visits,pageviews,views_per_visit,bounce_rate,visit_duration

Data returned:

{
  "results":  [
    {
      "timestamp":  "2024-03-17T00:00:00Z",
      "values":  {
        "bounce_rate":  1,
        "pageviews":  9,
        "views_per_visit":  1.8,
        "visit_duration":  75.4816,
        "visitors":  5,
        "visits":  5
      }
    },
    {
      "timestamp":  "2024-03-16T00:00:00Z",
      "values":  {
        "bounce_rate":  1,
        "pageviews":  38,
        "views_per_visit":  2.235294117647059,
        "visit_duration":  248.4300588235294,
        "visitors":  6,
        "visits":  17
      }
    },
    {
      "timestamp":  "2024-03-15T00:00:00Z",
      "values":  {
        "bounce_rate":  1,
        "pageviews":  23,
        "views_per_visit":  2.090909090909091,
        "visit_duration":  287.7332727272727,
        "visitors":  7,
        "visits":  11
      }
    },
    {
      "timestamp":  "2024-03-14T00:00:00Z",
      "values":  {
        "bounce_rate":  1,
        "pageviews":  23,
        "views_per_visit":  2.090909090909091,
        "visit_duration":  165.05236363636362,
        "visitors":  9,
        "visits":  11
      }
    },
    {
      "timestamp":  "2024-03-13T00:00:00Z",
      "values":  {
        "bounce_rate":  1,
        "pageviews":  45,
        "views_per_visit":  2.6470588235294117,
        "visit_duration":  138.2324705882353,
        "visitors":  7,
        "visits":  17
      }
    },
    {
      "timestamp":  "2024-03-14T00:00:00Z",
      "values":  {
        "bounce_rate":  1,
        "pageviews":  1,
        "views_per_visit":  1,
        "visit_duration":  0,
        "visitors":  1,
        "visits":  1
      }
    },
    {
      "timestamp":  "2024-03-16T00:00:00Z",
      "values":  {
        "bounce_rate":  1,
        "pageviews":  5,
        "views_per_visit":  1.6666666666666667,
        "visit_duration":  272.537,
        "visitors":  2,
        "visits":  3
      }
    },
    {
      "timestamp":  "2024-03-17T00:00:00Z",
      "values":  {
        "bounce_rate":  1,
        "pageviews":  1,
        "views_per_visit":  1,
        "visit_duration":  0,
        "visitors":  1,
        "visits":  1
      }
    }
  ]
}

Docker - Losing data on a new instance

If I launch the project with a docker, having associated a volume with it, if I delete the container and launch a new container with the same volume as the previous one, the container's data is reset to 0. This prevents the container from being updated with future versions.

Steps to reproduce the problem:
Docker command

$ docker run --name analytics -p 9001:8080 -dit -v ./data:/app/data ghcr.io/vinceanalytics/vince --nodeId=1 --data=/app/data --authToken=xxx --domains=shikkanime.fr,example.com --data=vince-data

My JS script

<script data-domain="shikkanime.fr" data-api="https://analytics.shikkanime.fr/api/event">
                (function(){"use strict";var n,s,i,r,d,t=window.location,e=window.document,c=e.currentScript,h=c.getAttribute("data-api")||u(c);function l(e){console.warn("Ignoring Event: "+e)}function u(e){return new URL(e.src).origin+"/api/event"}function a(n,s){if(/^localhost$|^127(\.[0-9]+){0,2}\.[0-9]+$|^\[::1?\]$/.test(t.hostname)||t.protocol==="file:")return l("localhost");if(window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)return;try{if(window.localStorage.vince_ignore==="true")return l("localStorage flag")}catch{}var i,o={};o.n=n,o.u=t.href,o.d=c.getAttribute("data-domain"),o.r=e.referrer||null,o.w=window.innerWidth,s&&s.meta&&(o.m=JSON.stringify(s.meta)),s&&s.props&&(o.p=s.props),i=new XMLHttpRequest,i.open("POST",h,!0),i.setRequestHeader("Content-Type","text/plain"),i.send(JSON.stringify(o)),i.onreadystatechange=function(){i.readyState===4&&s&&s.callback&&s.callback()}}r=window.vince&&window.vince.q||[],window.vince=a;for(n=0;n<r.length;n++)a.apply(this,r[n]);function o(){if(i===t.pathname)return;i=t.pathname,a("pageview")}s=window.history,s.pushState&&(d=s.pushState,s.pushState=function(){d.apply(this,arguments),o()},window.addEventListener("popstate",o));function m(){!i&&e.visibilityState==="visible"&&o()}e.visibilityState==="prerender"?e.addEventListener("visibilitychange",m):o()})()
            </script>

Possibility to have sources on timeseries?

Is it possible to retrieve the time series from the sources?
It might be cool to see how many people come each day by source, in addition to the total.

Example :
URL : {{ANALYTICS_URL}}/api/v1/stats/timeseries?site_id={{ANALYTICS_SITE_ID}}&period=6mo&metrics=visitors,visits,pageviews,views_per_visit,bounce_rate,visit_duration&property=source

Response :

{
  "results": [
    {
      "timestamp": "2024-03-25T00:00:00Z",
      "values": [
        {
          "key": "twitter",
          "value": {
            "bounce_rate": 1,
            "pageviews": 22,
            "views_per_visit": 1.8333333333333333,
            "visit_duration": 132.03175,
            "visitors": 10,
            "visits": 12
          }
        },
        {
          "key": "threads",
          "value": {
            "bounce_rate": 1,
            "pageviews": 22,
            "views_per_visit": 1.8333333333333333,
            "visit_duration": 132.03175,
            "visitors": 10,
            "visits": 12
          }
        },
        ...
      ]
    },
    {
      "timestamp": "2024-03-24T00:00:00Z",
      "values": [
        {
          "key": "twitter",
          "value": {
            "bounce_rate": 1,
            "pageviews": 22,
            "views_per_visit": 1.8333333333333333,
            "visit_duration": 132.03175,
            "visitors": 10,
            "visits": 12
          }
        },
        {
          "key": "threads",
          "value": {
            "bounce_rate": 1,
            "pageviews": 22,
            "views_per_visit": 1.8333333333333333,
            "visit_duration": 132.03175,
            "visitors": 10,
            "visits": 12
          }
        },
        ...
      ]
    },
    ...
  ]
}

Getting validation error while starting vince server

I am following the steps mentioned at - https://www.vinceanalytics.com/
I downloaded and installed via curl and then using the command - vince --data=vince-data --domains=example.com to start the server.
I am getting the following error:
{"time":"2024-04-04T18:57:46.114255+05:30","level":"ERROR","msg":"Exited process","err":"validation error:\n - node.id: value is required [required]"}

Can not pull docker image

Hello,
I wanted to try the project by downloading the docker image that is in the wiki, but I didn't succeed.
Is this normal?

I tried not being connected to the GitHub repository. Except that it tells me that I don't have permission to access it.

$ docker pull ghcr.io/vinceanalytics/vince
Using default tag: latest
Error response from daemon: Head "https://ghcr.io/v2/vinceanalytics/vince/manifests/latest": unauthorized

And I've also tried connecting to the GitHub repository with a token that has full access, but same problem. I can't download the image.

$ docker pull ghcr.io/vinceanalytics/vince
Using default tag: latest
Error response from daemon: denied

Blocked by uBlock Origin

Hello, I'm back
I think the script is blocked by ad blocker extensions.

I just tested on Firefox with uBlock Origin, and I have this message in the console:

Cross-Origin Request blocked: the "Same Origin" policy does not allow access to the remote resource located at https://analytics.shikkanime.fr/api/event. Reason: CORS request failed. Status code: (null).

I tested by deactivating the extension and no problem. I've also tried it with Brave and it's not blocked.

Is this normal?

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.