Go Back   WarriorForum - Internet Marketing Forums > The Warrior Forum > Main Internet Marketing Discussion Forum
Register Blogs FAQ Social Groups CalendarHelp Desk

Reply
 
LinkBack Thread Tools
Old 04-02-2009, 06:58 AM   #1
Leprechaun Killer
War Room Member
 
Thomas's Avatar
 
Join Date: Jul 2002
Location: Ireland
Posts: 3,234
Blog Entries: 14
Thanks: 149
Thanked 347 Times in 217 Posts
Default Is this Google Analytics e-commerce script correct?

Hello Warriors:

Can anyone who is knowledgeable of such things tell me if I have got the format, etc. of the following Google Analytics e-commerce script correct? (Google's own explanation is pretty confusing!)

Btw, the "$receipt" will (hopefully!) be extracted from DLGuard. The other variables aren't required so I put nothing betwwn the quotation marks. Is this the correct way to do that? (Or can I simply delete those lines altogether?

Here's the script:
<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-XXXXXX-X");
pageTracker._trackPageview();
} catch(err) {}
pageTracker._addTrans(
"$receipt",
"My Product Title Here",
"",
"",
"",
"",
"",
""
);
pageTracker._addItem(
"$receipt",
"",
"",
"",
"27.00",
"1"
);
pageTracker._trackTrans();
</script>
Thanks,
Tommy.

Thomas is offline   Reply With Quote
Old 04-02-2009, 07:26 AM   #2
Senior Warrior Member
 
Join Date: Jan 2009
Location: Oregon
Posts: 1,196
Thanks: 3
Thanked 69 Times in 61 Posts
Social Networking View Member's FaceBook Profile  View Member's Twitter Profile  View Member's YouTube Profile
Default Re: Is this Google Analytics e-commerce script correct?

The $receipt has to be replaced by your server side code.

Traffic-Bug is offline   Reply With Quote
Old 04-02-2009, 07:47 AM   #3
Leprechaun Killer
War Room Member
 
Thomas's Avatar
 
Join Date: Jul 2002
Location: Ireland
Posts: 3,234
Blog Entries: 14
Thanks: 149
Thanked 347 Times in 217 Posts
Default Re: Is this Google Analytics e-commerce script correct?

Quote:
Originally Posted by Traffic-Bug View Post
The has to be replaced by your server side code.
I thought that was it: I put "$receipt" in it myself.

In their example, Google have:
"1234", // Order ID
Regards,.
Tommy.

Thomas is offline   Reply With Quote
Reply

  WarriorForum - Internet Marketing Forums > The Warrior Forum > Main Internet Marketing Discussion Forum

Tags
analytics, correct, ecommerce, google, script

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -6. The time now is 04:16 PM.