Custom JS code if for code that goes inside the <script> tag. To add this HubSpot code add a custom theme hook.
app/themes/Peafowl/custom_hooks/head.php
Code:
<?php if(!defined('access') or !access) die('This file cannot be directly accessed.'); ?>
<!-- Start of HubSpot Embed -->
<script type="text/javascript" src="//js.hs-scripts.com/2727782.js" id="LeadinEmbed-2727782" crossorigin="use-credentials" async defer></script>
<!-- End of HubSpot Embed -->