<?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: replace forward slash with colon in Adobe Analytics Questions</title>
    <link>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-questions/replace-forward-slash-with-colon/m-p/459193#M38075</link>
    <description>&lt;P&gt;Thank you!! Very helpful &lt;img class="lia-deferred-image lia-image-emoji" src="https://experienceleaguecommunities.adobe.com/html/@31B4D6D7B3510763F3CBB2AAB7997408/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 01 Jul 2022 19:42:01 GMT</pubDate>
    <dc:creator>asheth2295</dc:creator>
    <dc:date>2022-07-01T19:42:01Z</dc:date>
    <item>
      <title>replace forward slash with colon</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-questions/replace-forward-slash-with-colon/m-p/455698#M37719</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am capturing the url as pageName and reading the pageName from the url&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.Current url is&amp;nbsp;&lt;A href="https://www.xyz.com/abc/def/" target="_blank"&gt;https://www.xyz.com/abc/def/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expected pageName = xyz:abc:def&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What data element custom code should I write to get to the expected pageName? I want to replace forward slashes with colon. I am already using "window. location.href"&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 14:30:10 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-questions/replace-forward-slash-with-colon/m-p/455698#M37719</guid>
      <dc:creator>asheth2295</dc:creator>
      <dc:date>2022-06-10T14:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: replace forward slash with colon</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-questions/replace-forward-slash-with-colon/m-p/455724#M37720</link>
      <description>&lt;P&gt;I would use multiple "replace" functions:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;var url = window.location.href;

// removes the https://www. and .com in the url&amp;nbsp;
url = url.replace("https://www.", "").replace(".com","");

// replaces all / with :, and removes the last instance of : at the end of the string
var pageName = url.replace(/\//g, ":").replace(/:$/g, "");&amp;nbsp;

return pageName;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Other people may debate about using Regex Replace, but the it's still better than looping through the entire string and replacing each instance....&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 16:42:58 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-questions/replace-forward-slash-with-colon/m-p/455724#M37720</guid>
      <dc:creator>Jennifer_Dungan</dc:creator>
      <dc:date>2022-06-10T16:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: replace forward slash with colon</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-questions/replace-forward-slash-with-colon/m-p/459193#M38075</link>
      <description>&lt;P&gt;Thank you!! Very helpful &lt;img class="lia-deferred-image lia-image-emoji" src="https://experienceleaguecommunities.adobe.com/html/@31B4D6D7B3510763F3CBB2AAB7997408/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2022 19:42:01 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-questions/replace-forward-slash-with-colon/m-p/459193#M38075</guid>
      <dc:creator>asheth2295</dc:creator>
      <dc:date>2022-07-01T19:42:01Z</dc:date>
    </item>
  </channel>
</rss>

