-
AuthorPosts
-
October 28, 2016 at 9:30 am #1234801
Hi
I run the domain https://egdent.dk
We want to use Google Tag Manager and have struggled with it for some days now.
Google Tag Manager has 2 tags/snippets. One needs to go in the head section, the other one needs to go in the body section.I have tried a lot of different solutions but the result is the same every time. The result is that the tag in the budy section works fine no mather what solution I choose to go with. The tag in the head section is never shown.
I have tried to use the plugin “Header and Footer Scripts”.
I have tried to use the plugin “Google Tag Manager for WordPress”
I have tried to go to my child theme functions.php and insert the code.
I have tried to go to my child theme _header.php and insert the code.I really do not understand, why this is not working.
Hope to hear from you with some help soon.Best regards
October 28, 2016 at 3:36 pm #1235232Hi there,
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
October 31, 2016 at 4:05 am #1237559This reply has been marked as private.October 31, 2016 at 4:44 am #1237608Hello There,
1.) Unfortunately, we’re not using email address here. Please create one for us and just disable after we’re done checking.
2.) Did you forgot FTP password?
Can you give us the code you have added that is not working?October 31, 2016 at 5:43 am #1237664This reply has been marked as private.October 31, 2016 at 5:44 am #1237665This reply has been marked as private.October 31, 2016 at 6:19 am #1237692Hi there,
Please provide us with FTP account username as well.
For the time being please add following code in child theme’s functions.php file :function google-tag-manager_code() { ?> <script> // google-tag-manager. </script> <?php } add_action( 'wp_head', 'google-tag-manager_code' );
Hope it helps.
October 31, 2016 at 6:45 am #1237722This reply has been marked as private.October 31, 2016 at 7:19 am #1237752Hi,
Login provided doesn’t seem to work.
Kindly check again and let us know.
Thanks
October 31, 2016 at 7:30 am #1237764This reply has been marked as private.October 31, 2016 at 8:20 am #1237795Please use the code
function google_tag_manager_code() { ?> <script> // google-tag-manager. </script> <?php } add_action( 'wp_head', 'google_tag_manager_code' );
Thanks.
October 31, 2016 at 8:34 am #1237809This reply has been marked as private.October 31, 2016 at 9:09 am #1237856It did not crash because the code is correct. Previously, it has a syntax error.
Did you replace
<script> // google-tag-manager. </script>
with your own code? Also, I see your HTML is minified. Please clear all caches deactivate all third party plugins while we investigate.
Thanks.
October 31, 2016 at 9:26 am #1237875This reply has been marked as private.October 31, 2016 at 9:51 am #1237936Hi again
I am here with an update.
It seems to be working now actually. The two things that did the trick was.
– Including the right function code (with my own tag AND without syntax error)
– Disable the plugin “Above the fold”.Unfortunately we need the plugin “Above the fold” for optimizing CSS and Java delivery.
But now I know what causes the problem. -
AuthorPosts