I recommend using https://www.promoter.io/ to measure NPS. It's a brilliant starting point for getting useful feedback too. I've ended up using it for the conference and coworking community that I run as well as for a software product.
I have extensive experience applying the NPS to the hospitality industry, and I can tell you that it's not a marketing gimmick as I have read in some other comments. That's why I decided to roll my own service :-)
The difficult design aspects seem to be when to ask and choosing what other supporting information to gather about who they are, where they came from and how they used your product/service - you can't just hook in an API.