Welcome to WebmasterWorld Guest from 54.162.12.134

Forum Moderators: DixonJones & mademetop

Message Too Old, No Replies

Conversion Tracking - Tracking Value

Using a variable to track exact value

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

10+ Year Member



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)

10+ Year Member



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.
Thanks
3:28 pm on Mar 3, 2005 (gmt 0)

10+ Year Member



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)

10+ Year Member



Thanks
 

Featured Threads

Hot Threads This Week

Hot Threads This Month