N
N
NeXTs_od2015-09-09 01:11:35
GitHub
NeXTs_od, 2015-09-09 01:11:35

Why does the webvisor from Yandex Metrica not work on Github pages?

Added a script from Yandex Metrics to the page hosted on github pages. Now I tried to see what the web browser was filming there, a large list of entries appeared, and clicking on one of them received "It is impossible to reproduce the visit on this page. Possible reasons: The counter code is not set, The page is not displayed in the frame."
But the counter code is clearly set) Looks like it's a ban on the iframe?

Has anyone managed to record and view webvisor footage on a page hosted on github pages?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
NeXTs_od, 2015-09-09
@NeXTs_od

Ah, back off.
Adblock disrupted the work of the webvisor.
Everything works with suspended adblock

A
andrew8712, 2016-05-03
@andrew8712

In my case, the problem was in the web server settings.
If your site is protected from being displayed in an iframe (that is, the X-Frame-Options header is used in the server settings), then the collected data will not be viewable. To view site visit data, you need to add an exception to the server settings for the webvisor.com domain and its subdomains, as well as for your site domain using the regular expression
^https?:\/\/([^\/]+\.) ?(yourdomain\.com|webvisor\.com)\/
If you are using nginx, add the following exceptions to the 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 domain name of your site. Use your site's domain zone (may be different from .com).
More details in the documentation: https://yandex.ru/support/metrika/behavior/click-m...

L
lucky devil, 2018-03-29
@lucky devil

switched to hosting beget and started

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question