Identify unique visitor redirected from Qualtrics - uniqueidentifier

I'm trying to redirect respondents within a survey in Qualtrics to a webpage. On this webpage, they need to choose between a couple of options, and after it return to Qualtrics.
I know it is possible to generate an unique URL within qualtrics (e.g. example.com/test?UniqueID=999). However, how can I 'catch' this parameter together with the participant's response?
Thank you!

To "catch" a parameter in Qualtrics, you need to create an embedded data block in your survey flow and then create an embedded data field within that block with the same name (case-sensitive!) as the parameter. Instructions are available in the Qualtrics documentation here.
Please note that if you want to ensure that the parameter will be recorded for all responses, you should place the embedded data block first in your survey flow. (If it's placed after the question block(s), it will only be recorded for respondents who complete all the questions.)

Related

How do I initiate a dynamic user prompt depending on an API response in Bot Composer?

I have an API response in which a field gives me an array of objects. I want to prompt the user to select which one of these objects in the array they want to see the details of. For example, if the API response has a field like:
"field":[
{"number":"101","name":"abc","value":"final output 1"},
{"number":"102","name":"xyz","value":"final output 2"}
]
I want the prompt/card to ask which number and name the user wants to choose, accordingly I want to show the corresponding value to the user. The number of objects in the array can vary. I would prefer if this prompt is in the form of an adaptive card like the one in the attached image, but any solution would do using bot composer's capabilities.
One viable solution would be to build a card in code. You can parse the response from the API and use it to create a card which can then be sent by the bot. Since this is Composer, you can look into creating a custom action to hold this logic.
As the user AP01 has said, one good solution to this problem is to do it inside the code. You can create a custom component that will execute C#(or nodejs if you use that) code in which you can then easily deserialize/parse/process that json array and create a custom card that will then be display to the user. That is how I did it.

How can I use a single url parameter for multiple queries in google data studio?

I'm using Google Data Studio to visualize results from various queries (from different tables within the same BigQuery-database).
For this reason, I created and use multiple data-sources-connectors. Each one of them has a SQL query included and makes use of an defined input parameter (which can be changed by report editors) - called "userid". It is the same id for all queries and resulting charts.
However, when I click "Manage URL parameters", I'm not allowed to use the same URL parameter for more than one data source (instead they are called ds0, ds1, ds2 etc - although they all end up being used as "userid").
If I add a data source under File - Report Settings, a new field "userid" appears, which I can alter - this will update ALL charts in the report with the very same userid (as expected). This works, but I do want to make use of an url which delivers an report with all updated queries depending on ONE userid.
Therefore, I guess I'm overseeing something - it should be possible to just use one query parameter to update the same "userid" for all queries in all data connectors? Or have I overlooked the possibility to fire multiple queries within one data source connector? Or is it expected to create a looong url full of redundant query parameters in this case?
I'm curious for your input!
Best regards :)
There does not seem to be any good solution for this.
For now the best workaround seems to be to just repeat the parameter multiple times -- it's ugly but it works. For example, use the URL parameter mapping screen to call the parameter u1, u2, etc., and then just pass all of them:
?params={"u1":"foo","u2":"foo"}
(URL encoded of course)
The ugliness is mostly for us developers: it violates our sense of DRY and clean code, and makes the URL much longer than it needs to be. However, most people don't care or know about the URL parameters so its irrelevant to them.
The bigger downside is that when the URL is distributed to clients (bookmarks, mobile apps), every time new data sources are added that require the same URL parameters, a new URL has to be distributed to clients for no good reason. A workaround for this is to build the URL dynamically via a simple redirector function.
This issue https://issuetracker.google.com/issues/180705297 is a feature request to implement this capability.
If you group the elements that you want to control with the same parameter (select and then shift G) then it will give you options to select the data source and the params box to apply to the group.

What code should I add (and where) on my website to track events/identify users on my website using segment.com?

