You can use Alchemer merge codes in JavaScript actions in your survey. Our servers will replace the merge code with the corresponding value when the page is rendered. When the JavaScript code executes on the client side, the merge code will have been replaced with its value. The merge code should be enclosed by single quotes so that JavaScript treats it as a string.
Here's an example using alert()
and our merge code for the session id (a unique identifier for the survey response).
The JavaScript action:
The result for survey takers:
The survey HTML (note the merge code has been replaced with the session id for my survey response!):
Scripting and Other Custom Solutions
We’re always happy to help you debug any documented script that is used as is. That said, we do not have the resources to write scripts on demand or to debug a customized script.
If you have customization ideas that you haven't figured out how to tackle, we're happy to be a sounding board for Alchemer features and functionality ideas that might meet your needs. Beyond this, check out our Professional Services; these folks have the scripting chops to help you to achieve what you are looking for!