Tagged: x
-
AuthorPosts
-
September 29, 2016 at 10:28 pm #1196822
John BParticipantmy goal you need to edit your template file and add the following line just after the opening <body> tag:
<?php if ( function_exists( ‘gtm4wp_the_gtm_tag’ ) ) { gtm4wp_the_gtm_tag(); } ?>after researching the forum I added the code into the functions.php file in staging and it greaks. says error on line 31.
Is that the right place to put that code?
thank you
September 30, 2016 at 12:46 am #1196927
Paul RModeratorHi,
You can try this code instead.
function add_gtm_tag(){ if ( function_exists( 'gtm4wp_the_gtm_tag' ) ) { gtm4wp_the_gtm_tag(); } } add_action('x_before_site_begin', 'add_gtm_tag');You may add it in your child theme’s functions.php file after this line.
// Additional Functions
// =============================================================================Hope that helps.
September 30, 2016 at 5:52 am #1197131
John BParticipanthi good to hear from you and thank you for your prompt response.
no luck I get
HTTP response code indicates tag failed to fire: Status 404. This could be due to an empty or un-published container
http://bigcatmarketin.staging.wpengine.com/state-of-the-propane-and-heating-oil-industry/
heres what it looks like
// Additional Functions
// =================================tagmanager========================================function add_gtm_tag(){
if ( function_exists( ‘gtm4wp_the_gtm_tag’ ) ) { gtm4wp_the_gtm_tag(); }
}
add_action(‘x_before_site_begin’, ‘add_gtm_tag’);// ==================================woocommercedirect2order===========================================
add_filter (‘woocommerce_add_to_cart_redirect’, ‘woo_redirect_to_checkout’);
function woo_redirect_to_checkout() {
$checkout_url = WC()->cart->get_checkout_url();
return $checkout_url;
}I am using https://duracelltomi.com/google-tag-manager-for-wordpress/
thats where I saw the original code i mentioned
suggestions?September 30, 2016 at 8:05 am #1197239
Paul RModeratorHi,
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.
September 30, 2016 at 8:47 am #1197289
John BParticipantThis reply has been marked as private.September 30, 2016 at 3:30 pm #1197797
RadModeratorHi there,
What’s your admin login credentials? Your site is behind a coming soon page and I can;t directly your page.
Thanks!
September 30, 2016 at 4:10 pm #1197831
John BParticipantThis reply has been marked as private.September 30, 2016 at 9:55 pm #1198157
John BParticipantsite should be propogated for bigcatmarketinggroup.com and staging is good to go. so you should have full access
thank you
September 30, 2016 at 10:11 pm #1198173
Rue NelModeratorHello There,
The code is working correctly. It is showing right after the <body> tag.

Further inspection of the page, there seems to be a JS error on the page. You can check it here: http://prntscr.com/coeym4
You could try testing for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.Please let us know how it goes.
October 1, 2016 at 1:49 pm #1198674
John BParticipantgot it
thank you
October 1, 2016 at 9:54 pm #1198983
Rue NelModeratorYou’re welcome!
We’re glad we were able to help you out. -
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1196822 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
