At times, you may have problems with the webview in the metric of Yandex. Webmasters. You want to see a record of visits to your site, but for some reason you can’t. Most likely, a ban on displaying a page in a frame is set.
What to do if the webvisor does not work through Yandex.Metrica
First you need to check if you have enabled the webview in the metric (in the counter settings). We go to the page of the site where the metric counter is installed. We switch to viewing the page code by clicking on (ctrl + u), using ctrl + f we begin the search for the desired code fragment, namely webwizor: true. If at the end of the fragment is false, then the code will not work correctly. The ban on displaying the page in a frame (webview) is confirmed.
If the webviewer in the metric still does not reproduce user actions, then there are several options for the problem:
- Lock on the client’s browser side.
- Blocking from the server side on which your site "lies".
Consider both options for solving the problem. The first option: the web browser does not work due to a client browser blocking, which means that a ban on displaying a page in a frame is set.
Client Browser Lock
You need to make sure that you have access to any Yandex address : * .yandex.ru. If incognito mode is selected in the settings , then the lock is enabled. Access to resources can be blocked by an antivirus (check its settings), a firewall of your system, or at the subnet level. To fix the problem, simply add them to the list of trusted sites, and the problem should go away.
If the problem with setting a ban on displaying a page in a frame still remains, then just go from a clean browser - it could be the "Incognito" mode or the downloaded browser without plugins and add-ons, extensions (in the case of Google Chrome). This approach fixes the problem in 99 out of 100 cases.
Server Side Lock
The second option: a ban on displaying pages in a frame. This problem is a little more difficult to solve than in the first case.
- Open the "Webvisor" section in Yandex.Metrica, press f12 (after clicking the button, the developer tools open).
- Tab "Console", reload the page (F5).
- In the list of errors there will be an underlined red line, there will be written about the problem.
If the blocking of displaying your site in a frame is set, then in the "Console" you will see the following line: X-Frame-Options: SAMERIORIGN
Recently, work has been actively carried out to solve this problem, but so far the solution is not supported in most browsers. If you remove this ban, it means that you deliberately make your site vulnerable to hacker attacks or just hacking.
Here is an example: At 1-S-Bitrix, they say: "Is site security more important to you or that you cannot see user actions on your site?" In order to make sure that for this reason the webview does not work, and you can’t see what your users are doing on the site, you need to check the server’s response to the request in any known service. Enter the address of the page with the installed webviewer and get the result, as in the screenshot.
The ban on displaying the page in a frame is established, the screen indicates this.
Do you still decide to lift the ban? If it is at the server configuration level, and you put the site on a shared hosting, contact technical support.
If the ban is at the script level, various cms make a request to their security libraries, so the problem will be more difficult to solve than you think. Failed to open the page in the frame? Contact the developers of your CMS.
As you can see, if the ban on displaying a page in a frame is set, the problem can be solved even on your own.