Measuring the Funnel

Using the Guided Selling event hooks, a funnel is fully measurable in Google Analytics, so you can get reports on:

  • How often a guided selling is used
  • Which answers are chosen the most
  • At which question the customers leave

This can be achieved by:

  • Sending key events to GA4, during the Guided Selling funnel
  • Configuring GTM & GA to receive the correct data
  • Setting up reports in Google Analytics

Measure events

To measure the entire funnel, implement these analytics events:

  • gs_start: start the funnel
  • gs_question: display question
  • gs_answer: answer question (based off previous question)
  • gs_complete: display results
  • gs_item_click: result product/item clicks
let lastQuestionId = null;
let code = 'abc-gs';

// start funnel
dataLayer.push({
  event: 'gs_start',
  gs_code: code
});


window.tweakwiseGuidedSelling({
  //...
  on: {
    'twn.question.open': function (e) {

      const last = e.data.questions.find(o => o.questionid == lastQuestionId);
      if (last) {

        const answer = last.answers.find(o => o.isselected);
        dataLayer.push({
          event: 'gs_answer',
          gs_code: code,
          question_id: lastQuestionId,
          question_text: last.question,
          answer_id: answer?.answerid,
          answer_text: answer?.answer
        });

      }

      dataLayer.push({
        event: 'gs_question',
        gs_code: code,
        question_id: e.question.questionid,
        question_text: e.question.question,
        answer_id: null,
        answer_text: null
      });

      lastQuestionId = e.question.questionid;

    },

    'twn.product.click': function (e) {
      dataLayer.push({
        event: 'gs_item_click',
        gs_code: code,
        item_id: e.data.itemno,
        item_title: e.data.title,
        question_id: null,
        question_text: null,
        answer_id: null,
        answer_text: null
      });
    },

    'twn.results.open': function (e) {

      const mapped = e.data.questions?.map(o => {
        const selected = o.answers.find(o => o.isselected);
        if (selected) {
          return {
            question_id: o.questionid,
            question_text: o.question,
            answer_id: selected?.answerid,
            answer_text: selected?.answer
          };
        }
        return null;
      }).filter(o => o != null);


      dataLayer.push({
        event: 'gs_complete',
        gs_code: code,
        answers: mapped,
        question_id: null,
        question_text: null,
        answer_id: null,
        answer_text: null,
        items: e.results.map(o => ({
          item_id: o.itemno,
          item_title: o.title
        }))
      });

    }

  }
});

GTM & GA configuration

Make sure every event gets a seperate tag in Google Tag Manager:

.That all data is sent through:

In Google Analytics:

  • Check that all event parameters exist as "Custom definitions" in Google Analytics
  • That gs_complete is configured as "key event":


Report

Once everything is set-up correctly, you can easily create reports.

For example the Path explorer to quickly recognize patterns:

Or Standard funnel, to see how many users exit on specific questions: