Nodejs send metrics of how many people are using my app - node.js

So i'm designing a new application with Nodejs and packaging into an executable then putting a release in github, I want to be able to monitor how many people are using my executable?
I was thinking about creating an api server and my application just make a call to that API service but I thought there might be something already out there any help?

The easiest way is to connect third party services that do that. The most famous one is Google Analytics
You just need to create your developer account and embed a few lines of tracking code. After that you can see full info about your visitors including their location.

Related

What is the best way to create a Microsoft Teams upload bot that uploads the contents to a web service?

I have Azure and I want to be able to create a simple chat-bot that is programmed to do a few simple tasks for users, i.e. take in uploaded information and pass it on to another web service. What would be the best way to do this? Should I use team's built in bot-framework? I'm not sure if it can export data externally.
Would the best way be to just create a self-service web-page? I kind of want to keep it as a bot though, since they are hip and trendy.
Any tips, guidance, or knowledge would be appreciated!
It certainly should be possible to do this using a bot, as Teams bots can handle 9file upload and download scenarios](https://learn.microsoft.com/en-us/microsoftteams/platform/bots/how-to/conversations/send-and-receive-files?tabs=dotnet). Once the bot has received the file, it can do anything that makes sense, as the bot is fully-fledged application, written in C#, node, python, or other options (those 3 are the best supported).
If you haven't build a bot before, you can start here, which gives links to guidance on general bot development with the Microsoft Bot Framework, as well as info on Teams-specific scenarios.

How Can I setup Google Actions For Team Development?

I am working with a team to develop a Google Action for an Organisation called 'Rocket Chat'. Now what we want to do is that, to create one main account under that organisation, where frontend and backend will be hosted and also give access of this account to a few Developers. What will be the most efficient way of doing this?. Any ideas or suggestions on how to do that are appreciated. Thanks.
Frontend is hosted on Dialogflow and for backed we are hosting our fulfilment on Firebase. If you want more details on our setup, please visit here => https://github.com/RocketChat/google-action-rocketchat
The "correct" way to do it would be for every developer to use their own account, and share a project with all of them. This also will allow you to have more granular permissions for each developer.
In addition to having ownership of the project, you may also want to have some processes in place to mitigate potential issues. If everyone uses one project, it's possible to run into race conditions if multiple developers upload the same cloud function. The Dialogflow console also may have issues with multiple editors at one time.
For easier development, each developer may want their own separate prototyping project which gives them full control over the environment, and then have some way to integrate their changes into one master project.

Set up Google Analytics to track a command line Node app

I'd like to use Google Analytics to track usage of a command line Node app. Tracking will be strictly opt-in. I'd like to track basic usage, plus which operating system and version of Node was used.
I've found the Measurement Protocol, but I'm wondering whats the best way to set up Google Analytics.
You can choose from Web or App - App seems the best fit, but then I'm sent to Firebase to set up an iOS, Android or Web app. None of these are correct. So is 'Web' the best way to track my app usage? Or is Google Analytics not the right approach?
Seems like the best approach is Google Measurement Protocol. There's a Node library for it.
Really Google Analytics is completely designed around web apps and more recently mobile apps, it has concepts like "page views" which don't make sense for CLIs, and Firebase Analytics is only for Android and iOS.
You might be able to shoehorn he CLI use case for some purposes. Alternatively, you could consider using a cloud database like Firebase real-time DB to capture your own events.
Google analytics really isnt designed for something like this. You have only two options web app where everything is page based. http://example.com/hello.php vs using a mobile app where everything is screen based. Home, about, help.
I have done this before with several console applications, a custom SSIS task (dll) and an arduino project. I chose mobile application mainly because i thought it was closer. I know of someone who did the same with an actions on google project.
In the end what you use will be up to you. Just consider what it is you want to track exactly and lay it out before you start.
If you choose mobile make sure you send Screen views and not page views. The Google analytics website is split you cant mix and match the hit type.
Workaround for createing moble account without firebase.
create a new web property on Google analytics type Web
create a new view under that web property type mobile.
We made Console Cat for this exact purpose! It's built from the ground up to track telemetry / analytics for CLIs including things like flags, command duration, version, etc.

Azure Mobile services : using shared libraries in Custom API

Azure Mobile services (node.js backend) : I remember vaguely sometime back I had read somewhere that the shared libraries cannot be used in Custom API, however I don't remember where exactly I read that. Tried googling, searching here in SO, but didn't find anything. Now that I started coding my Custom API, I need to know this for sure, whether what I remember vaguely is really true or not; if someone has any idea about this, I'll much appreciate if you can confirm.
many thanks.
Yes you can create shared scripts and use them from your mobile service custom API scripts.
See this link for enabling source control and getting a local copy so you can create and push your scripts: http://azure.microsoft.com/en-us/documentation/articles/mobile-services-store-scripts-source-control/#use-npm
Then take a look at this link for more on using some of the "native" node modules or helper functions: http://azure.microsoft.com/en-us/documentation/articles/mobile-services-how-to-use-server-scripts/#shared-code

Olark like software in node.js needed

Do you know any node.js application that do something similar to http://olark.com. Not necessarily for multiple website, I just need it for single domain.
I just want to install it myself on heroku and run chat customer support for my website on it.
Thanks,
Michal
Try out opensource-olark. I built it for my own use - it may be useful to you. It is not entirely based on Nodejs. But it works exactly like Olark. It uses strophe.js - A xmpp push based library for jabber which works with BOSH
try http://www.vivocha.com, based on node.js
It's very symple to use and you can integrate with other applications via API (with CRMs and ticketing systems for exemple).
This platform, with only one line of code on your website, allow you to configure all the widgets, without other tech skills needed.
And also, you can adding voice on your website, so you can call with your visitors directly on your web pages.
There are open source tools that you can check out like :
http://nowjs.com
http://www.socketstream.org
They allow you to incorporate realtime features into your nodejs app & you can probably have a very simplified olark-type app in just a couple lines of code.

Resources