Pasting gtm javascript into Code Block macro strips format

XMLWordPrintable

    • 1
    • Severity 3 - Minor

      Add other Code Block macro to Confluence page

      • insert the following javascript into the Code Block macro
      <!-- Google Tag Manager -->
      
      'https://www.googletagmanager.com/gtm.js?id='+i+dl+ '&gtm_auth=zgPRY3zxAjMqsjVhJLF6CA&gtm_preview=env-7&gtm_cookies_win=x';f.parentNode.insertBefore(j,f);
      
      <!-- End Google Tag Manager -->

      h3. Environment

      * Confluence Cloud 

      * Other Code Block macro

      h3. Steps to Reproduce

      # Create Confluence page

      # Insert Code Block macro

      # Paste the following portion of the gtm javascript into Code Block macro

       

      'https://www.googletagmanager.com/gtm.js?id='+i+dl+ '>m_auth=zgPRY3zxAjMqsjVhJLF6CA>m_preview=env-7>m_cookies_win=x';f.parentNode.insertBefore(j,f);
      

       

      Expected Results

      'https://www.googletagmanager.com/gtm.js?id='+i+dl+ '&gtm_auth=zgPRY3zxAjMqsjVhJLF6CA&gtm_preview=env-7&gtm_cookies_win=x';f.parentNode.insertBefore(j,f);
      

      Actual Results

      'https://www.googletagmanager.com/gtm.js?id='+i+dl+ '>m_auth=zgPRY3zxAjMqsjVhJLF6CA>m_preview=env-7>m_cookies_win=x';f.parentNode.insertBefore(j,f);
      

      Notes

      • So it's stripping the "&gtm and making it >m 
        'https://www.googletagmanager.com/gtm.js?id='+i+dl+ '>m_auth=zgPRY3zxAjMqsjVhJLF6CA>m_preview=env-7>m_cookies_win=x';f.parentNode.insertBefore(j,f);

        Workaround

      manually edit the script to reflect the original.

      Concern is what is being stripped

              Assignee:
              Unassigned
              Reporter:
              Greg Keefer (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: