Best practices: gathering user feedback for published support articles / Jira Issue Collector
Asked by Stan Ry:

Howdy,

We are maintaining a knowledge base and would like to collect user feedback. The idea is to let people specify if a specific article was useful for them or not. And, if they answer 'not useful', let them suggest an improvement of change.

What would be the best practices to implement this in Confluence? I would appreciate any suggestion. Any macro or plugin? Also, is it possible to implement using external services without having to install any plugins for Confuence?

**Jira Issue Collector**

Participating in one of the AUG meetings I remember hearing about Conlfuence Jira Collector macro, which if my mind serves me well, should handle this all quick and easy. I have found [this video](https://www.youtube.com/watch?v=VplPRpmeJys), but I don't think I caught everything right. Would I be able to use this macro in Confluence?

Those of you who are already using this macro, please leave your feedback, I'd appreaciate your input.

Thank you in advance.


Answers:
author: Irina_Bel_Stiltsoft_
body: Hi [@Stan Ry](/t5/user/viewprofilepage/user-id/2115302) ,

In Stilsoft, we collect customers' feedback with our [Customer Case for Jira](https://marketplace.atlassian.com/apps/1212531/customer-case-jira-support-feedback?hosting=cloud&tab=overview) app(far less expensive than Jira Service Management and without sites, users, and agents limit). You create a portal for your external clients to submit their issues or ideas. It can be public (visible for everybody), private (restricted for specific email addresses or domains), or you can choose the option to make it a support service (personal communication with support assistant). The public portal where clients vote for ideas helps us prioritize our backlog.

I can show you how to create a portal for your project and answer your questions if you get interested.


author: Sloan
body: Hi Stan Ry

The Jira issue Collector is not a Confluence Macro, but a widget you can implement in any website and web application allowing you to implement HTML. Since there are HTML macros in confluence, this would work. :)

Using it as feedback platform in confluence is a nice Idea if you already use Jira.

Here is [Atlassian's Documentation on the Issue Collector,](https://confluence.atlassian.com/adminjiraserver/using-the-issue-collector-938847338.html) and here is the Documentation on the [HTML Include Macro](https://confluence.atlassian.com/doc/html-include-macro-169120653.html).

Regards  
Nick

comments: author: Stan Ry
body: Hi [@Sloan N_ B_](/t5/user/viewprofilepage/user-id/316409),

Thanks for your response.

Dear Niklas, could you please specify, what would be the best way to integrate the form, which appears when you click the trigger, right into the page?

I'd like to have the form shown at the bottom of my pages, or better have a button somewhere on article page that, when clicked, shows the feedback form underneath without poping it out for the users.

Currently I see the following code:

```
<script type="text/javascript"> window.ATL_JQ_PAGE_PROPS = {  "triggerFunction": function(showCollectorDialog) {   jQuery("#myCustomTrigger").click(function(e) {    e.preventDefault();    showCollectorDialog();   });  } };</script>
```

What would be the proper way to call this from a button?

I am currently using the approach published in [Advanced use of the JIRA issue collector](https://confluence.atlassian.com/adminjiracloud/advanced-use-of-the-jira-issue-collector-788726105.html):

1. I have added Markdown macro to the page.

2. Then I have inserted the following code inside the Markdown macro  

```
<head> <script src="http://code.jquery.com/jquery-latest.js"></script>
<script> jQuery.ajax({ url: "https://example.net/jira/s/9513b004b8a6dcfc358427f3364b533a-T/-786kzr/76010/be09033ea7858348cd8d5cdeb793189a/2.0.27/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector-embededjs/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector-embededjs.js?locale=en-UK&collectorId=2cb12cac",

 type: "get", cache: true, dataType: "script"
});


 window.ATL_JQ_PAGE_PROPS = {

 "triggerFunction": function(showCollectorDialog) {
   jQuery("#myCustomTrigger").click(function(e) {
     e.preventDefault(); showCollectorDialog();
     });
 }};

</script>
</head>

<body> <h2>JIRA Issue Collector Demo</h2> <a href="#" id="myCustomTrigger" class='btn btn-primary btn-large'>Report feedback</a> </body>
```

<br />

However, when I click the **Report feedback** button, nothing happens.

I have also copied the following code to a HTML file to test it out:

    <body>	<h2>JIRA Issue Collector Demo</h2>	<a href="#" id="feedback_button" class='btn btn-primary btn-large'>Report feedback</a><br />	<a href="#" id="bug_button" class='btn btn-primary btn-large'>Report bug</a>  	<!-- JIRA Issue Collector - append this at the bottom of <body> -->	<script type="text/javascript" src="https://jira.example.net/s/en_US-ydn9lh-418945332/803/1088/1.2/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?collectorId=<collectorId_1>"></script>	<script type="text/javascript" src="https://jira.example/s/en_US-ydn9lh-418945332/803/1088/1.2/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?collectorId=<collectorId_2>"></script>  	<!-- We will customize JIRA in the following script tag -->	<script type="text/javascript">		// safely use jquery here since the issue collector will load it for you		$(document).ready(function() { 			window.ATL_JQ_PAGE_PROPS = $.extend(window.ATL_JQ_PAGE_PROPS, { 				// ==== feedback collector ====				  '<collectorId_1>' : { 					// === custom trigger function ===					  triggerFunction : function( showCollectorDialog ) {						$('#feedback_button').click( function(e) {							e.preventDefault();							showCollectorDialog();						}); 					} 					// === default and hidden field values ===					, fieldValues : { 						// default values						  summary : 'Feedback for new website designs'						, description : 'The font doesn\'t quite look right' 						// hidden field value						, priority : '2'											} 				} 				// ==== bug collector ====				, '<collectorId_2>' : {					// === custom trigger function ===					  triggerFunction : function( showCollectorDialog ) {						$('#bug_button').click( function(e) {							e.preventDefault();							showCollectorDialog();						}); 					}					// === additional environment details ===					, environment : function() {								var env_info = {}; 						if ( window.ADDITIONAL_CUSTOM_CONTEXT ) {							env_info[ 'Additional Context Information' ] = window.ADDITIONAL_CUSTOM_CONTEXT;						} 						return env_info;					}					// === default field values ===					, fieldValues : function() { 						var values = {}; 								var error_message = $('.error_message');						if ( error_message.length !== 0 ) {							// record error message from the page context rather than asking the user to enter it							values[ 'summary' ] = error_message.children('.summary').text();							values[ 'description' ] = error_message.children('.description').text();						} 						return values; 					} 				} 			});		});	</script></body>

Again, nothing happens when I click either of the buttons.

What am I doing wrong?

Thank you.


Tags: atlassian-support

confluence-server

feedback

knowledge-base

server