Faqprime analytics event-streaming API

1Answer

Introduction

Faqprime Analytics streaming API helps you build & manage powerful reporting and intelligence capabilities for your business application needs. It’s completely up to you and your custom use case. 

Faqprime event-driven Analytics API

The analytics streaming API is event-driven and enables you to collect event data in real-time —for example, real-time user activity on the helpbot — for an authenticated user.

You can use the analytics streaming API to:

  • Identify the friction in the user experience and use Faqprime to guide users through

  • Create behavioral cohorts in the Analytics tool (like Mixpanel, Amplitude, etc.) and send those to Faqprime for segmentation and targeting.

  • Create funnels in the analytics tool to see the effect Faqprime has on your user’s behavior. 

How integration works

  1. As a first step of the integration, you pass the user context to Faqprime (if it is not present then it is considered "null") 
  2. Whenever an event gets triggered Faqprime calls the event reporting function i.e. "faqbotEventAnalyticsUpdate" along with passes the user context and event parameters. This function can be ported to pass the information to the Analytics tool (like Mixpanel, Amplitude, etc.)  

Setting up the user context

User context to the Faqprime can be passed by calling a function faqbotSetUserContext or by defining a variable faqbotUserContext. User context can be of any of the following types i.e. String, Array, or Object (JSON). 

Example 1: Passing user context as a 'string'. 

var uc = "mycontext";
faqbotSetUserContext(uc);

Example 2: Passing user context by defining a variable.  

var faqbotUserContext = "mycontext";

Example 3: Passing user context as an 'object'. 

var uc = {"uid":"myuid", "language":"english"};
faqbotSetUserContext(uc);

 

List of user context functions.

ActionFunction Parameters  Return Type Comment
Setting up of User ContextfaqbotSetUserContext(uc)uc of type String/Array/Object (JSON)NAUser context can be set by defining the variable faqbotUserContext. 
Getting the user context from FaqprimefaqbotGetUserContext()Noneuc (User Context) 
Deleting the user context faqbotDelUserContext()NoneNA
 
 

 

Event Integration 

With our integration, you can send Faqprime events to an analytics tool right in the browser, just by adding a javascript function to your product.

All you need to activate this integration is to load faqbotEventAnalyticsUpdate function after both the Faqprime and analytics tools (e.g. Mixpanel) scripts have been loaded. After that, all events from Faqprime will be sent to the analytics tool client-side. If this function is defined Faqprime automatically calls it whenever an event is triggered and if the function is not defined then no action is taken by Faqprime.

Function Syntax: 

function faqbotEventAnalyticsUpdate(event)

{

  // integrate your external system from here.

}

 

Parameters:

event: type object which contains following information 

uc: user context set the call of faqbotSetUserContext or by defining faqbotUserContext variable.

datetime: Current Date and Time in GMT

url: URL on which event is generated

product: Any of the Product types defined in faqbotProductType

event: Any of the event type defined in faqbotEvType

Payload and payloadtype: Any additional information is passed in payload and payloadtype defines type of payload which can be "null", "qid" or "search_text".

 

Return Type:
true

 

List of Products

The below product types are passed in the faqbotEventAnalyticsUpdate:

Product NameProduct Type (ENUM)Code
HelpbotFAQBOT_PRODUCT_HELPBOT1
HelpcenterFAQBOT_PRODUCT_HELPCENTER2
Product tourFAQBOT_PRODUCT_PRODUCTTOUR3
TrainingFAQBOT_PRODUCT_TRAINING4
HotspotFAQBOT_PRODUCT_HOTSPOT5
QuickAssistFAQBOT_PRODUCT_PRODUCTASSIST6
SocialShareFAQBOT_PRODUCT_SOCIALSHARE7
Popup ManagerFAQBOT_PRODUCT_POPUPMANAGER8
AnnouncementFAQBOT_PRODUCT_ANNOUNCEMENT9

 

List of Events

The below event parameters are passed in the faqbotEventAnalyticsUpdate:

Applicable Product Type

Event Name

Event Type (ENUM)

Code

Payload type         

Payload 

Helpbot
(FAQBOT_PRODUCT_HELPBOT)

Start Helpbot

FAQBOT_HELPBOT_START

101

null

NA

 

Stop Helpbot

FAQBOT_HELPBOT_STOP

102

null

NA

 

Question Click

FAQBOT_HELPBOT_QCLICK

103

qid

Question ID

 

Tag
Click

FAQBOT_HELPBOT_TAG_CLICK

104

tag_name

Tag Name

 

Category 
Click

FAQBOT_HELPBOT_CAT_CLICK

105

cat_name  

Category Path

 

Expand Helpbot

FAQBOT_HELPBOT_EXPAND

106

null

NA

 

Collapse Helpbot

FAQBOT_HELPBOT_COLLAPSE

107

null

NA

 

Popout Question

FAQBOT_HELPBOT_POPOUT

108

null

NA

 

Back Button Click

FAQBOT_HELPBOT_BACK

109

null

NA

 

Question Upvote

FAQBOT_HELPBOT_UPVOTE

110

qid

Question ID

 

Question Downvote

FAQBOT_HELPBOT_DOWNVOTE

111

qid

Question ID

 

Search (autocomplete) 

FAQBOT_HELPBOT_SEARCH

112

search_text 

Text

 

Search (Enter)

FAQBOT_HELPBOT_SEARCH_COMPLETE

113

search_text 

Text

 

Chat Button Click

FAQBOT_HELPBOT_CHAT_CLICK

114

null

NA

 

Link1/Module1 Click

FAQBOT_HELPBOT_LINK1_CLICK

115

null

NA

 

Link2/Module2 Click

FAQBOT_HELPBOT_LINK2_CLICK

116

null

NA

Product Tour
(FAQBOT_PRODUCT_PRODUCTTOUR)

Product Tour Start

FAQBOT_PRODUCTTOUR_START

301

pid

Product Tour ID

 

Product Tour Stop

FAQBOT_PRODUCTTOUR_STOP

302

ptour_info

Object containing

pid

completedsteps

totalsteps

 

Product Tour Question Click

FAQBOT_PRODUCTTOUR_QCLICK

303

qid

Question ID

Training 
(FAQBOT_PRODUCT_TRAINING)

Training Start

FAQBOT_TRAINING_START

401

tid

Training ID

 

Training Stop

FAQBOT_TRAINING_STOP

402

tid

Training ID

 

Training Question Click

FAQBOT_TRAINING_QCLICK

403

qid

Question ID

Hotspot
(FAQBOT_PRODUCT_HOTSPOT)

Hotspot Click

FAQBOT_HOTSPOT_START

501

qid

Question ID

Product Assist
(FAQBOT_PRODUCT_PRODUCTASSIST)

Product Assist Start

FAQBOT_PRODUCTASSIST_START

601

null

NA

 

Product Assist Icon Click

FAQBOT_PRODUCTASSIST_ICLICK

602

icon_id

Icon ID

Social Share
(FAQBOT_PRODUCT_SOCIALSHARE)

Social Share Click

FAQBOT_SOCIALSHARE_START

701

share_type

Share Type 
facebook/whatsapp/
twitter/pinterest/youtube/
messenger/instagram

Popup Manager
(FAQBOT_PRODUCT_POPUPMANAGER)

Popup Manager Start 

FAQBOT_POPUPMANAGER_START

801

popupid

Popup ID

 

Popup Manager Stop

FAQBOT_POPUPMANAGER_STOP

802

popupid

Popup ID

 Popup Manager ClickFAQBOT_POPUPMANAGER_CLICK803nullNA

Announcement
(FAQBOT_PRODUCT_ANNOUNCEMENT)

Announcement Start

FAQBOT_ANNOUNCEMENT_START

901

aid

Announcement ID

 

Announcement Stop

FAQBOT_ANNOUNCEMENT_STOP

902

aid

Announcement ID

 

Announcement Tab/Tag Click 

FAQBOT_ANNOUNCEMENT_TAG_CLICK

903

tag_name

Tag Name

 

Announcement Question Click

FAQBOT_ANNOUNCEMENT_QCLICK

904

qid

Question ID

Did this answer your question?
...