AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
5.4K members online now
5.4K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Google Tag Manager - non standard implementation

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I'm getting a "non-standard implementation" tag when checking on my website via chrome's GTM extension.  

 

It seems to be working fine, but I want to be sure that nothing pops up as I set up analytics and remarketing.

 

I use X Theme, which has a child theme, and within the functions.php I added this code (I took out my actual GTM ID):

 

// Add Google Tag Manager Code
// =============================================================================
function add_google_tag_manager_code(){
?>
<!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-xxxxX"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<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=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-526NSX');</script>
<!-- End Google Tag Manager -->
<?php
}
add_action( 'x_before_site_begin', 'add_google_tag_manager_code' );
// End Add Google Tag Manager Code
// =============================================================================

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Steven V
March 2016

Re: Google Tag Manager - non standard implementation

Top Contributor
# 4
Top Contributor
Hi Steven, agreed. Just make you test everything out (tags fire in preview mode, data is collected and reported in GA), and likely you'll be fine. Smiley Very Happy
Nicky Yuen, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here.
Find me on: Google+ | LinkedIn

View solution in original post

Re: Google Tag Manager - non standard implementation

Top Contributor
# 2
Top Contributor
Hi Steven V,

Looks fine, but you need to make sure that the GTM container eventually ends up just after the opening <body> tag. Run some tests after that with your tags to make sure that they're firing correctly and that the data is getting into GA, and if all goes well, then your implementation should be fine. Just curious though, what is your reason for doing it in a "non-standard" way?
Nicky Yuen, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here.
Find me on: Google+ | LinkedIn

Re: Google Tag Manager - non standard implementation

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Well, I used the duracelltomi plugin and got the same thing. Then I went into the file manager and went to the header.php and got the same thing. After that I asked in the X Theme forum and they offered the solution of putting it into the X Child theme functions.php, which, still works, but gets that message.

I ended up going into the google group for GTM and people said that it wasn't a big deal, and as long as it's working, it's fine, so I suppose it's not worth going down that rabbit hole of figuring out why the Chrome GTM extension is giving me that message.
Marked as Best Answer.
Solution
Accepted by topic author Steven V
March 2016

Re: Google Tag Manager - non standard implementation

Top Contributor
# 4
Top Contributor
Hi Steven, agreed. Just make you test everything out (tags fire in preview mode, data is collected and reported in GA), and likely you'll be fine. Smiley Very Happy
Nicky Yuen, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here.
Find me on: Google+ | LinkedIn