Community Forums › Forums › Archived Forums › General Discussion › Google Tag Manager
Tagged: functions, google, google tag manager, plugins
- This topic has 11 replies, 6 voices, and was last updated 9 years, 2 months ago by andrea12091980.
-
AuthorPosts
-
May 14, 2014 at 11:02 am #105126osalcedoParticipant
Does anyone have any idea how to get Google Tag Manager to work properly in a genesis theme??
No matter what I do, it simply won't work.
Google Webmaster Tools keeps returning the following error... "The Google Tag Manager snippet on your site is in the wrong location."
I've tried several plugins after trying the following code snippet in a functions.php file...add_action('genesis_before', 'google_tag_manager');
function google_tag_manager() { ?>
<!-- Google Tag Manager -->
PASTE GOOGLE CODE MANAGER CODE HERE
<!-- End Google Tag Manager -->
<?php
}Any help would be greatly appreciated 🙂
May 15, 2014 at 12:48 am #105233nutsandboltsMemberHmm, the snippet you posted should work, assuming you're pasting the tag manager code in the middle where it asks for it.
Who is your host? Are you running any kind of caching plugin and/or Cloudflare on the site? Using a CDN? Any of those may prevent WMT from finding the tag manager code.
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+August 27, 2014 at 6:40 pm #121445nhinternetsolutionsMemberI have been unable to add the Google Tag Manager snippet to the Freelance Child Theme. Not using any Caching, CloudFlare or a CDN...
Ideas?
August 27, 2014 at 6:45 pm #121446nutsandboltsMemberCan you post a link to your site? It's always easier to help if we can see what you see, especially if the tag function is still in place.
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+August 4, 2015 at 4:12 pm #161438cavemediaMemberAdd Genesis Simple Hooks plugin to your wordpress.
Then add the code to area that says:
genesis_before Hook
This hook executes immediately after the opening <body> tag.
September 10, 2015 at 8:19 am #165110christianmejlakMemberWas this resolved
I am having the same problem, I normally use the Simple Hooks but for some reason its not working. It shows and works ok if I am logged in the admin and preview the site.
I tried using this code in funtions.php through ftp and still didn't work. Any ideas would be appreciated:)
September 25, 2015 at 6:43 am #166629andrea12091980MemberHello.
I'm facing the same problem with Outreach Pro theme.
Using Simple Hooks, I just added my GTM code in "genesis_before Hook" field, but no way... I mean no data entry at all on Google Search Console panel...September 25, 2015 at 6:48 am #166631christianmejlakMemberAndrea try turning wpsupercache off or any other caching plugin you might have and check if it works
September 25, 2015 at 7:27 am #166633andrea12091980MemberActually these are all the plugin installed:
Akismet
Black Studio TinyMCE Widget
Genesis eNews Extended
Genesis Responsive Slider
Genesis Simple Edits
Genesis Simple Hooks
MailChimp for WordPress Lite
Notifica Cookie
Page Builder by SiteOrigin
Simple Social Icons
Simply Exclude
SiteOrigin Widgets Bundle
TablePress
UpdraftPlus - Backup/Restore
Yoast SEODo you know if any of these someway conflicts with the GTM code?
September 25, 2015 at 7:30 am #166634christianmejlakMemberIs this a live web if so send url
September 25, 2015 at 7:39 am #166638andrea12091980MemberYes it is.
September 28, 2015 at 4:03 am #166824andrea12091980MemberEverything works fine now. It was just a matter of time, G robot seems to catch all the data.
So the best choice is to use Simple Hooks and insert the GTM code after <body> tag, that's it.
Thank you 🙂 -
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.