AdWords
2.1K members online now
2.1K members online now
Get started with AdWords - learn the basics to get set up for success
Guide Me
star_border
Reply

where to add google analytics code

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hello All,

 

Greetings!

 

I have a doubt related to Google analytics code. What is the best way to add Google analytics code in the website. I mean to say where i should add Google analytics code in the HEAD section or in BODY section.

 

Google simply says "This is the Universal Analytics tracking code for this property. To get all the benefits of Universal Analytics for this property, copy and paste this code into every webpage you want to track." but do not clarify where we should add the code. Kindly tell me the standard practice to add the code.

 

Thanks

 

2 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by Eric Gehler (Badged Google Partner)
September 2015

Re: where to add google analytics code

Top Contributor
# 4
Top Contributor

This is what Google says -

 

Paste your snippet (unaltered, in its entirety) into every web page you want to track. Paste it immediately before the closing </head> tag.

 

Source - https://support.google.com/analytics/answer/1008080?hl=en

 

Thanks
Ratan Jha


About Me: Community Profile | Ratan Jha INC. | Splashsys Webtech
If this or any other post solved your question, do not hesitate to accept it as the solution.

View solution in original post

Re: where to add google analytics code

Participant ✭ ✭ ☆
# 2
Participant ✭ ✭ ☆
Best practice is to add Google Analytics tracking code in the HEAD section.

Re: where to add google analytics code

Follower ✭ ✭ ☆
# 3
Follower ✭ ✭ ☆
Hi Roshan M,

Add Google Analytics code in HEAD section . Also if you have separate Landing page for your service that add it on that page too.
Marked as Best Answer.
Solution
Accepted by Eric Gehler (Badged Google Partner)
September 2015

Re: where to add google analytics code

Top Contributor
# 4
Top Contributor

This is what Google says -

 

Paste your snippet (unaltered, in its entirety) into every web page you want to track. Paste it immediately before the closing </head> tag.

 

Source - https://support.google.com/analytics/answer/1008080?hl=en

 

Thanks
Ratan Jha


About Me: Community Profile | Ratan Jha INC. | Splashsys Webtech
If this or any other post solved your question, do not hesitate to accept it as the solution.

Re: where to add google analytics code

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
I just dont understand where this is supposed to go.

Re: where to add google analytics code

Follower ✭ ✭ ☆
# 6
Follower ✭ ✭ ☆
Hi deb v,

Add Google Analytics code in HEAD section of website before closing of head tag. Also if there is a separate Landing page for your service that add it on that page too before closing of head tag.

Re: where to add google analytics code

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭
but how do I find the closing </head> tag.?

Re: where to add google analytics code

Follower ✭ ✭ ☆
# 8
Follower ✭ ✭ ☆
Sarah Willard G

When you are on website. Press Ctrl + U, then you will see code of that particular page in next tab.

Then press Ctrl + F and write </head>, you will get to know where this tab get closed.

Re: where to add google analytics code

[ Edited ]
Visitor ✭ ✭ ✭
# 9
Visitor ✭ ✭ ✭

I HAVE FOLLOWED THE DIRECTIONS YOU SENT ME AND LOTS OF DETAILS RELATING TO
ME CAME UP. WHEN I WROTE
SOME SECTIONS CAME UP IN RED TYPE. I WAS NOT ABLE TO ADD THE GOOGLE
TRACKING CODE. ALTHOUGH LOTS OF DIFFERENT TRACING I.D BELONGING TO MY 12
DOMAINS WERE MENTIONED IN THE SCRIPT.
I HAD ALREADY GONE INTO cpANEL, THEN FILE MANAGER, THEN PUBLIC_HTML AND
LOADED THE SCRIPTS INWITH cODE mANAGER.
WHAT DID I DO WRONG?

<edited by a Community Manager as noted below>
 
NOTE: This post has been edited by a Community Manager - per Community Guidelines - in order to remove contact information which was most likely due to an email or mobile footer. Please be sure to remove this information in future replies. Thank you.

 

Re: where to add google analytics code

Follower ✭ ✭ ☆
# 10
Follower ✭ ✭ ☆
Hi Sarah,

Here is a sample coding of your site. https://artprints-gallery.com/
Head tag is there on this site.

Here is how coding starts
<head>

<base href="https://www.artprints-gallery.com/" />

<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />

<meta name="viewport" content="width=device-width, initial-scale=1" />


<title>Gallery Moonfleet-Sarah Willard Gray</title>

<meta name="description" content="Prints: abstract and contemporary fine art prints - Gallery Moonfleet, Bowral, New South Wales, Australia." />


<link rel="shortcut icon" href="https://www.artprints-gallery.com/image/data/cart.png" />



<link rel="stylesheet" type="text/css" href="catalog/view/theme/sellegance/stylesheet/bootstrap.min.css"/>

<link rel="stylesheet" type="text/css" href="catalog/view/theme/sellegance/stylesheet/stylesheet.css" media="screen"/>

<link rel="stylesheet" type="text/css" href="catalog/view/theme/sellegance/stylesheet/stylesheet-responsive.css" media="screen"/>