Event Tracking code appears as raw text, but is nowhere in source code
-
Hi all,
Strange issue. Some event tracking code is appearing as raw text at the bottom of all pages (https://prntscr.com/how5b3), but the code can’t be found anywhere in the files or database. The hosting company believe the text is hidden somewhere in the site code, but in obfuscated form. They also believe it is caused by Contact Form 7.
Theme: HyperX
Plugin: Contact Form 7Background: After adding the Tag Manager code snippets to the header and body sections of the header.php file, I mistakenly added the Event Tracking code (ref: https://contactform7.com/tracking-form-submissions-with-google-analytics/) to the theme’s Custom JS section, without the <script> and </script> tags (as suggested by the theme https://prntscr.com/how4hb). This is when the raw text started to appear below the footer on all pages. I removed the code from the theme’s Custom JS section, but the text remained on the website. Flushing the server cache didn’t help. Removing CF7 plugin didn’t help either.
The only way to remove the erroneous code is to remove the Google Tag Manager from the header.php file (head), but the issue returns when the GTM code is returned. The GTM code is required for the Adwords campaign.
Any help or advice is greatly appreciated. Thanks.
The page I need help with: [log in to see the link]
- The topic ‘Event Tracking code appears as raw text, but is nowhere in source code’ is closed to new replies.