Recent Updates Page 9 Toggle Comment Threads | Keyboard Shortcuts

  • Belen 10:53 pm on September 10, 2019 Permalink  

    Feature Update – Program Library, *html, GuidedTrack syntax highlithers and using Mailchimp from your program 

    Here’s what’s new:

    Program Library

    The Program Library is a collection of programs we have created so that you can use them from your own using the keyword  *program.

    These are a few examples of the programs that are available:

    • Widely used measures covering personality, mental disorders, substance use and more:
      • Ten Item Personality Inventory (TIPI), IPIP-NEO-120, IPIP-HEXACO
      • PHQ Screeners, CAGE-AID Questionnaire, DASS-21, PTSD Checklist – PLC-5, Eating Disorder Diagnostic Scale, Levenson Self-Reported Psychopathy Scale
      • Van Westendorp Price Study, Bongard Problems, memory tests
    • Screening and demographic questions: list of countries, US States, education level, income, religiousness, political affiliation, employment
    • Mathematical operations: truncate, round, random number generator, factorial, binary conversion, temperature conversion
    • Text functions: lowercase and trim text, text comparison, URL encoding, email validation
    • Date handling: current date, day of the week calculation, current time conversion to Eastern Time
    • Display programs: display a collection as a table, display a list of items for the user to rank, cute animal pictures

    Let’s say you are preparing a study to find out if it is possible to know something about a person’s personality by asking them if they like cheese or not. You will need to ask the participants if they like cheese and measure certain personality traits -for example, the Big Five. Here the Program Library comes in handy: instead of you coding a personality scale, why not use one of the measures we have already created?

    Use the search bar to find the scale you need by entering its name if you know it, or browsing by keywords. Search results that are programs from the library are labeled as such. Click on one of them and you will see a modal like this:

    The modal displays the code needed to use this program from your own – which you can automatically insert by clicking on the Insert button on the lower right corner. Additionally you can see the Code of the program and run it in Preview mode to see what it does. You can also create your own copy of any program in the Library to make changes and customize it to your needs.

    Notice that there are some programs that require you to assign value to some variables in order to run: if you want to make a text lowercase, you need to let the program know what the text is. The generated code will guide you in populating these variables, just substitute the sample value we give you for the actual one:

    As you can see, preparing a study to test your cheese/personality hypothesis is now easier than ever!

    Insert *html code in your program

    You can add cool formatting to the things you display on your program using this new feature. The syntax is simple: just indent the html code under the keyword *html.

    For example, you can display headers with different sizes:

    When you run the code, this is what you see…

    You can also use program variables in your html code! Check out this code:

    In fact, if you want to display a collection of collections as an html table, you don’t even need to write the code -we’ve done it for you. It is this program of the Program Library. Use it as is, or copy it to tweak the design of the table it displays.

    These are just two possible uses of this keyword, but you will find more as you write your programs. Just remember that the html code has to be W3C compliant, otherwise there will be an error message when running your program.

    Access your Mailchimp account from a GuidedTrack program

    If you use Mailchimp to manage your mailing lists, you can access it from your GuidedTrack program using *service. This means that when someone running your program gives you their email address, you can automatically add it to your Mailchimp audience. Additionally, you can access subscribers’ information and update it based on the program they use or the data they enter into it.

    Learn here all about accessing your Mailchimp account from your programs.

    GuidedTrack syntax highlighters

    If you use a code editor or an IDE (such as Sublime or Atom) to write your GuidedTrack programs, you can download a handy syntax highlighter so that your code appears in color similar to that on GuidedTrack.com!
     
  • Belen 11:46 pm on August 19, 2019 Permalink  

    A *service case study: Accessing your Mailchimp account from a GuidedTrack program 

    If you use Mailchimp to manage your mailing lists, you can access it from your GuidedTrack program using *service. This means that when someone running your program gives you their email address, you can automatically add it to your Mailchimp audience. Additionally, you can access subscribers’ information and update it based on the program they use or the data they enter into it.

    In this case study, you will learn to:

    • Create and configure the service in your program settings.
    • Retrieve a subscriber’s id and status.
    • Add a new subscriber to your list.
    • Update an existing subscriber.

    In order to get started, there are a couple of things you will need to retrieve from your Mailchimp account: an API Key and  the unique ID of your audience.

    Getting a Mailchimp API Key
    1. Log into Mailchimp, click on your name in the top right and select Account from the drop down.
    2. Click Extras, then select API Keys from the drop-down menu.
    3. Create a key or copy an existing one.
    Finding your audience’s unique ID
    1. Navigate to Audience on the upper bar.
    2. Click on Manage Audience, then select Settings.
    3. Find the ID at the bottom of the page under the text “Unique id for audience <your account name>”

    Now it’s time to log into GuidedTrack and start working on your program!

    How to create the Mailchimp service

    From the editor window of your program, go into Settings, click Services, then New Service. Fill in the fields as shown:

    name: mailchimp
    URL: https://us7.api.mailchimp.com/3.0
    username: anystring
    password: <your API key here>

    Make sure that the URL is pointing at the data center of your Mailchimp account (the bold prefix). You can identify your data center by looking at the last characters of your API key (-usXX)

    Once you are done, click “Save” and start editing your program.

    Retrieving a subscriber’s ID and status

    This is useful if you want to check if an email address is already in your audience or to retrieve the data linked to an existing one. We have created a program for you that is ready to use, or you can check out the code to customize it to fit your needs. If you choose to use the program we created, paste in your program the following lines of code:

    >>in_email = “WolfgangAMozart@greatmusic.com”
    >>in_subscriberListID = “your audience’s unique ID

    *program: mailchimp – lookup email – public

    These are the variables that the program returns:

    • out_mailchimpResponse: Full response from mailchimp
    • out_userFound: 1 if the email is already in the audience, 0 if it is not
    • out_userData: An association with all the data linked to the user
    • out_userID: Unique ID of the email address
    • out_userStatus: “Subscribed”, “Unsuscribed”, …

    If an error occurs when accessing Mailchimp, its description will be stored in the variable out_error and its code will show in out_errorCode.

    Adding a new email to your audience

    The program we have created allows you to add a new subscriber’s email address to your mailing list, and optionally assign it one of your “interests” or set the value of the Merge Fields of your choice. You can look at the code to use it as a guide to create your own, or simply add these lines to your program:

    >>in_email = “WolfgangAMozart@greatmusic.com”
    >>in_subscriberListID = “your audience’s unique ID

    *program: mailchimp – add new email – public

    If you want to assign one of your “interests” to the new subscriber, you will need to have its ID. You can find it logging into the Mailchimp API playground with your API key. Then follow these steps:

    1. Go to Lists
    2. On your audience, click on Subresources and choose interest-categories
    3. On the category that the interest is, click on Subresources and choose interests
    4. Click on the desired interest and you will find the ID in the field called id

    The code to add to your program will now be:

    >>in_email = “WolfgangAMozart@greatmusic.com”
    >>in_subscriberListID = “your audience’s unique ID
    >in_interestID = “the interest ID“>

    *program: mailchimp – add new email – public

    If you want to set the value of certain Merge Fields, you will need to create an association linking the Merge Tag to its desired value:

    >>in_email = “WolfgangAMozart@greatmusic.com”
    >>in_subscriberListID = “your audience’s unique ID
    >>in_mailchimpMergeFields = {“FNAME”->”Wolfgang”, “LNAME”->”Mozart”}

    *program: mailchimp – add new email – public

    Updating an existing subscriber

    The program to update the data of a subscriber that is already on your list requires that you identify the subscriber by their ID. It is likely that you will have their email available, but not the ID -if this is the case, you can use the program “mailchimp – lookup email – public” to retrieve it! You can assign a new interest to a subscriber and set the value of Merge Fields:

    >>in_userID = “kdkdk3k3303u92733fjdj3333jd”
    >>in_subscriberListID = “your audience’s unique ID
    >>in_mailchimpMergeFields = {“FNAME”->”Wolfgang”, “LNAME”->”Mozart”}

    *program: mailchimp – update subscriber – public

     
  • Aislinn 9:48 pm on November 12, 2018 Permalink  

    Feature Update – *component, .count, .find, .keys, *throwaway, and more! 

    Here’s what’s new:

    Component

    The ability to put things in boxes, and optionally make them pretty and clickable, is now here, thanks to *component:

    Simple *component

    Above, a *component keyword was added to the first sentence. It’s not clickable, but it’s nice if you want to distinguish some content using a box.

    The code for adding a simple box around things is:

    Multiple lines can be indented beneath *component (following the same level of indentation), allowing images, videos, stories, and more to be contained within a single box.

    You can also have multiple components on a single page.

    If your an HTML or CSS whiz, *component puts the content inside of an HTML

    tag, making it easy to style it as a group.

    Clickable *component

    To make a component clickable, add *click

    Above, users can click the box. If they do, they’ll be asked the two questions in sequence. When they finish answering questions they will return to the same screen that originally contained the *component. The whole page with then have its code rerun once the *click is complete.

    You could instead redirect users by adding a *goto or *switch keyword as the last part of the *click.

    If users don’t click the box, that’s okay, they’ll still see the content that follows after *component.

    Making a *component clickable makes the box border a darker color, as the next image shows.

    Nested *component

    Components can be placed inside of components.

    In the above example, there are two components inside of one and both are clickable (hence the darker border around the two inner boxes). The code to have these two clickable, nested components is:

    You can use nested *components to allow users to click one of several, optional activities. This is like designing your own custom buttons that look and behave the way you want.

    Pretty, CSS-decked *component
    Components can be made about as pretty as your imagination and CSS programming skills allow, using *classes.

    The image at the top was made using the following built-in Bootstrap CSS classes:

    If you embed your program on another website, and you’ve got some bonus skills, then you can add custom CSS stylesheets and classes to make your components especially eye-pleasing.

    Count stuff that appears in your text or collection variable

    With variableName.count(“thing to count”) you can count up all the times that thing appears in a collection or text variable.

    For example, let’s say users are taking your refined quiz, “What puffy snack product are you?” You might count up the values in a collection of their answers like this:

    Here are other examples:

    • Count how many times a user did a particular anxiety-busting activity, in a collection of all activities completed.
    • Count the number of times a user stealthily added the word “meow” to a story.
    • Count up the 1s in a collection of 0s and 1s (to get a total score on a true/false quiz).
    • Count the number of times a letter appears in a variable, as in the below:

    Find where something occurs in your text or collection variable

    Find let’s you locate things of interest in a collection or variable.

    Let’s say you ask your users to rank their top-five favorite food-related feel-good movies in order of their awesomeness. The result produces a collection that might look something like:

    If you want to know what rank your user gave The Lunchbox, you could do the following:

    You can also use find to:

    • Locate the position, if any, of certain flagged words in a user’s open-ended response (e.g. “depressed”).
    • Find out when a user did a task of interest in a collection of tasks they could do in any order.
    • Find certain symbols or keywords in order to replace them with something else.

    The .find function starts searching from the beginning. So if the item in question is the first item, .find will return the number 1. If it’s the second item, it’ll return with 2. If there are multiple entries, in say positions 3 and 5, it’ll just return with the first one it encounters (i.e. 3).

    If the item in question can’t be located, it’ll display as blank if inline, or you could do something like the following:

    Above, “it wasn’t found!” will display, since there aren’t any z’s in the text searched.

    Get all the keys to your association

    If you want a collection of all the keys in your association (e.g. all the Polish words for which you have English translations), you can use .keys, like so:

    The example above would return, “The words you know are: bee, beetle, book”.

    *throwaway the data that you don’t need

    Each question answered is stored as a column in the csv automatically. If you don’t want certain questions and their answers stored, you can use *throwaway. This might be handy if:
    • You’re asking users for personally identifiable information (e.g. their name or email) and do not want this information saved in the csv for privacy reasons.
    • You’d simply like to keep your csv tidier, and don’t want to store data from questions that are not relevant to you.
    • You want to reduce the file size of your csv, which could become quite massive if users answer the same, though slightly varied questions repeatedly (and you don’t need to save those responses).
    You can also use *save in conjunction with *throwaway to store just one column of answers as opposed to two.  (Otherwise, with *save there is one column of answers with the variable name as a header, e.g. userName, and one column of duplicate answers with the question text as a header, e.g. “What’s your name?”).With *save and *throwaway both indented under a *question, the variable name WILL still be its own header in a column with its answers (it will not be thrown away!). However, the question itself will not be directly stored in the csv (i.e. there will not be a duplicate column of answers headed by the question text).

    For example,in the program below you want to know how many fruits a person likes out of a list but you don’t need to know which ones in particular they like:

    Or let’s say you ask the user for their email address but you’re just going to use it from within the program and do not want it stored in the csv file:

    Note that *throwaway can only be used to keep a question – with its answers – from being written in the file, but you need to store temporarily the answer in a variable so that you can use it. Since you cannot throwaway variables, you will need to overwrite it like in the example so that the column with the header “email” has blanks for every run.

    Download your program and all its subprograms

    You can download your entire program, subprograms and all, as simple text files to store on your computer.

    What’s especially great about this is that you can search this backup locally on your computer to find important things, such as all mentions of a certain word.

    Of course, it’s also handy to have a backup in case you delete something accidentally from the GuidedTrack version, or want to revert to an old version.

    To get your backup, go to your program and click the kebab menu in the top-right, then select “Download code”:

    Next, select “Package code”:

    When your file is ready, you can download it and save it to your computer.

    New visual editor!

    Have you noticed GuidedTrack’s editor has gotten a delightful upgrade?

    On the left-hand side is the new quick reference tool. It helps you find keywords, get live examples of how to use them, and read more detailed instructions.

    Pressing the + button will immediately add a simple example of that keyword in action to your program, which you can then modify to fit your needs.

    Pressing on the keyword name opens up editable fields for customization:

    If you fill out the fields and click “Insert” you’ll quickly add that element to your program.

    You can also press the ? for additional help and information:

    The larger help document, with even more detailed explanations of keywords, is still available. Its link has moved to the upper right:

    As another bonus, the editor will soon be completely usable on mobile devices!

    Using Zapier and IFTTT with GuidedTrack’s *service

    There are two awesome tools we want to highlight that you can use with *service to connect your GuidedTrack program to the APIs of hundreds of other apps and services – Zapier and IFTTT.

    For example, you could potentially do the following:

    • Save a date in your Google Calendar or Calendly
    • Add to-do items to Trello or Todoist
    • Send important info to Evernote
    • Show an event via Eventbrite
    • Show the weather or photos from NASA
    • . . . and more!
    You can also send GuidedTrack variables to a Google spreadsheet, which would mean your sheet would be populated in real time by users taking your program.

    There are lots of ways this could be useful, for example:

    • Easily see your most important data arrive in real time.
    • Add formulas for to your spreadsheet to do automatic calculations.
    • Efficiently share specific data with others.

    Get the full lowdown here on connecting Zapier and IFTTT to Google Sheets.

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel