3

How to add Google tracking code in simple html page I need some code or examples. Or please provide some kind of proper tutorials i am new in this. Thanks for the help :)

4
  • Does it have anything to do with the Google App Engine? support.google.com/analytics/answer/1008080?hl=en Commented Apr 8, 2014 at 10:20
  • NO i just want simple tracking code. Thanks Commented Apr 8, 2014 at 10:21
  • Then why did you add that tag?! It looks like you've been here for a while.. did you go through the tour page? stackoverflow.com/tour Commented Apr 8, 2014 at 10:22
  • OH well i removed the tag now thanks. :) Commented Apr 8, 2014 at 10:24

3 Answers 3

2

When you create a Google Analytics account you will be prompted with a page with the tracking code. Just add that tracking code in the <head> of your html page.

Sign up to request clarification or add additional context in comments.

Comments

2

You'll have to setup a google analytics account where you can get your custom tracking code like the on @Joshua Dance showed, insert that code in the <head> of every single page of your webiste. It takes about 24 hours for the data to start showing in google analytics so keep that in mind.

Comments

1

Go to GA.

Get your tracking code. Add it in the <head> of your html page on each page you want tracked.

<head>	<title>This Is Your Title</title>	<link rel="stylesheet" type="text/css" href="style.css">	<!-- Global site tag (gtag.js) - Google Analytics -->	<script async src="https://www.googletagmanager.com/gtag/js?id=UA-158081909-1"></script>	<script>	window.dataLayer = window.dataLayer || [];	function gtag(){dataLayer.push(arguments);}	gtag('js', new Date());	gtag('config', 'UA-YOURTRACKINGCODEHERE');	</script> </head>

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.