Analytics

Analyze survey results (NPS)
You can see analytics immediately. Just click this link

or you can pass the survey and see the embedded analytics

The results of this survey are not collected. In case you want to take a real survey please follow the link: NPS Survey


                        

    
        Survey.StylesManager.applyTheme("default");
    


var json = {
  "completedHtml": "<p style='font-size:24px;'>Thank you for completing the survey! (please wait for analytics to load ...)<p>",
  "pages": [
    {
      "name": "page_info",
      "elements": [
        {
          "type": "radiogroup",
          "name": "organization_type",
          "title": "Which of the following best describes you or your organization?",
          "hasOther": true,
          "choices": [
            {
              "value": "ISV",
              "text": "ISV (building commercial/shrink wrapped software)"
            },
            {
              "value": "Consulting",
              "text": "Software consulting firm (provide development services to other organizations)"
            },
            {
              "value": "Custom",
              "text": "Custom software development (as a freelancer/contractor)"
            },
            {
              "value": "In-house",
              "text": "In-house software development"
            },
            {
              "value": "Hobbyist",
              "text": "Hobbyist (develop apps for personal use)"
            }
          ],
          "colCount": 2
        },
        {
          "type": "radiogroup",
          "name": "developer_count",
          "visibleIf": "{organization_type} != 'Hobbyist'",
          "title": "How many software developers are in your organization?",
          "choices": [ "1", "2", "3-5", "6-10", "> 10" ]
        },
        {
          "type": "radiogroup",
          "name": "VerticalMarket",
          "visibleIf": "{organization_type} != 'Hobbyist'",
          "title": "What vertical market does your product serve?",
          "hasOther": true,
          "choices": [
            "Automotive",
            "Banking",
            "Consumer",
            "Education",
            "Engineering",
            "Energy",
            "Fast-moving consumer goods",
            "Financial",
            "FinTech",
            "Food and beverage",
            "Government (federal, state, local)",
            "Healthcare",
            "Insurance",
            "Legal",
            "Manufacturing",
            "Media",
            "Online",
            "Raw materials",
            "Real estate",
            "Religion",
            "Retail",
            "Jewelry",
            "Technology",
            "Telecommunications",
            "Transportation (Travel)",
            "Electronics",
            "Not-for-profit"
          ],
          "colCount": 4
        },
        {
          "type": "radiogroup",
          "name": "product_discovering",
          "title": "How did you first discover the product? ",
          "hasOther": true,
          "choices": [
            "Search engine",
            "GitHub",
            "Friend or colleague",
            "Redit",
            "Medium",
            "Twitter",
            "Facebook"
          ],
          "otherText": "Other",
          "colCount": 3
        }
      ]
    },
    {
      "name": "page_libraries_usage",
      "elements": [
        {
          "type": "checkbox",
          "name": "javascript_frameworks",
          "title": "What JavaScript framework do you use?",
          "hasOther": true,
          "choices": [
            "React",
            "Angular",
            "jQuery",
            "Vue",
            "Meteor",
            "Ember",
            "Backbone",
            "Knockout",
            "Aurelia",
            "Polymer",
            "Mithril"
          ],
          "choicesOrder": "asc",
          "otherText": "Other (Please name it)",
          "colCount": 3
        },
        {
          "type": "checkbox",
          "name": "backend_language",
          "title": "What Web Backend programming language do you use?",
          "hasOther": true,
          "choices": [
            "Java",
            "Python",
            "Node.js",
            "Go",
            "Django",
            "Asp.net",
            "Ruby"
          ],
          "choicesOrder": "asc",
          "otherText": "Other (Please name it)",
          "colCount": 3
        }
      ]
    },
    {
      "name": "page_product_usage",
      "elements": [
        {
          "type": "radiogroup",
          "name": "useproduct",
          "title": "Do you currently use our libraries? ",
          "isRequired": true,
          "choices": [ "Yes", "No" ]
        },
        {
          "type": "checkbox",
          "name": "uselibraries",
          "visibleIf": "{useproduct} = \"Yes\"",
          "title": "What libraries do you use?",
          "isRequired": true,
          "choices": [ "Survey Library (Runner)", "Survey Creator (Designer)" ]
        },
        {
          "type": "checkbox",
          "name": "product_new",
          "title": "We are going to release new libraries shortly. Please check a product(s), if you are interesting to use them",
          "choices": [
            "Export to PDF (survey and its result)",
            "Analytics (Create Analytics based on JSON results)"
          ]
        },
        {
          "type": "checkbox",
          "name": "supported_devices",
          "title": "What device types do you need to support?",
          "isRequired": true,
          "choices": [
            "Desktop",
            {
              "value": "Tablete",
              "text": "Tablet"
            },
            "Mobile"
          ]
        },
        {
          "type": "radiogroup",
          "name": "native_mobile_support",
          "visibleIf": "{supported_devices} contains \"Mobile\"",
          "title": "How is important for you a native mobile support?",
          "isRequired": true,
          "choices": [
            {
              "value": "1",
              "text": "I am happy with adaptive html rendering"
            },
            {
              "value": "2",
              "text": "Something important, but adaptive html rendering is fine"
            },
            {
              "value": "3",
              "text": "Very important"
            },
            {
              "value": "4",
              "text": "Can not use the library without it"
            }
          ]
        },
        {
          "type": "radiogroup",
          "name": "native_framework",
          "visibleIf": "{native_mobile_support} >= 3",
          "title": "Please name the framework that you are using or going to use in your native mobile developlment",
          "hasOther": true,
          "choices": [
            "react native",
            "nativescript",
            "ionic",
            "xamarin",
            "native iOS and Android apps"
          ],
          "otherText": "Other (Please name it)",
          "colCount": 2
        }
      ]
    },
    {
      "name": "page_alternative",
      "elements": [
        {
          "type": "radiogroup",
          "name": "product_alternative",
          "title": "What would you use as an alternative if SurveyJS does not exist?",
          "isRequired": true,
          "hasOther": true,
          "choices": [ "Use popular Survey cloud platforms", "Develop ourselves" ],
          "otherText": "Other (please name)"
        },
        {
          "type": "text",
          "name": "survey_cloud_platform",
          "visibleIf": "{product_alternative} = \"Use popular Survey cloud platforms\"",
          "title": "What Survey cloud platform would be your choice?"
        },
        {
          "type": "radiogroup",
          "name": "product_recommend",
          "title": "Have you recommended the product to anyone?",
          "choices": [ "Yes", "No" ]
        }
      ]
    },
    {
      "name": "page_recommend",
      "elements": [
        {
          "type": "rating",
          "name": "nps_score",
          "title": "How likely are you to recommend SurveyJS to a friend or colleague?",
          "isRequired": true,
          "rateMin": 0,
          "rateMax": 10,
          "minRateDescription": "Most unlikely",
          "maxRateDescription": "Most likely"
        },
        {
          "type": "comment",
          "name": "favorite_functionality",
          "title": "What's your favorite functionality / add-on?"
        },
        {
          "type": "comment",
          "name": "product_improvement",
          "title": "How could our products be improved to better meet your needs?"
        }
      ]
    }
  ]
};

