Uploaded image for project: 'Planet4'
  1. Planet4
  2. PLANET-4016

CPP - Implement Hotjar javascript tracking on form success and fail submissions

    XporterXMLWordPrintable

    Details

    • Type: Task
    • Status: CLOSED
    • Priority: Should have
    • Resolution: Merged
    • Affects Version/s: None
    • Fix Version/s: 2.2
    • Labels:
      None
    • Story Points:
      1
    • Sprint:
      Sprint #101, Sprint #102
    • P4 User role:
      Web Master
    • Section:
      Block: EN Form
    • P4 site:
      All sites
    • Track:
      Development
    • Repositories:
      planet4-plugin-engagingnetworks

      Description

      Context

      Hotjar is a very valuable tool for analysing our user's behaviour and we intend to expand its use across the Planet 4 community. 

      There's one functionality called Form Report that can capture information about each one of the form fields, allowing us to understand interactions, avg time to complete, successful and fail submissions. 

      Task

      Although Hotjar tries to properly track when a form has been submitted successfully or not, this doesn't always work. So, we need to implement a javascript tracking code for both successful and failed submissions.

      • When a form is successfully submitted, the following code should be used:
         hj('formSubmitSuccessful'); 
        Obs: There's already a dataLayer event fired when the form is submitted ('petitionSignup'). We could trigger the javascript code above in the same situations.
      • When a form fails validation, the following code should be used:
        hj('formSubmitFailed');
        Obs: There's already a message on the frontend when the submission fails: There was a problem with the submission*.* We can trigger the javascript code above in the same situations. 

      Hotjar's documentation:

      Track Form Submissions with Javascript

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              dpivo Dylan Pivo
              Reporter:
              jmarubay Julia Marubayashi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: