Giter VIP home page Giter VIP logo

qualtricks's Introduction

qualtricks

Packaged convenience functions for Qualtrics Site Intercept (Website/App Feedback) API and Survey API functions not in ropensci/qualtRics, e.g.,

listUsers getUserAPIToken createUserAPIToken listSurveys (allowing parameters)

WIP

Tips

Brand Admin utilities

  1. List Qualtrics User Type Permissions from Admin Panel
rules = document.querySelectorAll("td[class*=Col_PermissionName]")

table = [];

for(i = 0; i < rules.length; i++) {
    tabName = rules[i].parentNode.parentNode.parentNode.parentNode.parentNode.parentElement.parentElement.parentElement.parentElement.id; // eg "GeneralSection"
    tabSection = rules[i].id.replace("PermissionLabel-", ""); // eg "Project Permissions"
    itemName = rules[i].innerText.replace(/\r?\n|\r/g, "").replace(/\s\s+/g, ""); //eg "Brand Experience"

if(tabSection.match("Restriction") == null) {
    itemEnabled = rules[i].parentNode.querySelectorAll("a")[0].className + rules[i].parentNode.querySelectorAll("a")[0].title;
    itemEnabled = itemEnabled.replace("Checkbox EnabledUnchecked", "").replace("Enables this permission", "").replace("Checkbox EnabledUnused", "");
    itemDisabled = rules[i].parentNode.querySelectorAll("a")[1].className + rules[i].parentNode.querySelectorAll("a")[1].title;
    itemDisabled = itemDisabled.replace("Checkbox DisabledUnchecked", "").replace("Disables this permission", "").replace("Checkbox DisabledUnused", "");

} else {
    if(rules[i].parentNode.querySelector("span.Hidden") != null) {
        itemEnabled = rules[i].parentNode.querySelector("input") .value;
    } else {
        itemEnabled = "unlimited";
    }
    itemDisabled = null;
}
    table[i] = tabName + "|" + tabSection + "|" + itemName + "|" + itemEnabled + "|" + itemDisabled;

}

table.join("\n"); // paste into excel or something

Version control intercepts as code (Chrome)

  1. Go to any intercept project's editor (doesn't matter which, you'll get all projects within the zone)
  2. Open browser developer tools
  3. Reload page
  4. In developer tools: Network tab, filter results to GetZoneIntercept โ†’ Preview
  5. Right click โ†’ Store object as global variable (the raw response is also available under Response but is slower/buggier to copy)
  6. In console, run copy(temp1)
  7. Paste into a text editor and save file. Name file after intercept ID, e.g., SI_abc123.json.
  8. Optionally: print the editor page as a PDF (landscape), e.g., SI_abc123.pdf

getZoneIntercept screenshot

You can also push this payload via fetch in the console

  1. From the intercept editor UI, save an arbitrary change and capture the Network Request "SaveIntercept" as a fetch request
  2. Paste copied request in text editor, it'll look something like this:
fetch("https://hbp.az1.qualtrics.com/DX/InterceptsSection/EditIntercept/Ajax/SaveIntercept", {
"headers": {
  "accept": "text/javascript, text/html, application/xml, text/xml, */*",
  "accept-language": "en-US,en;q=0.9,es;q=0.8",
  "content-type": "application/x-www-form-urlencoded; charset=UTF-8",
  "sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
  "sec-ch-ua-mobile": "?0",
  "sec-fetch-dest": "empty",
  "sec-fetch-mode": "cors",
  "sec-fetch-site": "same-origin",
  "x-prototype-version": "1.7.3",
  "x-requested-with": "XMLHttpRequest",
  "x-xsrf-token": "XSRF_abc123"
},
"referrer": "https://abc.az1.qualtrics.com/DX/InterceptsSection/EditIntercept?ContextIntercept=SI_abc123&ContextZone=ZN_abc123",
"referrerPolicy": "strict-origin-when-cross-origin",
"body": "Definition=%7B%22Status%22%3A%22Active%22%2C%22Edited%22%3Atrue%2C%22ZoneID%22%3A%abc123..."
"method": "POST",
"mode": "cors",
"credentials": "include"
});
  1. Replace everything after "Definition=" in the body value with the relevant intercept payload from above and run in the browser console.

saveIntercept screenshot

qualtricks's People

Contributors

derring-do avatar

Watchers

James Cloos avatar  avatar

qualtricks's Issues

Why is the documentation wrong after install?

  • Despite keywords internal, some helper functions still being exported
  • NAMESPACE file seems to have correct exports, but qualtricsLogin shows up instead of getProjectStats in help file

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.