queryStringParameter returning undefined in WebAR

in my WebAR experience when I queryStringParameter i seem to only get undefined. I copied from the documentation to get the correct syntax.

let quesionId = Z.device.queryStringParameter(“qid”);

Is there something I am doing incorrectly?

Thanks

I haven’t tried this yet but maybe this will help you out.
https://forum.zap.works/t/deeplink-parameters-cant-read-parameter-passed-via-deeplink/3608

and this one.
https://forum.zap.works/t/webar-birthday-invite/5528

Steve

Hey I took a look at the two links you sent and they don’t fill me with hope? The first link implies this is a year old problem that was never fixed?

I made a new project to try and track this bug down.

Link to published product:
https://web.zappar.com/?zid=z/1aJi1c&rs=&menu=&toolbar=&frank=bubba

Entire code of project :

const Text = symbol.nodes.Text;
var frank = “”;
frank = Z.device.queryStringParameter(“frank”)[0];
Text.text(frank);

it never gets past the “unlocking” screen as it tries to run this code and hard locks.

With lots of help from the great team at zapworks I have finally cracked this nut.

The secret is the humble question mark. if you are going to poll queryStringParameter then you need to add a second question mark after the zapworks default parameters.

Bad URL:
https://web.zappar.com/?zid=z/1aJi1c&rs=&menu=&toolbar=&frank=bubba

Good URL:
https://web.zappar.com/?zid=z/1aJi1c&rs=&menu=&toolbar=?&frank=bubba

Also always check to see if the Parameter is set otherwise it will lock the experience.

2 Likes