I want to configure segment.com properly on my site and use it to manage all other apps/tools. I already installed the segment javascript on my site and used it as the source. Now, I am pushing these to MixPanel, Facebook, Google Analytics, etc.
What code should I add if I want to track an event and/or identify a user?
For simplicity's sake, i have a landing page (site.com/landing-page) with a form. After a successful submission, it redirects to a thank you page (site.com/thank-you-page).
The default settings already track the page views, and are pushing that same event to the different tools (FB: PageView, MixPanel: Loaded a Page, etc).
But in this case, i want to track the event and capture the person's information. And i don't know what to code to add and where.
My research so far
According to this article:
The best way to track new users is in client-side javascript on the welcome page after they signup, below we’ll explain why.
So, based on that, I add the code to my thank you page. But where? Header like adding GA scripts? body tag? I can add it anywhere, but i don't know where.
Next is what code should I add?
The example from the same article above:
When a new visitor goes to their site that visitor is anonymous. As soon as the visitor connects their Facebook account, Rdio knows who they are and creates a user record.
As part of that new user record the person is assigned a userId. Let’s say the new userId is 12345. Rdio will then need to fire the following calls on the welcome page:
analytics.identify('12345',{ name:'Jake Peterson', email:'friends#segment.com'});
analytics.track('Account Created',{ authentication:'Facebook'})
This gives me two problems: track and identify.
Track Problem
I'll start with the track. Based on how I understood this, assuming the event name i want to be added is "Downloaded PDF" then I want to store the title of it as well. It should look like this, right?
<script>
analytics.track('Downloaded PDF', {
title: 'Awesome Title'
});
</script>
Am I correct to enclose them inside <script> tags?
The tracking of an event seems a bit easier to understand that the identify part. But would love to know if i got that part right.
Identify Problem
Here, i have two questions:
where does userId come from? Is it automatically generated? For example, inside my MixPanel account, i see them. Is that what i use?
How do i reference to the userId? or any of the other traits I want to track in my code?
Taking from the same example above:
analytics.identify('12345',{ name:'Jake Peterson', email:'friends#segment.com'});
If i add this exact code on my thank you page, every signup will be assigned those values: '12345', 'Jake Peterson', and 'friends#segment.com', right?
What code should I add to (1) assign them the right userId (2) and get the name and email traits from the form of the previous page.
Let's say i'm only collecting first name and email.
analytics.identify("userId"{ firstName:"firstName", email:"email"});
If I add this code to my thank you page, will it automatically assign the userId, firstName, email values of the form that was submitted? That's the part I don't understand. What code to add to dynamically push the correct data.
And i know i'm not even adding the Alias part for MixPanel yet, but i just want to understand this part and the rest (hopefully) will be easier to understand.

Mturk External Survey Code

I am trying to link up Mturk to my external Website
I am using the external survey Hit on the GUI requester page
I know that I need to generate the code myself, but I do not know how the code is validated.
In what form or fashion do I, or the Amazon site validate this code? and how do I implement this.
For example: A person gets a code from my website, and pastes it into the box of their amazon hit on the amazon website. Who is that code validated by? and if amazon how to I tell them which codes have been generated?
Thanks in advance!
You would do it yourself. you will find the code that the worker enters on the HIT page in your results file. Than you compare the results file with the list of codes you generated, and approve the correct codes.
A method is described on my blog which is ideal for surveys with lots of participants. Basically, you export the data from both your survey and Mechanical Turk, then you put the code columns side-by-side for comparison, and then you use a formula that takes each row of one column of codes and performs a lookup in the other column of codes. For example, you could use a COUNTIF formula in Excel, which returns a 1 if there is a single match, and a 0 otherwise.

Spring MVC AbstractWizardFormController Question

I am using a controller implementation that is extending the Spring MVC
AbstractWizardFormController
This wizard controller will consist of 4 pages. The first 2 pages are used to collect information. The third page will show results based on what information is submitted on page 1 and 2.
So to be a little more specific
Page 1 the user will select a state and some other information
Page 2 the user will enter more information such as contact information
Page 3 will display information dependent on the information collected in first two pages
There is more pages after this, but they do not pertain, so if the first think you are thinking of is using onSubmit(), then it wont work because it is not the end of the controller life.
I need to collect all the data from the first two pages, and then run a db query and return it to the third page. where and how is the best way to do this, do I run the query in reference data when returning to the third page?
You can use postProcessPage method. Its API is clear
Post-process the given page after binding and validation, potentially updating its command object. The passed-in request might contain special parameters sent by the page.

Resources