Embedding the JS code
Integrating Fibotalk analytics on a website is very easy and requires no more than 15-20 mins.
To start tracking with Fibotalk, copy the JS code that is provided in the “Install on Website” option in the “Messenger settings” in the “Chats” menu, into the <head> and </head> tags of all the pages in which integration need to be done.
The code can be found at
NOTE– It’s recommended to put the tracking code into a try-catch block.
Put the below two lines of code at the appropriate place in the login page to capture the
login event after successful login with the desired user information data object
Signup tracking is done the same way as login tracking. In the signup module, just put
two lines of code after successful signup along with user information data object.
User is identified with our Login and Signup APIs automatically. However, if a user
can be identified by the application outside of login and Signup events, it can be done
in the following way.
User data can be set/updated in Fibotalk whenever there is a requirement for the
Call the setUserInfo method with an object containing the user information as parameter.
User information object can have various field which defines the user’s attributes.
Sample userInfo object is
Custom Event Tracking
To track custom event there is a function “setEvent()”. This function is used for
deeper integrations like
– API latency analysis
– A workflow inside a feature etc.
– Track toggle events
– Start and Stop of certain functions in the application like Video viewing, form
Details of the setEvent function
- event_name <string>: This can be any name. No special characters are supported except underscore and hyphen. There is a limitation of 50 characters for the name of the event. Once the events are triggered from the App they would be visible in the dropdown in analytics filters.
- event_value <string/number>: There might be certain events that would need to have a value. For example, if you would like to track the “API-Failure” event in your system, you would like to have a value of “response code” or message to make more sense of value. This value can be number or string but not objects or Arrays.
- custom_parameters <JSON object>: In certain situations when the values needed to be passed are complex objects, you can use the custom parameters to pass the value.
Testing the Implementation
Login to https://app.fibotalk.com and select the account for which the code is
embedded in your application.
You can instantly see the website analytics. Custom Dashboards can be created.
Please write to us for more help at firstname.lastname@example.org