Troubleshooting Custom JavaScript Code Validation Errors
Resolving Script Tag Placement Issues
If you're experiencing issues with custom JavaScript code not functioning properly in your CRM, the problem may be related to how your script tags are positioned within the HTML structure.
Proper Script Tag Placement
When adding custom JavaScript to your funnel or website pages, ensure that your <script> tags are not nested inside <div> tags. The CRM's website builder requires script tags to be placed separately from div containers.
How to Fix the Issue
If your custom code currently has a <script> tag placed within a <div> tag:
- Locate the
<script>tag inside the<div>container - Cut the entire
<script>section from within the<div>tag - Paste the
<script>tag code below the closing</div>tag - Ensure both tags exist as separate elements in your code
This placement ensures that your JavaScript code will execute correctly according to the CRM's website builder requirements.