Event contact

Contents


form response

Priority low

When the user clicks "Send message" on the contact form.

This event is tracked by the form_tracker.

Examples

Data sent to the dataLayer

  • event: event_data
  • event_data:
    • action: Send message
    • event_name: form_response
    • section: What's it to do with?
    • text: The chosen 'What's it to do with?' radio button text, and the URL of the page they're contacting us about, if relevant.
    • tool_name: Contact GOV.UK
    • type: contact

You can also view our complete schemas.

Data reports


form error

Priority low

When the server's form validation fails, and returns the user to the contact form with errors.

This event is tracked by the auto_tracker.

Examples

Data sent to the dataLayer

  • event: event_data
  • event_data:
    • action: error
    • event_name: form_error
    • section: Comma separated list of form inputs that errored, e.g. 'What's it to do with?, What are the details?, If you want a reply (optional), If you want a reply (optional)'
    • text: Comma separated list of the error messages, e.g. 'The link field cannot be empty, The message field cannot be empty, The email address must be valid, The name field cannot be empty'
    • tool_name: Contact GOV.UK
    • type: contact

You can also view our complete schemas.

Data reports


form complete

Priority low

When the submission has succeeded, and they are now on the "Thank you" page.

This event is tracked by the auto_tracker.

Examples

Data sent to the dataLayer

  • event: event_data
  • event_data:
    • action: complete
    • event_name: form_error
    • section: Thank you for contacting GOV.UK
    • text: If anonymous: 'Thank you for contacting GOV.UK'. If not anonymous: 'Your message has been sent, and the team will get back to you to answer any questions as soon as possible.'
    • tool_name: Contact GOV.UK
    • type: contact

You can also view our complete schemas.

Data reports