Form analysis

About form analysis

Form analysis is a tool designed for sites that actively use fill-in forms. Examples of forms are the search bar on a site, an order form, or a contact form. Form analysis helps to understand how exactly the site's users interact with forms.

This tool offers two ways to display data: Form conversion and Form fields.

Form conversion rate allows you to view:
  • The number of views of the page containing the form.
  • The number of interactions with the form.
  • The number of forms submitted.
Form fields contain the following information:
  • Time spent interacting with each field in the form.
  • Fields left empty in the form.
  • Fields that users leave the page from without submitting the form (i.e. fields that cause difficulties when filling them out).

If there are several forms on the analyzed page, you can switch between them using the list of forms.

Connecting

To get data using form analysis, follow these steps:

  1. In the Yandex Metrica interface, go to Settings and open the Tag tab.
  2. Select the Session Replay, scroll map, form analysis option.
  3. Install the updated code snippet on website pages that contain the form.

Data is collected from the form correctly if:

  • The site uses UTF-8 encoding.
  • The submit event is used for transmitting the form contents.
  • The form fields aren't hidden (using the display: none value for the style attribute).
Note.
  • Form analysis uses data received from Session Replay, so the number of reports is limited. The report shows data on forms for 15 days, including the current day.

    There is usually enough data to receive a quality report on users' interaction with the forms. The system provides a representative sample by recording a spread of sessions throughout the day.

  • The order form usually appears in online stores only when there are products in the basket. To view the report on how users interact with this form, go to the store's site in your browser, put any item in the basket, and then go to the page with the form report in Yandex Metrica.

Statistics on a group of pages

To view statistics for a group of pages, you can use extra characters in the URL box.

Characters used for displaying statistics
Character Description Example
* Matches any number of any characters

Display data for all pages with URLs that start with https://example.com/goods/, including the specified page: https://example.com/goods/*.

If you enter the address without extra characters, Yandex Metrica provides a drop-down suggestion with the * character

~ The condition is a regular expression Show data for pages with URLs that match the regular expression. For example: ~http://example.com/.*

Let's look at an example. You need to get statistics on how users interact with the search bar. But you are interested in how they interact with the search bar on all the website's pages.

In order for this data to be shown in Form Analysis, enter https://example.com/* in the address box (after you enter it, the same address is shown in the drop-down suggestion). Data is loaded automatically and will be totaled for all the pages that have this search bar.

Showing data in an iframe

If your site is protected from being shown in an iframe (the X-Frame-Options header is used in the server settings), the collected data won't be available for viewing. To view the site's session data, you must change the server settings and add an exception for the webvisor.com domain and subdomains, as well as for your site's domain. Use the regular expression

^https?:\/\/([^\/]+\.)?(yourdomain\.com|webvisor\.com)\/

If you use nginx, add the following exceptions to your configuration:

location / {
        set $frame_options '';
        if ($http_referer !~ '^https?:\/\/([^\/]+\.)?(yourdomain\.com|webvisor\.com)\/'){
            set $frame_options 'SAMEORIGIN';
        }
        add_header X-Frame-Options $frame_options;
        ...
    }

where yourdomain\.com is the site's domain name. Use your site's domain zone (it may differ from .com).

Questions and answers

  1. Data is not collected for a form
  2. Why is there an error opening the page with the form?
  3. What should I do to keep form analysis from counting data for the search form?
  4. A page has several forms, but the report shows data for only one of them. How can I see data for the other forms?
  5. Why doesn't form analysis display data for all users who filled out a form on the site?
  6. Why is form analysis data different from the statistics in other reports?

Data is not collected for a form

Data is collected from the form correctly if:

  • The site uses UTF-8 encoding.
  • The submit event is used for transmitting the form contents.
  • The form fields aren't hidden (using the display: none value for the style attribute).

Why is there an error opening the page with the form?

The page with a form might open with an error for the following reasons:

  • Your site uses protection against rendering in an iframe (the site returns the header X-Frame-Options: SAMEORIGIN or X-Frame-Options: DENY).

    To correctly replay sessions, you must delete the protection code (contact the person responsible for site support), or configure the web server.

  • A firewall on the computer or network is blocking access to:

    • The domains metrika.yandex.ru and mc.yandex.ru.
    • The domain *.yandex.tld.
  • The site does not open without the www prefix.

What should I do to keep form analysis from counting data for the search form?

To exclude an undesired form from analysis, assign it the CSS class ym-disable-submit.

A page has several forms, but the report shows data for only one of them. How can I see data for the other forms?

Select the desired form to view in the upper-right menu on the page.

Why doesn't form analysis display data for all users who filled out a form on the site?

Form Analysis uses data received from Session Replay and has the same limitations on the amount of reports.

There is usually enough data to receive a quality report on users' interaction with the forms. The system provides a representative sample by recording a spread of sessions throughout the day.

Why is form analysis data different from the statistics in other reports?

The Form Analysis report only includes pages where forms are sent using the submit event. If there were none, the session is not counted Therefore, the number of pageviews and the number of sessions recorded in the Form Analysis report may not match.

Also, the absence of data may be because the form is not in the visible area of the screen. In this case, the user does not see the form, and the session is not counted for the Form Analysis report.