Creating a custom AMP

54 views
Skip to first unread message

Salwa K

unread,
Feb 18, 2021, 8:33:11 PM2/18/21
to Minno.js
Hi everyone,

I’m programming an AMP for our research project (following your guide here).

Below are the steps I’ve successfully completed, and where I am now stuck. Hoping you can help me diagnose the issue. Thanks so much!!
  • Qualtrics script: I input the JavaScript code for the question into Qualtrics.
    • Success: I'm able to run your AMP from my Qualtrics survey.
  • I made a GitHub Page, and I uploaded your AMP script onto it, to see if it runs when I put my own URL into the Qualtrics script.
    • Success: Your AMP script does run, from this file hosted on my GitHub.
  • The next step is to edit the AMP script you provided, and define my own custom AMP script. This is where I'm stuck now.
    • I created my custom AMP script and hosted it on my GitHub here (I updated the base URL and media file names).
    • I then updated the URL in the Qualtrics script, to link to my custom AMP script. Unfortunately, it doesn't run in Qualtrics now.
  • Possible diagnoses?
    • Issue in my custom AMP file?
    • Issue with my GitHub Pages?
    • OR do I also need to create a custom full AMP script too, from the one you have here?
-----
PS. here is a breakdown of my understanding of the three different scripts/layers that this process contains. Please clarify if I've misunderstood.
  • Qualtrics script: The script  (.JS code) that goes into the Qualtrics question.
  • AMP script: the script (.JS file) that contains the code for the AMP and specifies the media files. It’s hosted on my GitHub Page.
  • Full AMP script: the script (.JS file) that contains the code for the full AMP. Not sure if this should be hosted on my GitHub Page as well, and if I need to customize it.

Mayan Navon

unread,
Feb 21, 2021, 2:43:09 PM2/21/21
to Salwa K, Minno.js
Hi Salwa,

You only need the Qualtrics script and the AMP script. You don't need to re-create the full AMP script (only to call it at the beginning of your AMP script, as you did).

Because your script ran fine on your gitHub pages before you modified it, I'm guessing that the issue is with your modification. 

- Are all your images saved in the same folder, that you refer to in your base_url (including pic1.jpg-pic.200.jpg from the full amp script)?
- Are you able to get to your custom script by pasting its url in the browser?
- Did you only change this part of the code for Qualtrics? - The rest should be untouched.
    // This function gets activated only after MinnoJS is loaded
    function onLoad() {
        // Run your study (just set the correct URL)
        minnoJS(canvas, "https://cdn.jsdelivr.net/gh/baranan/minno-tasks@0.*/amp/qualtrics/race_amp.js");

Thanks,
Mayan

--
You received this message because you are subscribed to the Google Groups "Minno.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to minnojs+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/minnojs/8931bf49-bda2-4a67-aec9-2d97bd89238en%40googlegroups.com.


--
Mayan
Reply all
Reply to author
Forward
0 new messages