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

If I am using a variable for google_conversion_value, must I also use a variable for currency?

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Using a custom website (based on ASP) and when running Google Tag Assistant I am seeing an error "Conversion Value should be prefixed with standard currency"

 

The Tag Assistant shows me the currency in use though (being CAD). I realise the conversion value format is incorrect (for an $8.00 sale the value coming through is simply 8, not 8.00) and my developer is working on that part but is there any reason why I'd be alerted about the currency?

 

The Google support page uses both value and currency as variables in its example (here: https://support.google.com/adwords/answer/6095947), so guess I'm just wondering if I'm using a variable for value, do I have to use a variable for the currency also, even though only one currency is accepted?

 

Code shown below:

<!-- Google Code for Checkout Conversion Page -->
<script type="text/javascript">
	/* <![CDATA[ */
var google_conversion_id = XXXXXX;
var google_conversion_language = "en";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "XXXXXX";

	if (<%= SaleTotal %>) {
		var google_conversion_value = <%= SaleTotal %>;
	}
var google_conversion_currency = "CAD";
var google_remarketing_only = false;
/* ]]> */
	</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/XXXXXX/?value=<%=SaleTotal %>&amp;currency_code=CAD&amp;label=XXXXX&amp;guid=ON&amp;script=0"/>
</div>
</noscript>

 

1 Expert replyverified_user
Marked as Best Answer.
Solution
Accepted by topic author Adrian R
July 2016

Re: If I am using a variable for google_conversion_value, must I also use a variable for currency?

Top Contributor
# 2
Top Contributor
Hi Adrian R,

I only have one suggestion, for the noscript part of the script. You have:
//www.googleadservices.com/pagead/conversion/XXXXXX/?value=<%=SaleTotal %>&amp;currency_code=CAD&amp;label=XXXXX&amp;guid=ON&amp;script=0"

Google is expecting "conversion_currency" where you have "currency_code". That could be the issue. The rest of your script looks ok. Are you sure SaleTotal is returning a value to the page?

Best of Luck!

Pete
petebardo -- Deadhead doing AdWords

Re: If I am using a variable for google_conversion_value, must I also use a variable for currency?

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Thanks Pete, that has done the trick! SaleTotal is definitely returning a value in the page, I can see it if I view the source once on the "thank you" page.

 

Now the only other query I have (might not be a big deal) but now that my developer has also fixed up the formatting, I'm seeing the conversion value twice when using Google Tag Assistant

Conversion ID
XXXXX
Conversion Label
XXXXX
Conversion Value 22.50
Conversion Value 22.5
Conversion Currency CAD
Conversion Value in the <img> tag 22.5

 

When I view the source though, I only see the value in the format 0.00

Do you happen to know if this would be an issue? What I see when I view source is shown below

 

<!-- Google Code for Checkout Conversion Page -->
<script type="text/javascript">
	/* <![CDATA[ */
var google_conversion_id = XXXXXX;
var google_conversion_language = "en";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "XXXXXX";

	if (22.50) {
		var google_conversion_value = 22.50;
	}
var google_conversion_currency = "CAD";
var google_remarketing_only = false;
/* ]]> */
	</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/XXXXXX/?value=22.50&amp;conversion_currency=CAD&amp;label=XXXXXX&amp;guid=ON&amp;script=0"/>
</div>
</noscript>

I would turn Recording on within Google Tag Assistant to see if I could get any further information, but I literally just lost the VM that the web service is running on and it won't come back up! Sounds like it's going to be a great day ...

Re: If I am using a variable for google_conversion_value, must I also use a variable for currency?

Top Contributor
# 4
Top Contributor
Hi Adrian R,

I replicated your code on a test page then ran Tag Manager against that. I was getting the same thing as you. I looked at the URL's. Even though the value being passed in the img tag is 22.50, the url shows it as 22.5. I'd recommend just presenting the value, leave the 0 off the end:
var google_conversion_value = 22.5;

When you do that, only one value for the conversion value shows up in the Tag Manager. I'm still getting "Conversion Value should be prefixed with standard currency". This is more of a warning than an error.

Pete
petebardo -- Deadhead doing AdWords

Re: If I am using a variable for google_conversion_value, must I also use a variable for currency?

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
OK thanks Pete, though that's interesting I was no longer getting the "standard currency" error in the Google Tag Assistant plugin / extension, using the code I sent you.

I'll see how it goes anyway, I'm thinking there are effectively 3 values being passed, one in the script, one in the image tag, one in the noscript so that might be where the discrepancy lies.
The code I sent is merely on a staging server so I'll see what happens when I put it live, and the client can tell me if they are getting the correct value through or not.

Thanks again!

Adrian