2 Replies Latest reply on Jan 9, 2019 3:18 PM by codeWrangler

    Data lookup based on GUID?

    Jeroen Beelen

      Hi,

      Hope you can help me. I would like to personalize a page, by for example showing a message like "Hi Jeroen, welcome back".

      I read a lot of articles on Topliners, but I can't figure it out.

      I have placed the code below on a webpage and it works, but only with the first name hard coded, which is of course not what I want.

      Can I do a data lookup based on the GUID form the cookie? And how should I adapt the code to do so?

      Many Thanks,

       

      Jeroen

       

      <script type="text/javascript">

      function CreateRow(label, value) {

      var p = document.createElement('p');

      var b = document.createElement('b');

      p.appendChild(b);

      b.appendChild(document.createTextNode(label));

      p.appendChild(document.createTextNode(value));

      document.getElementById('contactinfo').appendChild(p);

      }

      function SetElqContent() {

      CreateRow('Contact Info: ', GetElqContentPersonalizationValue

      (''));

      CreateRow('First Name: ', GetElqContentPersonalizationValue('C_FirstName'));

      }

       

      _elqQ.push(['elqDataLookup', escape('XYZ'),'<C_FirstName>Jeroen</C_FirstName>']);</script>

       

      <div id="contactinfo"></div>