Skip to main content

JavaScript Integration

If you run your survey on your own JavaScript stack rather than on a platform like Decipher or Alchemer, there are two shapes an integration can take. They differ in where the Quality Tools run and, because of that, when you send us data.

Pick the one that matches your flow — the rest of this section follows from it.


Two ways to integrate

A — In-survey: the tools run on every page

The Quality Tools live inside the survey itself, so identity and scores are available throughout the interview. You send once early, and again at the end.

Figure A: in-survey. The tools are present for the whole interview.

B — Router or redirect: the tools run once, at entry

The respondent only passes through your page on the way to a survey. You run the tools once, get a requestId, send the first record, and redirect. The second send happens when they come back.

Figure B: router or redirect. The tools run once and you collect the rest yourself.

Which one are you?

A — In-surveyB — Router / redirect
Toolbox runsOn every page of the surveyOnce, at entry
You get scoresThroughout the interviewAt entry, then you hold them
First sendAfter the first questionBefore you redirect
Final sendEnd of the interviewWhen the respondent returns
ReadIn-SurveyRouters & Redirects

Most people integrating in JavaScript are B. If you own a router, a redirect page, or any hop that sits in front of someone else's survey, that is your path — and it is the one documented in full today.

Where you run it is your choice

Browser or server, we do not mind — as long as the key that reaches POST /data and the lookup stays on your server. The toolbox URL carries a key by design. Both paths send the same two records to the same endpoint; only the timing differs.


What both paths share

Whichever shape you use, the rest is identical: