HubSpot
Posted: Mon Aug 19, 2019 2:27 pm
My marketing team has asked me to put tracking code into my compiled Help systems for analytics tracking.
The code is from HubSpot. But unfortunately, the code causes an error when I copy the code to my master pages, and when I try to build the Help system, the Help system does not build and I get an error.
The code they want me to add is similar to the following:
<!-- Start of HubSpot Embed Code -->
<script type="text/javascript" id="hs-script-loader" async defer src="//js.hs-scripts.com/1111111.js"></script>
<!-- End of HubSpot Embed Code -->
The error is the part of the line: async defer src="xxxx"...
The message of the error is: 'defer' is an unexpected token. The expected token is '='. Line xx, positionxx.
I understand that it is expecting: async="sss" defer="bbb" src="mmm".
Has anyone encountered this issue, and is there a solution for adding this tracking code to the master pages?
The code is from HubSpot. But unfortunately, the code causes an error when I copy the code to my master pages, and when I try to build the Help system, the Help system does not build and I get an error.
The code they want me to add is similar to the following:
<!-- Start of HubSpot Embed Code -->
<script type="text/javascript" id="hs-script-loader" async defer src="//js.hs-scripts.com/1111111.js"></script>
<!-- End of HubSpot Embed Code -->
The error is the part of the line: async defer src="xxxx"...
The message of the error is: 'defer' is an unexpected token. The expected token is '='. Line xx, positionxx.
I understand that it is expecting: async="sss" defer="bbb" src="mmm".
Has anyone encountered this issue, and is there a solution for adding this tracking code to the master pages?