Forum Discussion
JimOwen-f418d1f
3 months agoCommunity Member
How to direct user via URL
I would like to create a project which either starts on a different slide or else populates a variable upon user entry, based on a URL. The idea is to create multiple QR codes which send the user to...
MathNotermans-9
3 months agoCommunity Member
You can create a dynamic URL for each course.
Shown how to here.
https://community.articulate.com/discussions/discuss/qr-code-and-shorturl-generation-in-storyline/1034621
As for query parameters... yes you can use them. I actually did post about it but searching your own content in the new community is tough, so i do have trouble finding it.
In my code library i found this snippet with which you can read query params.
function getQueryVariable(variable)
{
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i=0;i<vars.length;i++) {
var pair = vars[i].split("=");
if(pair[0] == variable){return pair[1];}
}
return(false);
}
/*
Example URL:
http://www.example.com/index.php?id=1&image=awesome.jpg
Calling getQueryVariable("id") – would return “1”.
Calling getQueryVariable("image") – would return “awesome.jpg”.
*/