Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Of course, you can just go to a URL where you set a form to appear and see if it is there. However, with multiple conditions, you cannot always see which ones are already met and which ones you are still waiting for. It is possible to see in the browser console what conditions you created and whether they are met. Below is described how this can be done. Easier however is to use our deployment assistant.

...

Step 1: Browser developer tools

Open your browser developer tools. Select the 'Console' tab.

...

Step 2: Add cookie

Type the following text on the command line and press Enter.

Code Block
languagejs
document.cookie='LOG=true'

Step 3: Reload

Then reload the webpage. To reload either use Ctrl + SHIFT + F5 or type in the following text on the command line and press Enter:

Code Block
languagejs
Pastease.forceParse()

or

...

If implemented correctly the console will log all the conditions and its evaluation of them for the webpage.

...

Step 4: Console logs

How should you interpret the console log? There can be 4 different types of console log results.

1. Mopinion Deployment Code (MDC) not loaded

If the MDC is not loaded, no console log will show.

2. Multiple Deployment Codes loaded

Warning

This will result in a malfunction of the deploymentcode. Make sure you only load one code.

3. Mopinion Deployment Code loaded, but deployment switched off

If the MDC is loaded correctly, but the deployment code is switched off the console log will look like the below.

...

In Mopinion you can see whether your deployment code is active or not, by clicking on ‘Data collection’, on the left-hand side of the page, then, ‘Deployments’.

...

Click on the pencil button, and you will be able to switch the status at the top of the page:

...

4. Mopinion Deployment Code loaded, conditions checked

If the MDC has loaded correctly, all conditions for the forms will be checked. Each condition can be recognized as a rule in the console. The first condition in the Mopinion Deployment Manager is rule 0 in the console log. A JSON object holds all the settings for the condition. The unique form key is the form reference. See Where can I find the form key? to match the form key with the form name.

All settings are evaluated. Behind the setting, you can then see whether the setting was true or false. If all are true the feedback form will be loaded. If one is false the form will not be loaded.

...

5. Mopinion Deployment Code loaded, but not allowed to load

The console can also show an error message concerning the Content Security Policy (CSP) of your website. If the error message states Refused to load the script 'https://deploy.mopinion.com/js/pastease.js' because it violates the following Content Security Policy directive: ... your website does not yet allow code to be loaded from our domain. Check How do I set my CSP header? for instructions on how to set your CSP to allow code to be loaded from the Mopinion domain.

...

you want a complete overview of your deployment conditions we recommend that you try our Deployment Assistant.

...

Easy html macro
theme{"label":"solarized_dark","value":"solarized_dark"}
contentByMode{"html":"<div id=\"surveyContent\"></div>","javascript":"var confluenceData = {};\nvar pageId;\nvar pageTitle;\n\ntry {\n confluenceData = JSON.parse(parent.window.name);\n var pageId = confluenceData.options.productContext['page.id'];\n var pageTitle = confluenceData.options.productContext['page.title'];\n} catch(e) {}\n\nvar src = 'https://collect.mopinion.com/assets/surveys/2.0/js/survey.min.js';\n\nvar vars = {\n key:'211a4fdb96626776846147095cc335b448e20458', \n domain:'app.mopinion.com', \n divName:'surveyContent', \n button:false, \n use_collect:false, \n useQuerySelectorAll:false\n};\n\nvar s = document.createElement('script');\ns.async = 'async';\ns.id = 'mopinionFeedbackScript';\ns.src = src;\ns.onload = s.onreadystatechange = function() {\n if (!s.readyState || s.readyState === 'loaded' || s.readyState === 'complete') {\n try {\n srv.loadSurvey(vars);\n } catch (e) {}\n }\n}\ndocument.head.appendChild(s);","css":""}

...