Unverified Commit 2acf6fdb authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

Outline for survey implementation (#27305)

parent d492d716
window.ApiSurveyDocs = function(apiPages) {
var url = window.location.href;
var fragments = url.split('/');
if (fragments == null || fragments.length == 0) {
return;
}
var classFragment = fragments[fragments.length -1];
if (classFragment == null) {
return;
}
var apiDocClassFragments = classFragment.split('-');
if (apiDocClassFragments.length != 2) {
return;
}
var apiDocClass = apiDocClassFragments[0];
if (url == null || apiPages.indexOf(apiDocClass) == -1) {
return;
}
scriptElement = document.createElement('script');
scriptElement.setAttribute('src', 'https://www.google.com/insights/consumersurveys/async_survey?site=sygvgfetfwmwm7isniaym3m6f4');
document.head.appendChild(scriptElement);
}
scriptElement = document.createElement('script');
scriptElement.setAttribute('src', 'https://storage.googleapis.com/flutter-dashboard.appspot.com/api_survey/api_survey_docs.html');
document.head.appendChild(scriptElement);
<script async="" defer=""
src="//www.google.com/insights/consumersurveys/async_survey?site=i2bdmo2dzky7fqws25nicgx5f4">
</script>
<script async="" defer="" src="../assets/api_survey.js"></script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment