In your HubSpot Marketing Hub Basic, Professional, or Enterprise account, navigate to Marketing > Files and Templates > Design Tools.
Create a new file by clicking Actions > New file in the left sidebar menu (you may need to click the folder icon folder to expand the menu) or click Create a new file in the upper right-hand corner (this button appears if you don't have any tabs open in your design manager).
While scripts can be added to your entire site or a single page, it is recommended that scripts are added to the <head> or
To access the head tag of a template layout, open the template in your design manager. In the right sidebar menu under the Edit tab, add the following to the Additional <head> markup field:
Alternatively, you can add the same code to a custom HTML module in your template's global footer. In your global footer, click the custom HTML footer module. In the right sidebar menu under the Edit tab, click Edit HubL source. Edit the code and then publish your changes.
To include your file on all HubSpot-hosted pages, click your photo or avatar in the upper right-hand corner of your HubSpot account and click Settings. In the left sidebar menu, click Marketing > Web pages. Under the Page Templates tab, scroll down to the Site footer HTML section and paste the generated HubL token as the value for the script tag’s source, as seen below:
<!-- start Main.js Do Not Remove -->
<script src='insert your generated token here'></script>