Installing tracking scripts

hoangvu

New member
Joined
Jun 6, 2012
Messages
1,889
Points
0
Getting your website tagged with basic tracking scripts is easy and can often be done in under
an hour, although a little more time will be needed to implement advanced order tracking.

Step 1: Create a Google AdWords Account
If you dont already have a Google AdWords account, you’ll need to set one up now.We’ll be using
the same account to both run your PPC campaigns and access your website analytics reports.
Start by navigating over to the Google AdWords site (google. com/adwords). Click the “Start
now” button to begin the sign-up process
image006.gif

On the first page, you will be asked to sign up for “Starter Edition” or “Standard Edition.” Be
sure to select “Standard Edition.”Dont waste your time with a starter account, as it wont allow
you to do most of the things you’ll need it to
image001.png
Select the Standard Edition when setting up a new account. The Starter Edition is too limited for
our purposes.

On the next several pages, you’ll be asked to create a username and password, set your currency
preferences, and verify your e-mail address. These are all straightforward and full instructions are
provided. If you have any problems, you can contact a Google representative via live chat.

When your account is ready, you should see a page that looks something like the following.
Dont worry about creating a campaign yet; the tracking needs to come first
image002.png
Skip creating a campaign for now. We’re going to focus on installing tracking.

Step 2: Create a Website Profile
Next, we’ll configure Google Analytics and generate the scripts you need to install on your site.
From the Google AdWords account, click the tab at the top of the page that reads “Analytics.”
Select the option that reads “Create my free Google Analytics account” and click “Continue”

image003.png
Create a new Google Analytics account

Next, you’ll be asked for the domain name of your website. You can also assign an easy-toremember
name for the set of reports for this particular website, but in most cases it suffices if
the account name and domain name are the same.
There are two other settings here: “Destination URL Auto-tagging” and “Apply Cost Data.”
Leave these on for now, as they will save you a lot of work when creating your PPC campaigns
later.While you can turn them off, you only need to do so in select situations (Figure 3-6).
Next, you’ll be asked to agree to the terms of service. You must do so before you will be
allowed to use Google Analytics. Finally, you’ll be directed to a page which will contain the tracking
code for your site

image004.png
You’ll need to provide Google Analytics with the name of your website. Make sure that
“Destination URL Auto-tagging” and “Apply Cost Data” are checked for now.

Step 3: Tag Your Site
You now have to copy the script shown on this page to your site.You will want to do this on every page
of your site (this is usually very easy to do if your website uses templates—most modern sites do).

Insert the code just before the </body> tag in your page, like so:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<html>
<head>
<title>The Methuselah Foundation-Welcome to The Methuselah
Foundation</title>
</head>
<body>
. . . Your Website Content Goes Here . . .
<script type="text/javascript">
var gaJsHost = (("https:" = document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js'
type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-1233280-1");
pageTracker._trackPageview();
} catch(err) {}</script>
</body>
Why Is the Tracking Script Placed at the End of the Page?
While the script location is not absolutely critical, it is recommended that you place it at the end
of each page on your website. This ensures that your visitors see your website immediately and
arent waiting for the Google Analytics script to execute.While the script is usually fast, there’s
always a chance it could introduce a few seconds of delay to your page load time.
There are two exceptions to this rule. The first is when you are split-testing your pages using
the Google Website Optimizer (GWO) tool (see Chapter 9). The second is when you are tracking
individual order sizes (see “Advanced E-Commerce Goal Tracking” below).
Both e-commerce order and GWO tracking scripts should be placed after the standard
Google Analytics tracking script.
 
Last edited:

Noticed

New member
Joined
Aug 1, 2012
Messages
25
Points
0
Thanks ppcads, this is a really well written tutorial thanks for posting it for us all!
 
Older threads
Replies
0
Views
2,383
Replies
8
Views
6,491
Replies
41
Views
13,749
Newer threads
Replies
0
Views
3,096
Replies
12
Views
5,364
Replies
0
Views
2,023
Latest threads
Replies
0
Views
86
Replies
6
Views
205
Replies
4
Views
190
Replies
0
Views
121
ReH
Replies
3
Views
171
Recommended threads

Latest postsNew threads

Referral contests

Referral link for :

Sponsors

Latest Blog ArticlesMost Viewed Threads

Popular tags

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top