✔ GTM Code to Website
Completed by Chris Z.
- Assigned to
-
Isaac K.
- Notes
-
Isaac can you please add the code back.
- somehow this code got removed. Is their any software we can use to alert us when this happens
Shane
Head
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-WJDD39M');</script>
<!-- End Google Tag Manager -->
Footer
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WJDD39M"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
Isaac, here's a video I made. Perhaps you can show me in your own video how you got around this so we do not have to bother you for trivial things like these in the future.
Thanks
somehow this code got removed. - Not sure but I think it got removed as client has switched the theme. Earlier I recall site running on Avada Child and now it's running on "Hello elementor".
https://wpengine.com/support/php-editor-errors-wordpress-4-9-higher/
Also I would recommend not to ever use theme editor while editing PHP files. In the latest versions of WP it auto recognizes the basic synatax errors and reverts back but if you make any error which is not defined in the wp core files or if some client website is still running on the old version of WP. Site will go down and you wouldn't be able to revert the change from wp-dashboard. So best practice is to use SFTP or cPanel to make edits in theme source files.
Isaac, you may be right about why the code was removed since I remember the other theme.
BTW, thanks for the explanation on the error and the other information on the SFTP or cPanel instructions.
GTM and G analytics code are now verified.
Thanks Isaac!
Confirming we're all good here and you guys don't need any action from me?
can you please mark this DONE!
Thanks.