kissmetrics / kmts Goto Github PK
View Code? Open in Web Editor NEWKissmetrics API - Threadsafe Ruby gem
License: Apache License 2.0
Kissmetrics API - Threadsafe Ruby gem
License: Apache License 2.0
** This repository is now deprecated, please see https://github.com/kissmetrics/KISSmetrics/releases/tag/v1.0.0 for the final versions of all included clients ** KISSmetrics is different from other analytics platforms due to a combination of three key features. We focus on funnels and conversions and make them easy to track and interpret, use people as the basic unit of measure, and support tracking of highly-flexible custom data through our simple API. Find out more at http://www.kissmetrics.com * ruby client has moved to https://github.com/kissmetrics/km * php client has moved to https://github.com/kissmetrics/kissmetrics-php * python client has moved to https://github.com/kissmetrics/py-KISSmetrics * perl client is complete with crontab option (untested)
Seeing lots messages like this in my logs while running an import script:
<Thu Jan 4 10:39:15 2018> Failed to open TCP connection to trk.kissmetrics.com:443 (getaddrinfo: nodename nor servname provided, or not known) for host https://trk.kissmetrics.com
It's unclear whether or not the request was retried or discarded. In the context of this script, I would prefer to retry if it failed, but I don't think my code has access to whether or not this call succeeded.
I am using this gem to send data to Kissmetrics, but I often see this warning in my logs:
~/.rbenv/versions/2.4.2/lib/ruby/2.4.0/uri/rfc2396_parser.rb:305: warning: regexp match /.../n against to UTF-8 string
I finally figured out that this happens when the data includes some latin character, such as ñ
because all of the values are encoded as URL query params using URI.escape
:
KMTS.record("user-1234", "viewed page", { "viewed page - page_title" => "En Español" })
# /e?_p=user-1234&_n=viewed%20page&viewed%20page%20-%20page_title=En%20Espa%C3%B1ol
I'm guessing it's related to this line, but I could be wrong.
My data is in UTF-8 encoding, so I don't think I'm doing anything wrong, but these warnings are concerning because I'm not sure if my data is being sent/received/encoded correctly.
I am using gem version 3.0.2.
"The source :gemcutter is deprecated because HTTP requests are insecure."
The javascript can use ssl. Why should this not do the same?
Let me know if you'd like for me to make a pull request.
Note: If I write test cases they won't test actual timeout windows working obviously, just perhaps that the parameter is set and that there is some sort of sane logging of the error returned (Timeout::Error).
This would be an option passed in at initiation, not when performing an action, for that there's always:
begin
Timeout::timeout(5) do
KMTS.record(...)
end
rescue Timeout::Error => e
...do something
end
It turns out that the current code forces the API to be contacted as HTTP
. It should allow (and default to?) HTTPS.
I've added the init to my controller and try to use a record in a method but it doesn't do anything. Is there something more that needs to be done with Rails to make it work?
When you yanked the prior version from rubygems.org, you broke our deploys without notice. We had to change our gemfile to point to the last ref before the version change to fix it. Please don't yank prior versions. Give us an update and include deprecation notices if necessary, but updates shouldn't break existing usage without ample notice.
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.