1.9K members online now
1.9K 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

Modify the conversion value in Adwords Converstion Tracking Code

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭



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!




1 Expert replyverified_user

Re: Modify the conversion value in Adwords Converstion Tracking Code

Top Contributor
# 2
Top Contributor
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:

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.

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

Re: Modify the conversion value in Adwords Converstion Tracking Code

Collaborator ✭ ☆ ☆
# 3
Collaborator ✭ ☆ ☆
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