---
title: Installation
description: >-
  The Survicacte Tracking Code needs to be installed to show surveys on your
  website. The installation is only required for website & web app surveys.
  Learn more here.
source_url:
  html: 'https://developers.survicate.com/installation/'
  md: 'https://developers.survicate.com/installation.md'
---
# Installation

The Survicacte Tracking Code needs to be installed to show surveys on your website. The installation is only required for website & web app surveys. [Learn more here](https://help.survicate.com/en/articles/3933915-getting-a-survey-appear-on-your-website-installing-and-testing-tracking-code).

### Segment

Survicate can be installed with Segment. Follow [these instructions](https://help.survicate.com/en/articles/3942525-segment-integration#installing-survicate-tracking-code-with-segment), to add Survicate as a destination in Segment.

### WordPress

Use our WordPress plugin to install Survicate on your WordPress website. Follow [these instructions](https://help.survicate.com/en/articles/3937898-installing-survicate-on-wordpress-sites) and use this workspace key during the installation.

```
{CODE}
```

### Google Tag Manager

To install Survicate using Google Tag Manager, follow [this article](https://help.survicate.com/en/articles/3937897-google-tag-manager).

### Manual installation

Place this code right before the `</body>` tag of your website. Once you've added the code to your site, you will need to wait a few minutes for Survicate to check if it is installed correctly. This usually happens the moment your site is loaded with the Survicate code on it.

```html
<!-- Start of Survicate (www.survicate.com) code -->
<script type="text/javascript">
  (function (w) {
    var s = document.createElement('script');
    s.src = 'https://survey.survicate.com/workspaces/{CODE}/web_surveys.js';
    s.async = true;
    var e = document.getElementsByTagName('script')[0];
    e.parentNode.insertBefore(s, e);
  })(window);
</script>
<!-- End of Survicate code -->
```

## Identify your respondents & pass custom data

Anytime you want to record custom user data or integrate with external tools call sva.setVisitorTraits function. This will enable you to associate respondent ID in Survicate with user ID they have in your app. Or simply to pass any additional information about your website visitors or app users. Here's a sample implementation:

```html
<script type="text/javascript">
  (function(w) {
    function setAttributes() {
      w._sva.setVisitorTraits({
        user_id: "your user ID here"
      });
    }
    if (w._sva) {
      setAttributes();
    } else {
      w.addEventListener("SurvicateReady", setAttributes);
    }
  })(window);
</script>
```
