- This topic has 9 replies, 2 voices, and was last updated 2 years, 11 months ago by
David.
-
AuthorPosts
-
February 18, 2020 at 4:08 am #1168937
Manuel
The menu in frontend disappears after inserting the Google Tag Manager code as mentioned here: https://docs.generatepress.com/article/implement-google-tag-manager/
Tried as element with hooks and also as PHP with the Snippet plugin. Same result.
Deactivating all plugins also didn’t work.How can we solve this?
February 18, 2020 at 4:40 am #1168964David
StaffCustomer SupportHi there,
can you clear and disable your cache plugin – let me know so i can take a closer look
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/February 18, 2020 at 4:47 am #1168975Manuel
Hi David,
the cache is cleared and the plugin deactivated.Best regards,
ManuelFebruary 18, 2020 at 4:55 am #1168981David
StaffCustomer SupportI think our documents have been updated incorrectly.
The first script you have the
wp_body_open
hook. Change this toWP_Head
The second script change the hook to
wp_body_open
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/February 18, 2020 at 5:41 am #1169017Manuel
Hi David,
unfortunately this didn’t solve the issue.February 18, 2020 at 6:54 am #1169218David
StaffCustomer SupportDo you have a plugin adding the GTM as well ? As i can see scripts twice.
If so can you remove that and then can you paste the code you have added to the two hooks here.
Please highlight the code and hit the the code button before submitting.Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/February 19, 2020 at 12:34 am #1169974Manuel
Hook: wp_head, entire site
<!-- 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-XXXXXX');</script> <!-- End Google Tag Manager —>
Hook: wp_body_open, entire site, priority 0
<!-- Google Tag Manager (noscript) --> <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXXXX" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <!-- End Google Tag Manager (noscript) —>
February 19, 2020 at 3:56 am #1170114David
StaffCustomer SupportAah – see this:
<!-- End Google Tag Manager —>
replace with:
<!-- End Google Tag Manager -—>
And this:
<!-- End Google Tag Manager (noscript) —>
replace with:
<!-- End Google Tag Manager (noscript) -—>
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/February 19, 2020 at 5:06 am #1170160Manuel
Hi David,
sorry for the inconvenience! You were right. There were not the right –> after the line. These two are the correct ones:<!-- End Google Tag Manager -->
<!-- End Google Tag Manager (noscript) -->
February 19, 2020 at 5:49 am #1170211David
StaffCustomer SupportYou’re welcome – not an inconvenience at all as it helped us correct an error in our documentation.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.