Embedding the Unsubscribe Page

Veeva provides a standard, out-of-the-box unsubscribe page that references the HTML of the respective Veeva messages. Optionally, content creators can embed the standard unsubscribe page onto any externally hosted page, enabling greater control of branding and recipient experience.

For example, the content creator for Verteo BioPharma creates an externally hosted page that email recipients can use to unsubscribe from Approved Emails. They add the Veeva-provided HTML code to the site, which embeds the Approved Email unsubscribe page into the page.

Embedding Unsubscribe Page in a Web Page

To embed the unsubscribe page in an externally hosted page, add the following HTML snippet to the appropriate page:

Copy
<div align="center" id="unsubscribe"> </div>
 
<!-- The iFrame and Unsubscribe Page replace the above <div> tag. Note that the id of the <div> matches the first parameter of the constructor. -->
<script>
  var tag = document.createElement('script');
  tag.src = "//cdnmc1.vod309.com/multichannel/veeva/js/unsubscribe/embed-unsubscribe.js";
  var firstScriptTag = document.getElementsByTagName('script')[0];
  firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
  // This function creates an <iframe> (and unsubscribe iframe viewer) after the API code downloads.
  var unsubscribe;
  function onUnsubscribeAPIReady() {
    unsubscribe = new UN.Frame('unsubscribe', {height: '600px',width: '80%',});
  }
</script>

The embedded unsubscribe snippet creates an iFrame whose size can be defined in pixels using the height and width parameters.

Linking to an Embedded Unsubscribe Page

Content creators can reference an externally hosted unsubscribe page using the following token:

{{unsubscribe_product_link[External URL,Value of the appropriate Unsubscribe_Identifier_vod Field]}}

For example, to embed a URL that unsubscribes recipients from a product corresponding to an Unsubscribe_vod record with an Unsubscribe_Identifier_vod field of 101, the token would be:

{{unsubscribe_product_link[https://www.example.unsubscribe.com,101]}}

For more information, see Configurable Unsubscribe.