FT Analyser Bot helps to automate the NPS analysis and FT weekly analysis process.
FT Analyser Bot service is listening on port 2112.
To start the ft-analyser-bot service, pre-requisites are:
- Mac (Preferred)
- Amplitude, Bugsnag, Bork, slackbot credentials
The configurations for the service are set using config.yaml
. Sample of config.yaml
is present at config-dev.yaml
This config.yaml should be placed at /etc/envs/config.yaml
, it contains:
# Amplitude API credentials
1. Amplitude - apikey, secretkey
# Bork token
2. Bork token
# Bugsnag API credentials
3. Bugsnag - projectID, authToken
# slack bot credentials
4. slackbot - authToken, appToken, channelID
Clone the repository, navigate to the cloned repository and download the dependencies using go mod download
. Before building, ensure the config.yaml
is configured accordingly and placed at required location.
To build the ft-analyser-bot binary, use the below command, ft-analyser-bot binary built using make is placed in bin
directory.
# Using make, prefered for linux OS.
make build
# Using go build and run.
sudo go run cmd/main.go
ft-analyser-bot
can be run using binary on mac machine.
To run service through binary, follow the below command:
# Start service
sudo ./bin/ft-analyser-bot
Now the serivce is started and listening on port 2112.
- Logs for service can be found at
/var/log/pf9-ft/ft-analyser-bot.log
To interact with the service, ft-analyser-bot APIs are needed.
# To get weekly analysis
curl --request GET --url 'http://localhost:2112/weeklyanalysis'| jq .
## Sample response
{
"Total_User_Signups": 23,
"User_Who_Verified_Emails": 23,
"PrepNode_Details": {
"PrepNode_Attempts": {
"New_Users": 3,
"Existing_Users": 12
},
"PrepNode_Success": {
"New_Users": 3,
"Existing_Users": 9
},
"PrepNode_Errors": {
"New_Users": 0,
"Existing_Users": 3
}
},
"Cluster_Creation_Attempts": {
"New_Users": 2,
"Existing_Users": 10
}
}
# To get nps analysis of a user
curl --request GET --url 'http://localhost:9112/npsanalysis/<USERID>' | jq .