banner



How To Find The Js Section In Huspot Design Tools

You can host and edit JavaScript files in the design manager. Learn how to create a JavaScript file and link it to a template or domain.


Create a JavaScript file

  • In your HubSpot account, navigate to Marketing > Files and Templates > Design Tools.
  • In the left sidebar menu, click File > New file. You may need to click the folder folder icon to expand the menu.
  • In the dialog box, click the What would you like to build today? dropdown menu and selectJavaScript.

design-manager-new-file-javascript
  • ClickNext.
  • In theFile namefield, enter a name for your JavaScript file.
  • To update the file's location, in the File location section, click Change and select the folder to add the file to.

design-manager-new-javascript-file

  • ClickCreate.
  • Type or paste your JavaScript into the code editor.
  • If you've enabled ESLint, you can see any JavaScript warnings or errors by clicking to toggle the Show output switch on.

    design-manager-javascript-show-output

  • In the upper right, click Publish changes to take your changes live.

Attach a JavaScript file to a template

  • In the finder on the left, click the template you want to update.
  • In the inspector on the right, click theEdit tab.
  • In theLinked JavaScript files section, click theAdd dropdown menu and select your JavaScript file.
  • In the upper right, clickPublish changes to take your changes live.

Include a JavaScript file on HubSpot pages

You can include your JavaScript file on all the pages of a HubSpot-hosted domain, or on individual pages by using the public URL.

To access the file's public URL:

  • In the left sidebar menu, select yourJavaScript file.
  • Click Actions > Copy public URL .

design-manager-add-javascript-file

To add the file to all your HubSpot pages on a domain:
  • In your HubSpot account, click the settings settings icon in the main navigation bar.
  • In the left sidebar menu, navigate to Website > Pages.
  • Click the Choose a domain to edit its settings dropdown menu and select the domain to add the JavaScript file to. You can select Default settings for all domains if you want the JavaScript file to apply to all connected domains.
  • In theSite footer HTML section, paste the public URLas the value for the script tag's source:
<!-- start Main.js Do Not Remove -->
<script src='insert your file's public URL here'></script>
<!---End Main.js-->
  • Click Save.

Or, to add the file to an individual page:

  • In your HubSpot account, navigate to Marketing > Website  > Website Pages or Landing Pages .
  • Hover over the page that you want to edit, then click Edit.
  • In the page editor, click theSettings tab.
  • ClickAdvanced options.
  • In theFooter HTML section, paste the public URL as the value for the script tag's source:
<!-- start Main.js Do Not Remove -->
<script src='insert your file's public URL here'></script>
<!---End Main.js-->
  • To publish your changes to the live page, in the upper-right, click Update.

Design Manager

How To Find The Js Section In Huspot Design Tools

Source: https://knowledge.hubspot.com/design-manager/add-a-javascript-file-to-hubspot

Posted by: escamillaexpleseeptes71.blogspot.com

0 Response to "How To Find The Js Section In Huspot Design Tools"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel