Fixing Script Errors

Webpages, where FAQs are published, might experience errors because of following reasons:

  1. Script not detected: Loader script is not present on the page. 
  2. Tag is not found: The placeholder, meant for inserting the FAQs, is not found in the HTML DOM 
  3. Broken page: URL returning status code other than 200 OK 

When the URLs have one or more above-mentioned errors, users will see a message prompt as shown below on the FAQ Q&A page. 

The errors and their fix are mentioned below.

  1.  Fix Script issue: The FAQ Loader Script is a simple non-invasive piece of JavaScript code that is required to be embedded within a web page to help dynamically load FAQ, along with associated schema, published from Milestone FAQ Manager on that page. The script pulls in the faq.json published from FAQ Manager for that URL. 

Reasons for the script issue: 

  1.  Milestone loader script is not deployed on the URL/Website 
  2. Delay in loading the FAQ Loader Script through some container [GTM, Tealium]This delay could be due to other scripts added before the FAQ script to load. Till those scripts get executed, the FAQ script is in waiting state or in the queue. Once the other scripts are loaded, it takes 8-10 seconds to be loaded to the URL. As a result, Milestone and Googlebot is unable to find the loader script on the page during the brief duration when they crawled the page. 
  3. The web page has a Content Security Policy and has restricted all 3rd party domains. To ensure that the FAQ Loader Script is added, the web page needs to allow our domain [faq.milestoneinternet.com and faqmanager.milestoneinternet.com] to load and execute. 



How to fix FAQ Loader Script issue?

The recommended way is to use Tag Management Systems such as Google Tag Manager or add the JavaScript directly to the web page in the Header section.


Actual lines of code for the FAQ loader script:

<script type="text/javascript" id="ms_faq" src="https://faq.milestoneinternet.com/faq/msfaqloaderscript.js"></script>

How to set the Milestone FAQ loader script in Google Tag Manager
Step 1: Invoke Google Tag Manager and click on the container of your website to go to the webspace

Step 2: Click on New Tag


Step 3: Create a new Tag “MS_Faq” by

  1. Select Custom HTML and add the Milestone FAQ loader JavaScript
  2. Set trigger for Page View for selected URLs only.

Step 4: Save and you are done.


How to test if the Milestone script is loading?
Open any webpage of your website and press F12 to invoke the Developer Tools. Select the Network tab and apply a filter for ‘faq’. Refresh the page again with the Developer Tools still open. If the Milestone FAQ loader script is correctly set up, you will see three entries as seen below.

  1. Tag is not found: A DIV tag with an ID ‘ms_faqholder’ must be present on the pages so that the loader script can insert the FAQs in this designated tag. 

Reasons for the issue: 

  • DIV tag is not added on the URL/Website
  • DIV tag is added but there are syntax errors

How to fix ‘Tag is not found’ error?

Please check with the client’s technical team for the above possible reasons to resolve the error.

  1. Broken pages: This error appears when the page URL returns a header status code other than 200 OK.

How to fix the ‘Broken page’ error?

Please check with the client’s technical team to troubleshoot the error.