<?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: What is the javascript property to use to unsubscribe from all emails using _hsq.push in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/What-is-the-javascript-property-to-use-to-unsubscribe-from-all/m-p/564220#M50412</link>
    <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/317653"&gt;@James-Pi-Top&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How is everyone being signed up for these marketing emails currently?&lt;/P&gt;
&lt;P&gt;There is an endpoint for subscription preferences &lt;A href="https://developers.hubspot.com/docs/api/marketing-api/subscriptions-preferences" target="_blank" rel="noopener"&gt;here&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Might also be able to enroll students in a workflow to remove from subscriptions?&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jan 2022 14:46:42 GMT</pubDate>
    <dc:creator>dennisedson</dc:creator>
    <dc:date>2022-01-27T14:46:42Z</dc:date>
    <item>
      <title>What is the javascript property to use to unsubscribe from all emails using _hsq.push</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/What-is-the-javascript-property-to-use-to-unsubscribe-from-all/m-p/562522#M50344</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;We have a website that is used both in schools and by members of the public.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently we are unintentionally signing up school pupils to marketing emails, so in order to prevent this we want to unsubscribe student accounts from marketing emails.&lt;BR /&gt;&lt;BR /&gt;this is the code we have so far&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;  _hsq.push([
    'identify',
    {
      email,
      id,
      unsubscribeFromAll: isStudent ? 'true' : 'false',
    },
  ]);

  _hsq.push(['trackEvent', { id: 'login', email }])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but this does not work.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Can you let me know what the correct way to do this is?&lt;BR /&gt;&lt;BR /&gt;Many Thanks&lt;BR /&gt;&lt;BR /&gt;James Smith&lt;BR /&gt;pi-top.com&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 12:35:05 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/What-is-the-javascript-property-to-use-to-unsubscribe-from-all/m-p/562522#M50344</guid>
      <dc:creator>James-Pi-Top</dc:creator>
      <dc:date>2022-01-25T12:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: What is the javascript property to use to unsubscribe from all emails using _hsq.push</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/What-is-the-javascript-property-to-use-to-unsubscribe-from-all/m-p/564220#M50412</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/317653"&gt;@James-Pi-Top&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How is everyone being signed up for these marketing emails currently?&lt;/P&gt;
&lt;P&gt;There is an endpoint for subscription preferences &lt;A href="https://developers.hubspot.com/docs/api/marketing-api/subscriptions-preferences" target="_blank" rel="noopener"&gt;here&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Might also be able to enroll students in a workflow to remove from subscriptions?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 14:46:42 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/What-is-the-javascript-property-to-use-to-unsubscribe-from-all/m-p/564220#M50412</guid>
      <dc:creator>dennisedson</dc:creator>
      <dc:date>2022-01-27T14:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: What is the javascript property to use to unsubscribe from all emails using _hsq.push</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/What-is-the-javascript-property-to-use-to-unsubscribe-from-all/m-p/635455#M53348</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/317653"&gt;@James-Pi-Top&lt;/a&gt;&amp;nbsp;have you considered using a workflow on a custom property named 'isStudent' ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also,&amp;nbsp;make sure you can update contact properties using the tracking code AP: &lt;A href="https://knowledge.hubspot.com/account/prevent-contact-properties-update-through-tracking-code-api" target="_blank"&gt;https://knowledge.hubspot.com/account/prevent-contact-properties-update-through-tracking-code-api&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 07:47:49 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/What-is-the-javascript-property-to-use-to-unsubscribe-from-all/m-p/635455#M53348</guid>
      <dc:creator>mangelet</dc:creator>
      <dc:date>2022-05-19T07:47:49Z</dc:date>
    </item>
  </channel>
</rss>

