Adding recipients (incl. properties)

How to add recipients and additional information through properties.

zenloop allows you to add identity and properties to identify, personalize and track each answer; we refer to this data as a recipientobject.

An identity is unique information that allows you to track each recipient. It is important to keep in mind that identity and identity_type are both required fields, to which you can add further data points such as first_name and last_name. To note:identity_type is a field that specifies the type of recipient identity, it can be either set asemail or custom.

On top of the main information within the recipient object, you can further enhance it with additional information within what we call:properties, which can relate to any other piece of information or data you would like to attach to the recipient, the result of which will allow you to better respond to and segment your answers.

Recipient identity and properties should take the following format and be added to the custom snippet:

<script>
  var Zenloop = window.Zenloop || {};
  Zenloop.recipient = {
    identity: '[email protected]',
    identity_type: 'email',
    first_name: 'John',
    last_name: 'Doe',
    properties: {
		color: ['red', 'blue'],
      	height: [100, 200, 300]
    }
  };
</script>

<script id="zl-website-overlay-loader" async src="https://website-overlay.zenloop.com/loader/zenloop.load.min.js?survey={survey-id}">
</script>	

<script>
  var Zenloop = window.Zenloop || {};
  Zenloop.recipient = {
    identity: '1234',
    identity_type: 'custom',
    first_name: 'John',
    last_name: 'Doe',
    properties: {
      color: 'red',
      height: 100,
			system: 'Test System'
    }
  };
</script>
<script id="zl-website-overlay-loader" async src="https://website-overlay.zenloop.com/loader/zenloop.load.min.js?survey={survey-id}">
</script>	

🚧

Important :exclamation:

It is very important to keep in mind the following rules for the survey to properly work:

  • identity & identity_type are required fields to be present in the script.
  • the recipient object has to be placed before the survey script otherwise the survey won't be executed correctly
  • any further customization scripts such as an additional footer, or pop-up, should be placed after both the recipient & survey script

πŸ“˜

Useful :bulb:

Values should be dynamically injected depending on backend you are using.

πŸ“˜

Further information :information-source:

See here for more details on properties best practices.


If you have more questions or need further assistance please reach out to support@zenloop and our team will be happy to help you! :email: