documentcloud / pixel-ping Goto Github PK
View Code? Open in Web Editor NEWA Minimalist Pixel Tracker for Node.js
Home Page: http://documentcloud.github.com/pixel-ping
License: MIT License
A Minimalist Pixel Tracker for Node.js
Home Page: http://documentcloud.github.com/pixel-ping
License: MIT License
= ___ _ _ ___ _ | _ (_)_ _____| | | _ (_)_ _ __ _ | _/ \ \ / -_) | | _/ | ' \/ _` | |_| |_/_\_\___|_| |_| |_|_||_\__, | |___/ 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
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.
Chunk the and submit it in batches
File has been moved from HTTP to HTTPS
Please update from
curl http://npmjs.org/install.sh | sudo sh
to
curl https://npmjs.org/install.sh | sudo sh
Best regards,
Cokaric
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.
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.