CMS Development

marquizzo
Contributor

How can I modify auto-generated "script" tags?

 

Hubspot automatically generates some scripts at the end of the page when we add the {{ standard_footer_includes }} line. Is there a way for me to modify some of the scripts it generates? I'd like to be able to add a data attribute named "data-ot-ignore":

 

 

Now:
<script data-hs-allowed="true" src="/_hcms/forms/v2.js"></script>

Desired:
<script data-hs-allowed="true" src="/_hcms/forms/v2.js" data-ot-ignore></script>

 

 

The reason we need this is that our cookie policy third-party script automatically disables the "forms/v2.js" script, thinking it's a tracker. If I could add the "data-ot-ignore" attribute, this third-party script would ignore it. How could I add this attribute?

0 Upvotes
1 Reply 1
Jaycee_Lewis
Community Manager
Community Manager

How can I modify auto-generated "script" tags?

Hi, @marquizzo 👋 Thanks for reaching out! Let's see if we can get the conversation going — hey @miljkovicmisa @mangelet @JBeatty, do you have any experience here? Thank you!  — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot