homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / WebmasterWorld / Website Analytics - Tracking and Logging
Forum Library, Charter, Moderators: Receptional & mademetop

Website Analytics - Tracking and Logging Forum

Conversion Tracking - Tracking Value
Using a variable to track exact value

 12:52 am on Mar 3, 2005 (gmt 0)

I would like to implement conversion tracking on oneof my clients site. I will place it on the receipt page of the checkout process.

As I want to track the sub total of the sale I tried adding $sub_total, which is the variable, to the tracking code.

The receipt page loaded with a javascript error, saying "$ sub_total is undefined" .

So, I thought the dollar sign could be causing a problem, so I removed, but go the same error.

The thing is that the variable $sub_total is used right above on the receipt page with no problems at all. It shows the sub total ammount of the sale.

But on the conversion code it generates a js error and says it's undefined.

Is it common? Should I use the $sub_total or just sub_total?
Am i forgetting something?

Thanks a lot for helping.



 5:53 am on Mar 3, 2005 (gmt 0)

C'mon guys. I know a lot of people here track the value of the conversions and probably had that same issue.
Please help me.


 3:28 pm on Mar 3, 2005 (gmt 0)

I use my own custom conversion tracking system rather than giving away any valuable data to google. However, the error message you're getting is telling you that you've not specified the javascript variable for sub_total.

This should do the trick...

If using ASP, add this to the javascript:
var google_conversion_value = <%= $sub_total %>;

If using PHP, add this:
var google_conversion_value = <? $sub_total ?>;


 5:09 pm on Mar 3, 2005 (gmt 0)


Global Options:
 top home search open messages active posts  

Home / Forums Index / WebmasterWorld / Website Analytics - Tracking and Logging
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved