GithubHelp home page GithubHelp logo

documentcloud / pixel-ping Goto Github PK

View Code? Open in Web Editor NEW
310.0 25.0 53.0 451 KB

A Minimalist Pixel Tracker for Node.js

Home Page: http://documentcloud.github.com/pixel-ping

License: MIT License

CoffeeScript 44.63% JavaScript 1.22% HTML 54.15%

pixel-ping's Introduction

=
   ___ _         _   ___ _           
  | _ (_)_ _____| | | _ (_)_ _  __ _ 
  |  _/ \ \ / -_) | |  _/ | ' \/ _` |
  |_| |_/_\_\___|_| |_| |_|_||_\__, |
                               |___/
  
  o      .   _______ _______
   \_ 0     /______//______/|   @_o
     /\_,  /______//______/     /\
    | \    |      ||      |     / |
    
  
  Pixel Ping is a minimalist pixel tracker, written in CoffeeScript for Node.js.
  It's useful when you want to keep track of page hits, but don't want to inject
  something heavy like Google Analytics. It has no dependencies other than Node.
  
  For installation and usage instructions, see:
  http://documentcloud.github.com/pixel-ping

pixel-ping's People

Contributors

cyberdelia avatar danielbeardsley avatar gka avatar jashkenas avatar knowtheory avatar mbjordan avatar thejefflarson avatar xiongchiamiov 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pixel-ping's Issues

Flushing: allow doing it in batch

If the flushing server can't be reached for a bit, a large batch of stats may build up. We've had an instance recently where the data size after encoding (6MB) was too big for the endpoint it was being sent to.

Suggestion

Chunk the and submit it in batches

test fails when more than five pixels are requested

While now the simple test with just 3 requests succeeds, a very similar test with six requests fails

❯ cake test                                                                                                                        
4:  one
8:  two
6:  three
--- flushed ---
Test Failed  { one: 4, two: 8, three: 6 }

Apparently the last requests is timed out, and the flush is only happening after the 60-seconds interval defined in test/config.json has passed. Also note that the counts are completely wrong, the expected result should be either

{ "one": 1, "two": 2, "three": 3 }

or, since the last request failed, at least:

{ "one": 1, "two": 2, "three": 2 }

I could reproduce this multiple counting of single pixel.gif requests in a real server setting, so this is a serious bug.

Question: How to find flushed data

Hey all,

Sorry I'm new to this find of stuff, but I successfully got pixel-ping working on our server, and when I run it it appears to successfully flush based on the messages, but I cant find any new files or anything like that. I'm working off the DocCloud explanation of how to use this, so the endpoint is mydomain/save_hits. I'm using 9187 port as well.

Any help on this would be greatly appreciated. Thanks in advance.

Server doesn't seem to be collecting hits

So I followed all the instructions you have available to install pixel-ping on a server. When I run pixel-ping on the command line, it goes through the flush as intended. However, there never seems to be any data.

I cant experiment on port 80 because I get a Uncaught Exception: Error: listen EADDRINUSE 107.170.210.56:80 which I assume is cause Apache is running on that same port. So I used Port 9817 in the config like in the example provided in documentation. I have a pixel.gif in the html root of the server.

Also tried to troubleshoot inside the code, and I don't ever seem to get any data from the server or record objects. FWIW, here is a log of server after it initializes:

Server { domain: null, _events: { request: [Function], connection: [Function: connectionListener] }, _eventsCount: 2, _maxListeners: undefined, _connections: 0, _handle: null, _usingSlaves: false, _slaves: [], _unref: false, allowHalfOpen: true, pauseOnConnect: false, httpAllowHalfOpen: false, timeout: 120000, keepAliveTimeout: 5000, _pendingResponseData: 0, maxHeadersCount: null, [Symbol(asyncId)]: -1 }

I'm super green to node.js so I'm trying to learn all this as I go. Any help would be appreciated. Thanks.

Ubuntu 16.04 - Apache2 - Node 8.10

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.