AdWords
5K members online now
5K members online now
Use AdWords conversion tracking and reporting to measure your results. Have a question about Google Analytics? Post it here, on the Google Analytics Community!
Guide Me
star_border
Reply

Modify the conversion value in Adwords Converstion Tracking Code

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi,

 

I am adding Adwords Conversion Tracking Code on thank you page after payment. I want to track the exact checkout payment value. But the paypal module returns the price with currency format e.g SGD200. I try to modify the value but it doesn't works. 

 

Google Tag Assistant shows the conversion value is p  instead of the exact number. Anyone can help me? Smiley Sad 

 

Here is my code.

 goog_snippet_vars = function() {
var p = {/literal}{$price|escape:'htmlall':'UTF-8'}{literal};
var regex = /[^0-9\.]+/g;
p = p.replace(regex, "");
var w = window;
w.google_conversion_id = 961065713;
w.google_conversion_label = "HOLFCOjy2WAQ8eWiygM";
w.google_conversion_value = p;
w.google_conversion_currency = "SGD";
w.google_remarketing_only = false;
}

Thanks in advance!

 

Regards,

Munnie

1 Expert replyverified_user

Re: Modify the conversion value in Adwords Converstion Tracking Code

Rising Star
# 2
Rising Star
Hey Munnie,

Do you have multiple products or a single product you're selling. If it's a single product you can already insert the value into the tracking code. If it's multiple products have a single thank you page you'll have to use a dynamic conversion code. Here is a great article on this: https://support.google.com/adwords/answer/6095947?hl=en&authuser=0

Also if you're using an e-commerce platform there are often many that help you track the value of each transaction.

I'd love to learn more about your situation.

Best,
- Josh
Joshua, Rising Star
Was my response helpful? If yes, please mark it as the ‘Best Answer.’

Re: Modify the conversion value in Adwords Converstion Tracking Code

Top Contributor Alumni
# 3
Top Contributor Alumni
Hi
I think a simple JS like below should do the trick
function myFunction() {
var paypalRevenue = "USD1266634";
var reVenue = paypalRevenue.replace(/\D/g,'', "");
}
Hope this helps
Regards, Nik
LinkedIn  |   @nikhilparachure | My Blog