Answer the question
In order to leave comments, you need to log in
How to bypass metrics API security policies?
Good day!
There is a site on which Yandex.Metrica keeps records of visits, etc. This data can be successfully viewed on the site itself and in Yandex.Metrica in the form of various charts, etc.
I am writing some kind of web analytical system that should collect Yandex.Metrica data from this site and other similar sites.
Using the appropriate GET requests, I'm trying to get data in JavaScript:
$.getJSON('https://api-metrika.yandex.ru/stat/traffic/summary.json?id=10335835&pretty=1', null, function (result) {
alert(resul); // даже не выводит полученные данные!!!
// продолжение следует..
}
<system.webServer>
<httpProtocol>
<customHeaders>
<clear />
<add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Headers" value="Content-Type" />
<add name="Access-Control-Allow-Methods" value="POST, GET, OPTIONS" />
<add name="Access-Control-Allow-Credentials" value="true" />
</customHeaders>
</httpProtocol>
</system.webServer>
Answer the question
In order to leave comments, you need to log in
$.getJSON('https://api-metrika.yandex.ru/stat/traffic/summary.json?id=10335835&pretty=1', null, function (result) {
alert(resul); // даже не выводит полученные данные!!!
// продолжение следует..
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question