<?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 Deprecating `previousCategories` in the Cookie Banner API in Developer Announcements</title>
    <link>https://community.hubspot.com/t5/Developer-Announcements/Deprecating-previousCategories-in-the-Cookie-Banner-API/m-p/772417#M428</link>
    <description>&lt;P data-unlink="true"&gt;&lt;A href="https://developers.hubspot.com/changelog/deprecating-previouscategories-in-cookie-banner-api" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;The original&amp;nbsp;&lt;/SPAN&gt;Developer Changelog announcement&lt;/A&gt;&amp;nbsp;&lt;SPAN&gt;. The article content is copied from that post below for convenience. If you have questions or comments you can leave them below.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;
&lt;P&gt;We've discovered that in some situations the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;previousCategories&lt;/CODE&gt;&amp;nbsp;field within the cookie banner's consent object has incorrect values.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.hubspot.com/docs/api/events/cookie-banner" target="_blank"&gt;The Cookie Banner API&lt;/A&gt;&amp;nbsp;provides consent listeners so that developers can properly handle cookies based on the user's consent, represented by the consent object. The&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;previousCategories&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;field was intended to store the previous state of the user's consent preferences. This was used so that if a user submitted preferences to the cookie banner, but later re-opened the cookie banner within the same page visit and changed preferences, then&amp;nbsp;a developer could properly handle the differences.&lt;/P&gt;
&lt;DIV class="hs-embed-wrapper"&gt;
&lt;DIV class="hs-embed-content-wrapper"&gt;
&lt;SECTION class="code-block"&gt;
&lt;DIV class="code-snippet"&gt;
&lt;DIV class="code-toolbar"&gt;&lt;LI-CODE lang="js"&gt;{
  allowed: true or false,
  categories: {
    necessary: true,
    analytics: true or false,
    advertisement: true or false,
    functionality: true or false,
  },
  previousCategories: {
    necessary: true,
    analytics: true or false, # defaults to false
    advertisement: true or false, # defaults to false 
    functionality: true or false, # defaults to false
  },
}&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/SECTION&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;SPAN&gt;A&lt;/SPAN&gt;fter further investigation, we've determined there is no way to properly support this field. To prevent confusion and simplify the experience, we will be deprecating the field on&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Monday, April 3rd&lt;/STRONG&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;On&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Monday, April 3rd&lt;/STRONG&gt;&amp;nbsp;we'll be releasing an update to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;previousCategories&lt;/CODE&gt;&amp;nbsp;which will always imply consent has changed. This should ensure that event listeners will always react the same way to negative consent, fix issues where&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;previousCategories&lt;/CODE&gt;&amp;nbsp;contained incorrect values.&lt;/P&gt;
&lt;P&gt;For the majority of sites, we expect no issues and it is more likely that this will actually fix bugs in consent listeners ensuring the user's change in consent is properly respected.&lt;/P&gt;
&lt;P&gt;If you've written custom code for handling this change in users consent, you may want to review it just to ensure that if a change from the previous state is always implied - your code will continue to operate how you expect. As noted previously, in most situations, this should fix issues rather than create new ones.&lt;/P&gt;</description>
    <pubDate>Wed, 22 Mar 2023 14:17:38 GMT</pubDate>
    <dc:creator>jmclaren</dc:creator>
    <dc:date>2023-03-22T14:17:38Z</dc:date>
    <item>
      <title>Deprecating `previousCategories` in the Cookie Banner API</title>
      <link>https://community.hubspot.com/t5/Developer-Announcements/Deprecating-previousCategories-in-the-Cookie-Banner-API/m-p/772417#M428</link>
      <description>&lt;P data-unlink="true"&gt;&lt;A href="https://developers.hubspot.com/changelog/deprecating-previouscategories-in-cookie-banner-api" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;The original&amp;nbsp;&lt;/SPAN&gt;Developer Changelog announcement&lt;/A&gt;&amp;nbsp;&lt;SPAN&gt;. The article content is copied from that post below for convenience. If you have questions or comments you can leave them below.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;
&lt;P&gt;We've discovered that in some situations the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;previousCategories&lt;/CODE&gt;&amp;nbsp;field within the cookie banner's consent object has incorrect values.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.hubspot.com/docs/api/events/cookie-banner" target="_blank"&gt;The Cookie Banner API&lt;/A&gt;&amp;nbsp;provides consent listeners so that developers can properly handle cookies based on the user's consent, represented by the consent object. The&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;previousCategories&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;field was intended to store the previous state of the user's consent preferences. This was used so that if a user submitted preferences to the cookie banner, but later re-opened the cookie banner within the same page visit and changed preferences, then&amp;nbsp;a developer could properly handle the differences.&lt;/P&gt;
&lt;DIV class="hs-embed-wrapper"&gt;
&lt;DIV class="hs-embed-content-wrapper"&gt;
&lt;SECTION class="code-block"&gt;
&lt;DIV class="code-snippet"&gt;
&lt;DIV class="code-toolbar"&gt;&lt;LI-CODE lang="js"&gt;{
  allowed: true or false,
  categories: {
    necessary: true,
    analytics: true or false,
    advertisement: true or false,
    functionality: true or false,
  },
  previousCategories: {
    necessary: true,
    analytics: true or false, # defaults to false
    advertisement: true or false, # defaults to false 
    functionality: true or false, # defaults to false
  },
}&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/SECTION&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;SPAN&gt;A&lt;/SPAN&gt;fter further investigation, we've determined there is no way to properly support this field. To prevent confusion and simplify the experience, we will be deprecating the field on&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Monday, April 3rd&lt;/STRONG&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;On&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Monday, April 3rd&lt;/STRONG&gt;&amp;nbsp;we'll be releasing an update to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;previousCategories&lt;/CODE&gt;&amp;nbsp;which will always imply consent has changed. This should ensure that event listeners will always react the same way to negative consent, fix issues where&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;previousCategories&lt;/CODE&gt;&amp;nbsp;contained incorrect values.&lt;/P&gt;
&lt;P&gt;For the majority of sites, we expect no issues and it is more likely that this will actually fix bugs in consent listeners ensuring the user's change in consent is properly respected.&lt;/P&gt;
&lt;P&gt;If you've written custom code for handling this change in users consent, you may want to review it just to ensure that if a change from the previous state is always implied - your code will continue to operate how you expect. As noted previously, in most situations, this should fix issues rather than create new ones.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2023 14:17:38 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Developer-Announcements/Deprecating-previousCategories-in-the-Cookie-Banner-API/m-p/772417#M428</guid>
      <dc:creator>jmclaren</dc:creator>
      <dc:date>2023-03-22T14:17:38Z</dc:date>
    </item>
  </channel>
</rss>

