Added a template to be used to inject the document.domain script in any place in the code (currently to be used in the connectors, #1919).