Code Monkey home page Code Monkey logo

mattermost-plugin-nps's Introduction

Mattermost User Satisfaction Survey Plugin

CI Code Coverage

A plugin for Mattermost to gather user feedback about Mattermost itself using user satisfaction surveys.

Installation

Requires Mattermost 5.12 or higher.

The NPS plugin is installed and enabled by default on Mattermost 5.12 or higher. If you'd like to install a custom version of the plugin, you can disable the built-in one and install your custom version alongside it.

Developing

This plugin contains both a server and web app portion. Read our documentation about the Developer Workflow and Developer Setup for more information about developing and extending plugins.

Releasing new versions

The version of a plugin is determined at compile time, automatically populating a version field in the plugin manifest:

  • If the current commit matches a tag, the version will match after stripping any leading v, e.g. 1.3.1.
  • Otherwise, the version will combine the nearest tag with git rev-parse --short HEAD, e.g. 1.3.1+d06e53e1.
  • If there is no version tag, an empty version will be combined with the short hash, e.g. 0.0.0+76081421.

To disable this behaviour, manually populate and maintain the version field.

How it works - overview

The plugin sends a survey after 45 days when a new (as in never seen before - including downgrade) version of Mattermost is detected. It also sends a message to users 7 days after their registration to get early feedback, and allows users to give feedback at any time they desire.

Surveys and feedback are sent to rudder as Track events.

Configuration

The only configuration option is to enable or disable the surveys automated.

The "Logs in" rule

The plugin only send DM to a user when this user logs in. "Logs in" mean that the server has received a request by a user to retrieve their own info. It happens when a user logs in, but also if they refresh their browser as the webapp will do this request to the server.

Welcome feedback DM

7 days after a user created their account, they will be sent a message by the bot asking for a feedback. This event is triggered by the "logs in" rule described in the previous paragraph, so the message is not technically sent 7 days after the account creation, but as soon as they get online, at least 7 days after the account creation.

While this message is not a survey per say, it will not be send if the configuration disables surveys.

New version survey

When the plugin is enabled (first time install, after being disabled and reenabled, or when the server starts/restarts), we are checking if the server is running on a new version. important note that in this case, new does not mean more recent, it just means a version for which we never sent a survey before. Including downgrade. If the server is running on a new version, we are scheduling a survey to be sent to all users 45 days after the new version is detected. A notice letting sysadmin know know that a survey is scheduled is sent by email, and a DM is schedulded to be sent once them next time they login. When a user logs in, we do check if they are due for a survey. If they are, we are sending them a DM with a survey. The survey consist in rating the app between 1 and 10, and giving a comment. The user also have the option to opt out of future surveys.

Feedback

At any point, a user can engage in a DM with the bot and send a feedback. When the user is done typing, a modal will appear asking the user to confirm the feedback and optionnaly asks for email address.

Rudder

Here are all the Track events sent to rudder:

  • nps_survey, with the property score containing the score given by the user
  • nps_feedback, with the property feedback containing the feedback given by the user and email containing the email address given by the user (can be empty)
  • nps_disable with no extra property

All of those events also contains the following property (when available):

  • PluginID, containing the plugin ID
  • PluginVersion, containing the plugin version
  • ServerVersion, containing the server version
  • UserActualID. containing the curremt user ID
  • timestamp, containing the timestamp of the event
  • server_install_date, containing the server install date
  • user_role, containing the user role
  • user_create_at, containing the user creation date
  • license_id, containing the license ID
  • license_sku, containing the license SKU

How to Release

To trigger a release, follow these steps:

  1. For Patch Release: Run the following command:

    make patch
    

    This will release a patch change.

  2. For Minor Release: Run the following command:

    make minor
    

    This will release a minor change.

  3. For Major Release: Run the following command:

    make major
    

    This will release a major change.

  4. For Patch Release Candidate (RC): Run the following command:

    make patch-rc
    

    This will release a patch release candidate.

  5. For Minor Release Candidate (RC): Run the following command:

    make minor-rc
    

    This will release a minor release candidate.

  6. For Major Release Candidate (RC): Run the following command:

    make major-rc
    

    This will release a major release candidate.

