Configuration
The _sva
object allows you to pre-configure the behavior of the Survicate script, by attaching an additional configuration code before the regular tracking code.
Respondent identification & custom attributes
You can pass custom respondent attributes from your website or application. We’ve reserved some attributes that we handle in a special way. For example, we expect email to be a string of the user’s email address.
(function(opts) {
opts.traits = {
"email": "Respondent's email",
"first_name": "Respondent's name",
"last_name": "Respondent's last name",
"my_custom_attribute": "Custom attribute value"
};
})(window._sva = window._sva || {});
Reserved attributes we’ve standardized:
- first_name
- last_name
- organization
- department
- job_title
- phone
- website
- country
- address_one
- address_two
- city
- state
- zip
- fax
- annual_revenue
- employees
Disabling automatic targeting
The visitors targeting script is run automatically every time there is a need to verify if a visitor matches the targeting configuration. We understand that for some users this isn’t the desired behavior, e.g. custom targeting using the _sva.showSurvey method. If you wish to disable this feature, you can use the disableTargeting
property.
(function(opts) {
opts.disableTargeting = true;
})(window._sva = window._sva || {});