<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Concatenating string with data element value in Adobe Experience Platform Launch Questions</title>
    <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-platform-launch/concatenating-string-with-data-element-value/m-p/378792#M1343</link>
    <description>&lt;LI-USER uid="15728544" login="sebastiane27965"&gt;&lt;/LI-USER&gt; it'll also work with DOM Ready or Window Loaded. The reason it doesn't work with Library Loaded nor page Bottom is that the browser may not have rendered the web page's DOM tree completely, so it cannot get the &amp;lt;head&amp;gt; element properly.</description>
    <pubDate>Sat, 12 Sep 2020 15:39:16 GMT</pubDate>
    <dc:creator>yuhuisg</dc:creator>
    <dc:date>2020-09-12T15:39:16Z</dc:date>
    <item>
      <title>Concatenating string with data element value</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-platform-launch/concatenating-string-with-data-element-value/m-p/378540#M1340</link>
      <description>&lt;P&gt;Hi guys, i want to load a script with dynamic values based on domain, so i have set up a data element with the different values based on document.locationHostname, it seems to work as expected and the value changes based on site domain.&lt;BR /&gt;running into some issues when trying to load the string in the HTML custom code of rule.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so this is the string, it will fail at the getVar portion of the string:&lt;BR /&gt;&lt;BR /&gt;&amp;lt;script src='https://sripturl/rc/'+(_satellite.getVar('account_string')+'/scripts/s.js' type='text/javascript'&amp;gt;&amp;lt;/script&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so what im after is a string that looks like this (given the data element value is 12345):&lt;BR /&gt;&lt;BR /&gt;&amp;lt;script src='https://sripturl/rc/12345/scripts/s.js' type='text/javascript'&amp;gt;&amp;lt;/script&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i guess theres some single double quotation issues here, or maybe its not possible to do?&amp;nbsp;&lt;BR /&gt;Any pointers appreciated!&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2020 17:34:01 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-platform-launch/concatenating-string-with-data-element-value/m-p/378540#M1340</guid>
      <dc:creator>Sebastiane_Edberg_</dc:creator>
      <dc:date>2020-09-10T17:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating string with data element value</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-platform-launch/concatenating-string-with-data-element-value/m-p/378610#M1341</link>
      <description>&lt;P&gt;There are a few problems, e.g. y&lt;SPAN&gt;ou have an opening "(" but no corresponding closing ")". But the main problem is that you're mixing HTML and JavaScript together.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I suggest using this &lt;U&gt;JavaScript&lt;/U&gt; code instead:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;var&lt;/SPAN&gt;&lt;SPAN class=""&gt; script &lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt; document&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;createElement&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;'script'&lt;/SPAN&gt;&lt;SPAN class=""&gt;);&lt;/SPAN&gt;
&lt;SPAN class=""&gt;script&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;src &lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt; '&lt;SPAN class=""&gt;http://sripturl/rc/' + _satellite.getVar('account_string') + '/scripts/s.js'&lt;/SPAN&gt;&lt;SPAN class=""&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;script.type = 'text/javascript';
document&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;getElementsByTagName&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;'head'&lt;/SPAN&gt;&lt;SPAN class=""&gt;)[&lt;/SPAN&gt;&lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN class=""&gt;].&lt;/SPAN&gt;&lt;SPAN class=""&gt;appendChild&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;script&lt;/SPAN&gt;&lt;SPAN class=""&gt;);&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;Reference:&amp;nbsp;&lt;A href="https://stackoverflow.com/a/18784960" target="_blank" rel="noopener"&gt;https://stackoverflow.com/a/18784960&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Sep 2020 03:12:17 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-platform-launch/concatenating-string-with-data-element-value/m-p/378610#M1341</guid>
      <dc:creator>yuhuisg</dc:creator>
      <dc:date>2020-09-11T03:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating string with data element value</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-platform-launch/concatenating-string-with-data-element-value/m-p/378680#M1342</link>
      <description>Hi, great, this works, one thing to note though is that it will not work with Page Bottom or Page Top event , a direct call or DOM ready event works fine</description>
      <pubDate>Fri, 11 Sep 2020 13:44:53 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-platform-launch/concatenating-string-with-data-element-value/m-p/378680#M1342</guid>
      <dc:creator>Sebastiane_Edberg_</dc:creator>
      <dc:date>2020-09-11T13:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating string with data element value</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-platform-launch/concatenating-string-with-data-element-value/m-p/378792#M1343</link>
      <description>&lt;LI-USER uid="15728544" login="sebastiane27965"&gt;&lt;/LI-USER&gt; it'll also work with DOM Ready or Window Loaded. The reason it doesn't work with Library Loaded nor page Bottom is that the browser may not have rendered the web page's DOM tree completely, so it cannot get the &amp;lt;head&amp;gt; element properly.</description>
      <pubDate>Sat, 12 Sep 2020 15:39:16 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-platform-launch/concatenating-string-with-data-element-value/m-p/378792#M1343</guid>
      <dc:creator>yuhuisg</dc:creator>
      <dc:date>2020-09-12T15:39:16Z</dc:date>
    </item>
  </channel>
</rss>

