Previewing Target.Data in a delivery | Community
Skip to main content
Level 2
November 24, 2021
Solved

Previewing Target.Data in a delivery

  • November 24, 2021
  • 2 replies
  • 1149 views

Hi,

 

Very basic example, but i am trying to add in conditional personalisation using target data. I've created a segment code based on value (H,M,L).

 

I've then inserted the following into my HTML but can't preview for customers who are targeted (e.g. recipient segment code = 'H', nothing shows in preview).

 

<%if ( targetData.segmentCode == 'H' ) { %>20%<%

 

I've done this before but totally forgot how so hoping this will be a quick fix!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by david--garcia
<% if (targetData.segmentCode =='H' ) { %> 20% <% } else  if (targetData.segmentCode =='M' ) { %> 30% <% } else if (targetData.segmentCode =='L' ) { %> 40% <%}%>

If you want to preview, choose a seed, then add segmentCode to seed's additional data

 

 

 

2 replies

ChrisA93Author
Level 2
November 24, 2021

Just to be clear this is in the delivery preview where I can't see the targeted content by segment code.

david--garcia
david--garciaAccepted solution
Level 10
November 26, 2021
<% if (targetData.segmentCode =='H' ) { %> 20% <% } else  if (targetData.segmentCode =='M' ) { %> 30% <% } else if (targetData.segmentCode =='L' ) { %> 40% <%}%>

If you want to preview, choose a seed, then add segmentCode to seed's additional data