mattermost-plugin-nps's People

Contributors

akwanmaroso avatar asaadmahmood avatar ayusht2810 avatar cpanato avatar crspeller avatar dependabot[bot] avatar emmyni avatar g3rv4 avatar hanzei avatar hmhealey avatar jfrerich avatar julientant avatar justinegeffen avatar larkox avatar lieut-data avatar lumexralph avatar marianunez avatar mickmister avatar nevyangelova avatar phoinixgrr avatar reflog avatar sbishel avatar trilopin avatar

Stargazers

 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  avatar

mattermost-plugin-nps's Issues

Synchronize with Starter Template

Synchronize build related files with Starter Template.

#66 did it for the back-end part, so if near in time to that PR, probably only front-end part has to be updated.

JS error when telling Surveybot to disable the survey on old post

Summary

When running the newest version of the plugin, and there is an older bot post from a previous version, clicking the Click here to disable link causes a error to occur client-side.

Desired behavior:

  • The old post's link should properly disable the notifications if possible
  • Otherwise clicking the link should do nothing, and not cause an error

Notes

Found on nps plugin version 1.1.0 on a 5.29 MM server

This occurs consistently on the server when clicking the Click here link:

image

Stepping through the debugger, it is caused by action being undefined here:

render() {
const style = getStyle(this.props.theme);
const disable = () => {
const action = this.getAction(1);
this.props.doPostActionWithCookie(this.props.post.id, action.id, action.cookie).then(() => this.setState({disabled: true}));
};

Add another Question: micro survey that will help Mattermost recruit participants for future user research studies

This is a short, targeted micro survey that will help Mattermost recruit participants for future user research studies.

UI/Logic:

When the team wants to recruit users, the survey is triggered from the backend? and sent to all users (or particular company/user segment);

If a user taps ‘Let’s do it', he will see the next message with the offer to follow the link and answer a few questions.

If a user taps ’Not now’, he will see a message ‘We understand. Maybe next time!’

If a user taps ‘Don't want to see this survey? Click here to disable it.’, he won’t see this survey again.

Acceptance criteria:

The survey with a message “👋 Hey [name]! Occasionally, we conduct Mattermost studies to learn how we can improve. We'd love your input! Would you like to help us figure out some of our future plans - right now?” and 2 buttons “Let’s do it” and “Not now”.

The button ‘Let’s do it’, triggers the message “Great! We have some questions for you that will take a few minutes to complete. Click the link to get started. ” with the link to a study.

The button “Not now”, triggers the message “We understand. Maybe next time!”.

Figma file: https://www.figma.com/file/NGsNCj14INb6EvruD1COFY/Surveybot-for-a-Research-Panel?node-id=6%3A218899

If you have any questions about implementation or design - ping @Rina-dsg or @aaronrothschild

Migrate to use Rudder

The server is now using analytics through Rudder instead of Segment.

We should migrate this plugin to register the analytics through Rudder instead of Segment.

Integrate GolangCI-Lint

Mattermost is currently in the process of using golangci-lint as the default linter for all go projects. mattermost-community/mattermost-plugin-autolink#108 serves as an example of how the migration should look like:

  1. Copy .golangci.yml from https://github.com/mattermost/mattermost-plugin-autolink/ into this repository.
  2. Copy Makefile from https://github.com/mattermost/mattermost-plugin-autolink/ into this repository.
  3. Copy build/ from https://github.com/mattermost/mattermost-plugin-autolink/ into this repository.
  4. Run go mod tidy and make dist to ensure the build system works fine.
  5. Update linters-settings.goimports.local-prefixes to the go module path i.e. to github.com/mattermost/mattermost-plugin-jenkins.
  6. Run make golangci-lint and fix all issues that arise.

Fixing an linter issue is sometimes trivial but can also be quite complicated. There might be cases, where ignoring an issue using issues.exclude-rules is needed. If you don't know how to resolve an error, please reach out to @hanzei on the Mattermost Community Server or ask the question here.

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.