Google tag manager preview mode debug pane not working on modern pages

Copper Contributor

Hello everyone!


I tried to add the code for the Google Tag Manager in the browser's console while I was on a modern page, but unfortunately when I'm in the tag manager's preview mode, the debug pane does not open and this error pops up in the console:


goog.asserts.AssertionError {
  message: "Failure: Bad value `d8aec69a-5e9c-4c7a-ae18-1f0ba39af3bc` for 
  stack: "AssertionError: Failure: Bad value `d8aec69a-5e9c-4c7a-ae18-1f0ba39af3bc` for 
    at new goog.asserts.AssertionError (
    at (
    at$$filterCspNonceValue (
    at Object.gtm.debugui.frame.createInlineFrame_ 
    at Object.gtm.debugui.frame.init (


Adding the same script from google tag manager in a classic experience page and opening the debug pane works fine, without the assertion error occurring.


I also tried to use the SPFx extension (that seems to do pretty much the same thing) from this repository: but the same issue occurs. 


I am using SharePoint 2019 but this error pops up in SharePoint online too.


0 Replies