To get a working Mouse Contingent Display, you will need three main components:
To set up the iFrame code component, see https://people.beocat.ksu.edu/~karipayne/psychopy/introduction-to-custom-code/03-adding_an_iframe/
In the same routine you place this code component, you will also add your visual stimuli, like images or videos. If you want a mouse contingent overlay on multiple routines, you will need to add a code component to each one. However, you will not need to repeat the code in the “Begin Experiment” tab.
You can make individual changes to what data is collected in each mouse contingent display iteration. For this, see https://people.beocat.ksu.edu/~karipayne/psychopy/mouse-contingent-display-overlay/03-Customizing_HTML_code/
Some important iFrame quirks to note:
After you add in your stimuli, you will need to add in the HTML code for the mouse contingent display. For this, see the next section.