<?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: Detect whether page visitor is new or returning in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Detect-whether-page-visitor-is-new-or-returning/m-p/435391#M22953</link>
    <description>&lt;P&gt;Hi Dennis,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I may be misunderstanding Smart Content, but I thought it was based on either contact information or "anonymous" information like device type. I want to display different content based on whether a user has visited the page before, regardless of whether they are a contact. But perhaps I am missing an option or trick.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JLiles_0-1620401566705.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/42260i73F84B45E248EAA1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JLiles_0-1620401566705.png" alt="JLiles_0-1620401566705.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 07 May 2021 15:37:43 GMT</pubDate>
    <dc:creator>JLiles</dc:creator>
    <dc:date>2021-05-07T15:37:43Z</dc:date>
    <item>
      <title>Detect whether page visitor is new or returning</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Detect-whether-page-visitor-is-new-or-returning/m-p/434963#M22917</link>
      <description>&lt;P&gt;Is there a simple way to detecth whether a page visitor is new or returning in HubSpot CMS? I would like to display different content depending on whether they are new or returning, regardless of whether they have filled out a form and become a contact.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ideally, it would be a smart content option, but it doesn't look like it is supported there. Less ideally, I would like to use some combination of JavaScript and HubL to use (set, if necessary) cookies.&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 15:39:24 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Detect-whether-page-visitor-is-new-or-returning/m-p/434963#M22917</guid>
      <dc:creator>JLiles</dc:creator>
      <dc:date>2021-05-06T15:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: Detect whether page visitor is new or returning</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Detect-whether-page-visitor-is-new-or-returning/m-p/435381#M22949</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/188209"&gt;@JLiles&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How does smart content not work for this situation?&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/55480"&gt;@jonchim&lt;/a&gt; , &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/103660"&gt;@piersg&lt;/a&gt;&amp;nbsp; any thoughts here?&lt;/P&gt;</description>
      <pubDate>Fri, 07 May 2021 15:26:39 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Detect-whether-page-visitor-is-new-or-returning/m-p/435381#M22949</guid>
      <dc:creator>dennisedson</dc:creator>
      <dc:date>2021-05-07T15:26:39Z</dc:date>
    </item>
    <item>
      <title>Re: Detect whether page visitor is new or returning</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Detect-whether-page-visitor-is-new-or-returning/m-p/435390#M22952</link>
      <description>&lt;P&gt;For existing contacts, using smart content would definitely work. But I guess there's no way to determine if a visitor is a return visitor if they're not already a contact. &lt;span class="lia-unicode-emoji" title=":thinking_face:"&gt;🤔&lt;/span&gt;Not sure there's an easy solution without having to use javascript, etc. Let me see if I can find any solutions.&lt;/P&gt;</description>
      <pubDate>Fri, 07 May 2021 15:37:33 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Detect-whether-page-visitor-is-new-or-returning/m-p/435390#M22952</guid>
      <dc:creator>jonchim</dc:creator>
      <dc:date>2021-05-07T15:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: Detect whether page visitor is new or returning</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Detect-whether-page-visitor-is-new-or-returning/m-p/435391#M22953</link>
      <description>&lt;P&gt;Hi Dennis,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I may be misunderstanding Smart Content, but I thought it was based on either contact information or "anonymous" information like device type. I want to display different content based on whether a user has visited the page before, regardless of whether they are a contact. But perhaps I am missing an option or trick.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JLiles_0-1620401566705.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/42260i73F84B45E248EAA1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JLiles_0-1620401566705.png" alt="JLiles_0-1620401566705.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 May 2021 15:37:43 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Detect-whether-page-visitor-is-new-or-returning/m-p/435391#M22953</guid>
      <dc:creator>JLiles</dc:creator>
      <dc:date>2021-05-07T15:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: Detect whether page visitor is new or returning</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Detect-whether-page-visitor-is-new-or-returning/m-p/435420#M22956</link>
      <description>&lt;P&gt;I think&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/55480"&gt;@jonchim&lt;/a&gt;&amp;nbsp;is correct. Smart content will work for testing new/existing contacts but to determine if a visitor is new or returning you would have to use JS: for example, by testing if the hubspotutk cookie has been set (which is an id given to a visitor after they've accepted cookies on your site).&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;function readCookie(name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for(var i=0, len = ca.length; i &amp;lt; len; i++) {
        var c = ca[i];
        while (c.charAt(0)==' ') c = c.substring(1,c.length);
        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
    }
    return null;
}
var hutk = readCookie('hubspotutk');
if (hutk != null || hutk != undefined) {
 // do things
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 May 2021 16:11:31 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Detect-whether-page-visitor-is-new-or-returning/m-p/435420#M22956</guid>
      <dc:creator>piersg</dc:creator>
      <dc:date>2021-05-07T16:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: Detect whether page visitor is new or returning</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Detect-whether-page-visitor-is-new-or-returning/m-p/435423#M22957</link>
      <description>&lt;P&gt;Great, thank you&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/103660"&gt;@piersg&lt;/a&gt;,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/55480"&gt;@jonchim&lt;/a&gt;,&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/13982"&gt;@dennisedson&lt;/a&gt;. That is along the lines of what I was thinking, but I just wanted to make sure there wasn't a simpler solution that I was unaware of. I appreciate the prompt, respectful, and ultimately helpful assistance!&lt;/P&gt;</description>
      <pubDate>Fri, 07 May 2021 16:14:26 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Detect-whether-page-visitor-is-new-or-returning/m-p/435423#M22957</guid>
      <dc:creator>JLiles</dc:creator>
      <dc:date>2021-05-07T16:14:26Z</dc:date>
    </item>
  </channel>
</rss>

