{"id":2785,"date":"2023-07-03T13:51:37","date_gmt":"2023-07-03T13:51:37","guid":{"rendered":"https:\/\/obo.zoj.mybluehost.me\/uncategorized\/create-a-poll-show-aggregate-user-responses-on-a-results-page-automatically\/"},"modified":"2025-02-17T11:53:47","modified_gmt":"2025-02-17T11:53:47","slug":"create-a-poll-show-aggregate-user-responses-on-a-results-page-automatically","status":"publish","type":"post","link":"https:\/\/ioninteractive.com\/ionacademy\/create-a-poll-show-aggregate-user-responses-on-a-results-page-automatically\/","title":{"rendered":"Create a poll \u2014 Show aggregate user responses on a results page, automatically"},"content":{"rendered":"\n<p>The Ion platform can be used to build interactive Survey experiences that prompt visitors to make a selection from a few choices. If you are building an experience that Surveys your audience for information, you may want to display how many visitors made the same selection on a Results page.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Survey Form<\/strong><\/h3>\n\n\n\n<p>To get started, you will first want to set up your creative. Your creative will consist of at least two pages &#8211; one page with the survey and a second page showing the results.<\/p>\n\n\n\n<p>On the survey page, you will add a <a href=\"https:\/\/obo.zoj.mybluehost.me\/forms-add-a-form-to-a-creative\/\">freestyle form<\/a>&nbsp;and add a <a href=\"https:\/\/obo.zoj.mybluehost.me\/freestyle-forms-choice-group\/\">choice group<\/a> to your freestyle form. The choice group will be used for visitors&#8217; selections in your survey.<\/p>\n\n\n\n<p>In our example, we will use a choice group with two choices that save values of Apples and Oranges, respectively to a <a href=\"https:\/\/obo.zoj.mybluehost.me\/data-collection-create-a-data-field\/\" target=\"_blank\" rel=\"noopener\">data field<\/a> called &#8220;Fruit&#8221;. We will also use a choice group that only allows one selection to be made. We will also set our choices to send visitors to the Results page as soon as a selection is made by applying a form action to each choice.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Survey Lookup Table<\/strong><\/h3>\n\n\n\n<p>After setting up your survey form, it\u2019s time to create a lookup table that will be used to centralize the selections made by each visitor in a place that can be referenced by all other visitors. To create a lookup table:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>From within your console\u2019s side nav, click the Data Management tab and select \u201cLookup tables\u201d<\/li>\n\n\n\n<li>Click the &#8220;New lookup table\u201d button<\/li>\n\n\n\n<li>Give your lookup table a title\n<ul class=\"wp-block-list\">\n<li>In this example, we will use \u201cSurvey Results\u201d for the lookup table title<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p>Next, add entries to your lookup table by clicking the \u201cNew entry\u201d button. You will want to have one entry for each choice that can be made within your Survey.<\/p>\n\n\n\n<p>Each time you add an entry, you will see a textbox for the \u201cLookup key\u201d and another textbox for the \u201cLookup value.\u201d For this setup, you will want to make the lookup key for each entry the value that is saved for each choice (i.e. Apples and Oranges) and use 0 for the lookup value.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/obo.zoj.mybluehost.me\/wp-content\/uploads\/2023\/08\/image-png-Jul-03-2023-01-26-36-6788-PM.png\" alt=\"\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Results Page<\/strong><\/h3>\n\n\n\n<p>Once the lookup table is done, go back to your creative and click on the Results page to create rules and add content variables to display the results.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Rules<\/strong><\/h3>\n\n\n\n<p>Page rules can be used to save data to the lookup table, increasing each entry&#8217;s count as visitors make selections in real time. Page rules can also be used to read that data and save it to data fields which are then displayed on the page using content variables.<\/p>\n\n\n\n<p>To add page rules, click the \u201c+Rules\u201d &nbsp;button in the Page tab of your creative studio. The rule that you create will reference the value saved to the \u201cFruit\u201d field and add 1 to the corresponding entry within the lookup table (i.e. if they selected Apples, the Apples entry value would increase by 1) using the \u201cSave computed data into lookup table\u201d action.<\/p>\n\n\n\n<p>Next, add actions to your rule to save the value currently stored in each entry into separate data fields using the \u201cRead from lookup table\u201d action. In our example, we will save to Apples and Oranges fields, respectively.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"315\" loading=\"lazy\" src=\"https:\/\/obo.zoj.mybluehost.me\/wp-content\/uploads\/2025\/01\/Screenshot_6-4-1024x315.png\" alt=\"\" class=\"wp-image-7330\" srcset=\"https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2025\/01\/Screenshot_6-4-1024x315.png 1024w, https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2025\/01\/Screenshot_6-4-300x92.png 300w, https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2025\/01\/Screenshot_6-4-768x237.png 768w, https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2025\/01\/Screenshot_6-4.png 1169w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>*NOTE:<\/strong> When referencing a lookup table, you will enter the name of your lookup table, a period, and then the lookup key (i.e. Survey Results.Apples). To dynamically reference a lookup key using the value saved to a given field, you would use a content variable instead of a specific lookup key (i.e. Survey Results.{% raw %}{{Fruit}}{% endraw %}).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Content Variables<\/strong><\/h3>\n\n\n\n<p>Now that your rules are set up, you may add content variables to your page to display the data saved to the Apples and Oranges fields. For more information on content variables,&nbsp;<a href=\"https:\/\/obo.zoj.mybluehost.me\/dynamic-content-insertion\/\" target=\"_blank\" rel=\"noopener\">click here<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/obo.zoj.mybluehost.me\/wp-content\/uploads\/2023\/08\/support.ioninteractive.comhcarticle_attachments360046390051rtaImage__4_.jpeg\" alt=\"\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Testing<\/strong><\/h3>\n\n\n\n<p>After setting up your lookup table and creative, you can start testing! To do that, <a href=\"https:\/\/obo.zoj.mybluehost.me\/create-a-url-for-your-creative-to-go-live\/\" target=\"_blank\" rel=\"noopener\">all you need is a URL<\/a>. Each time you make a selection, you will see the count increase for the corresponding selection.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Percentages<\/strong><\/h3>\n\n\n\n<p>If you would prefer to show percentages instead of a total, you can add a few more actions to your rule. The next action will add Apples and Oranges together and save them to a Total field using the \u201cSave computed data\u201d action.<\/p>\n\n\n\n<p>Next, add actions that will divide each field by the total using the \u201cSave computed data\u201d action. These actions can be set up to either overwrite the original value saved or you can create a new field to save a separate percentage value. In our example, we are saving data to separate fields so the total and the percentage can be shown on the page. Our percentage fields are called Apples_Percent and Oranges_Percent, respectively.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"645\" loading=\"lazy\" src=\"https:\/\/obo.zoj.mybluehost.me\/wp-content\/uploads\/2025\/01\/Screenshot_7-5-1024x645.png\" alt=\"\" class=\"wp-image-7329\" srcset=\"https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2025\/01\/Screenshot_7-5-1024x645.png 1024w, https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2025\/01\/Screenshot_7-5-300x189.png 300w, https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2025\/01\/Screenshot_7-5-768x484.png 768w, https:\/\/ioninteractive.com\/ionacademy\/wp-content\/uploads\/2025\/01\/Screenshot_7-5.png 1169w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Finally, add two more actions to format the data as percentages using the \u201cSave formatted numeric data\u201d action. For more information on formatting numeric data,\u00a0<a href=\"https:\/\/obo.zoj.mybluehost.me\/save-formatted-numeric-data\/\" target=\"_blank\" rel=\"noopener\">click here<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/obo.zoj.mybluehost.me\/wp-content\/uploads\/2023\/08\/support.ioninteractive.comhcarticle_attachments360046390071rtaImage__6_.jpeg\" alt=\"\" \/><\/figure>\n\n\n\n<p>If you are using separate fields for the percentages, add corresponding content variables to your page and you will be all set!<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/obo.zoj.mybluehost.me\/wp-content\/uploads\/2023\/08\/support.ioninteractive.comhcarticle_attachments360046390131rtaImage__7_.jpeg\" alt=\"\" \/><\/figure>\n\n\n\n<p>Check out how to add other interactive form components such as dropdowns to your poll by <a href=\"https:\/\/obo.zoj.mybluehost.me\/data-collection-create-a-choice-set\/\">creating choice sets<\/a>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<p>If you have any questions, please contact us at help@ioninteractive.com.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Ion platform can be used to build interactive Survey experiences that prompt visitors to make a selection from a few choices. If you are building an experience that Surveys your audience for information, [&hellip;]<\/p>\n","protected":false},"author":21,"featured_media":5339,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","footnotes":""},"categories":[1114,1112],"tags":[2173,2242,2194,2301],"class_list":["post-2785","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-rules-overview","category-the-logic-setup","tag-advanced","tag-logic","tag-rules","tag-survey"],"_links":{"self":[{"href":"https:\/\/ioninteractive.com\/ionacademy\/wp-json\/wp\/v2\/posts\/2785","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ioninteractive.com\/ionacademy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ioninteractive.com\/ionacademy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ioninteractive.com\/ionacademy\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/ioninteractive.com\/ionacademy\/wp-json\/wp\/v2\/comments?post=2785"}],"version-history":[{"count":4,"href":"https:\/\/ioninteractive.com\/ionacademy\/wp-json\/wp\/v2\/posts\/2785\/revisions"}],"predecessor-version":[{"id":7331,"href":"https:\/\/ioninteractive.com\/ionacademy\/wp-json\/wp\/v2\/posts\/2785\/revisions\/7331"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ioninteractive.com\/ionacademy\/wp-json\/wp\/v2\/media\/5339"}],"wp:attachment":[{"href":"https:\/\/ioninteractive.com\/ionacademy\/wp-json\/wp\/v2\/media?parent=2785"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ioninteractive.com\/ionacademy\/wp-json\/wp\/v2\/categories?post=2785"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ioninteractive.com\/ionacademy\/wp-json\/wp\/v2\/tags?post=2785"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}