*

ashwrote

  • ***
  • 23 posts
How to install Google Tag Manager on my site
« on: March 09, 2016, 05:24:26 AM »
I want to install google tag manager and i have to copy a code
i have to paste this code right after the Body in html file

can you guide which file exactly i have to open to paste this code

thanks

example of code

<!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=xxxxxx"
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','xxxxxx');</script>
<!-- End Google Tag Manager -->


*

MB Themes

Re: How to install Google Tag Manager on my site
« Reply #1 on: March 09, 2016, 06:35:13 AM »
@ashwrote
I have no idea what is that so I cannot guide you.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

ashwrote

  • ***
  • 23 posts
Re: How to install Google Tag Manager on my site
« Reply #2 on: March 10, 2016, 04:42:44 AM »
i need to know which file is template html file in my website
i have to paste the code in body section of my homepage

below is tag manager guide

Quick Start Guide

The Google Tag Manager container snippet is a small piece of JavaScript and non-JavaScript code that you paste into your pages. It enables Tag Manager to fire tags by inserting gtm.js into the page (or through the use of an iframe when JavaScript isn't available).

To implement Google Tag Manager, copy the code snippet provided in the Tag Manager interface or from below, replacing both instances of GTM-XXXX with your container ID. Paste this snippet into your website template page so that it appears immediately after the opening <body> tag.

<!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-XXXX"
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-XXXX');</script>
<!-- End Google Tag Manager -->
Many tag management operations can be achieved by just doing the basic code installation, but if you'd like to have finer grain control over tag events or data, you may want to use some customization using our asynchronous methods.

*

MB Themes

Re: How to install Google Tag Manager on my site
« Reply #3 on: March 10, 2016, 08:00:14 AM »
@ashwrote
You have it written there:
"... into your website template page so that it appears immediately after the opening <body> tag."

So go to header.php and place it after <body>
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

ashwrote

  • ***
  • 23 posts
Re: How to install Google Tag Manager on my site
« Reply #4 on: March 10, 2016, 10:51:51 AM »
yes and i asked which one exactly?
for example

public_html/oc-content/themes/patricia/responsive.css

or

public_html/oc-content/themes/patricia/main.php

or any other file??????

kindly advise

*

MB Themes

Re: How to install Google Tag Manager on my site
« Reply #5 on: March 10, 2016, 11:43:20 AM »
@ashwrote
Did you read my answer?

Quote
So go to header.php and place it after <body>
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

ashwrote

  • ***
  • 23 posts
Re: How to install Google Tag Manager on my site
« Reply #6 on: March 10, 2016, 12:08:09 PM »
ok thanks

*

ashwrote

  • ***
  • 23 posts
Re: How to install Google Tag Manager on my site
« Reply #7 on: March 10, 2016, 12:15:58 PM »
in header.php i cant find any word
<body>

:(

*

MB Themes

Re: How to install Google Tag Manager on my site
« Reply #8 on: March 10, 2016, 12:41:46 PM »
@ashwrote
Sorry, <body> tag is on every construct page (item.php, main.php, ...)
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

ashwrote

  • ***
  • 23 posts
Re: How to install Google Tag Manager on my site
« Reply #9 on: March 10, 2016, 12:47:19 PM »
ok
thanks