window.survey = new Survey.Model(json);


    survey.onComplete.add(function(result) {
        document.querySelector('#surveyResult').textContent =
            "Result JSON:\n" + JSON.stringify(result.data, null, 3);
    });


ReactDOM.render(<Survey.Survey model={survey}  />, document.getElementById("surveyElement"));

survey.onComplete.add(function() {
 var surveyResultNode = document.getElementById("surveyResult");
 surveyResultNode.innerHTML = "";

  $.get("/api/MySurveys/getSurveyNPCResults/", function (data) {
        var normalizedData = data.Data.map(function (item) {
            survey.getAllQuestions().forEach(function (q) {
                if (item[q.name] === undefined) {
                    item[q.name] = "";
                }
            });
            return item;
        });

        var visPanel = new SurveyAnalytics.VisualizationPanel(
          surveyResultNode,
          survey.getAllQuestions(),
          normalizedData
        );
        visPanel.render();
    });
});
                    
<!DOCTYPE html>
<html>
<head>
    <title>Analyze survey results (NPS), Reactjs Survey Library Example</title>


    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="https://unpkg.com/jquery"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/7.6.0/polyfill.js"></script>
    <script src="https://unpkg.com/react@15/dist/react.js"></script>
    <script src="https://unpkg.com/react-dom@15/dist/react-dom.js"></script>
    <script src="https://unpkg.com/@babel/standalone@7.2.5/babel.min.js"></script>
<script src="https://surveyjs.azureedge.net/1.1.16/survey.react.js"></script>
<link href="https://surveyjs.azureedge.net/1.1.16/survey.css" type="text/css" rel="stylesheet" />
    <link rel="stylesheet" href="./index.css">
<link href="https://surveyjs.azureedge.net/1.1.16/survey.analytics.css" rel="stylesheet" />

<script src="https://cdn.rawgit.com/inexorabletash/polyfill/master/typedarray.js"></script>

<script src="https://polyfill.io/v3/polyfill.min.js"></script>

<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>

<script src="https://unpkg.com/wordcloud@1.1.0/src/wordcloud2.js"></script>

<script src="https://surveyjs.azureedge.net/1.1.16/survey.analytics.js"></script>
</head>
<body>
    <div style="margin: 20px;">
<a href="https://surveyjs.io/Service/SurveyNPS" style="font-size: 24px">You can see analytics immediately. Just click this link</a>

<p>
    or you can pass the survey and see the embedded analytics
</p>

<p>
    The results of this survey are not collected. In case you want to take a real survey please follow the link: 
    <a href="https://surveyjs.io/published?id=87b306f1-e41c-47c3-99de-1d2cd46c8253" style="font-size: 24px">NPS Survey</a>
</p>
</div>            <div id="surveyElement">
            </div>
    <div id="surveyResult"></div>

<script type="text/babel" src="./index.js"></script>

</body>
</html>