Question Click Event on Faqprime Helpbot?

When a user clicks on a specific question (either by search or directly), Faqprime raises the event "FAQBOT_QUESTION_CLICK" with question id. To access this event one has to define the javascript function faqbotEventNotification and here is a sample code for the same - 

function faqbotEventNotification(e)
{
    console.log(e.event);
    console.log(e.url);
    if (e.event == 10) // 10 i.e. faqbotEventType.FAQBOT_QUESTION_CLICK is the event id for the question click
    {
        console.log(e.data);
    }
}

Now say you want to record how many "Add To Cart" been done after the user has read a question, to achieve this follow the given steps with google analytics - 

1. Define the above function and if event is 10 set a global state "faqprime_question_clicked" as "true" which you can initialize as "false".

2. Whenever the user clicks "Add to Cart" button check for "faqprime_question_clicked" state it is "true" set a goal ATC_after_question_read and you are done.

 

Did this answer your question?
...