Some of our larger projects are failing to build after we've added Google Analytics code to the topic master page - the build hangs at 'Resolving links in output files...'. Strangely, this only happens in larger (a few hundred topics) projects.
The code we've added is as follows (with the actual GA ID hidden):
Code: Select all
<script async="1" src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXX-XX">
</script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-XXXXXXX-XX');
</script>
I've tried moving the code around in the master page to no avail. The log doesn't give any clues. The fact that this works in smaller projects is leaving me mystified.
Grateful for advice.