How to add metatags

Meta-tags empower you to tailor your website overlay survey for each recipient. If no meta-tag is provided, our web application defaults will be applied(refer to our What are meta-tags?guide for more details).

πŸ“˜

To note: meta-tag validation

When adding metatags based on score types (e.g., thank_you_note_promoter, thank_you_note_passive, thank_you_note_detractor), they will only function if the 'Customize based on score' switch is enabled in the web interface (located on the design step of the survey). To enable thank_you_link_url and thank_you_link_note, the 'Add a link' switch in the web interface must also be activated.

Here's an example of how metatags can be structured:

<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]
    },
    metatags: {
      survey_question: "How likely are you to recommend %[question subject] to a friend or colleague?",
      question_subject: "zenloop",
      request_for_comment_all: "Tell us a bit more about why you chose %[score] as a score",
      thank_you_note_all: "Thanks for your feedback!",
      thank_you_link_text_all: "example text",
      thank_you_link_url_all:  "https://www.example.com"
    }
  };
</script>

If you aim to customize based on the score the survey recipient provides (e.g., a different message for detractors vs. promoters), observe the structure of the request_for_comment metatag in the example below:(or see a full list at Implementing metatags):

<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]
    },
    metatags: {
      survey_question: "How likely are you to recommend %[question subject] to a friend or colleague?",
      question_subject: "zenloop",
      request_for_comment_promoter: "Tell us a bit more about why you chose %[score] as a score",
      request_for_comment_passive: "Tell us a bit more about why you chose %[score] as a score",
      request_for_comment_detractor: "Tell us a bit more about why you chose %[score] as a score",
      thank_you_note_all: "Thanks for your feedback!",
      thank_you_link_text_all: "example text",
      thank_you_link_url_all:  "https://www.example.com"
    }
  };
</script>