Hello,
I am trying to add Google Adwords Conversion code to a conversion page load rule and have the conversion_id and conversion_value fields populate dynamically. I tried using _satellite.getDataElement('Data_Element') but it did not work. I stumbled across a post where the recommendation was to use %Data_Element% which is working. The problem is that while the conversion_id data is being passed correctly, the conversion_value data contains %24 at the beginning of the value (ex. if the price of the order was 19.99, the conversion_value is being collected as %2419.99. I have included the code below, and any help or guidance as to how to remove the %24 from the conversion_value is much appreciated.
Thanks,
Josh
<!-- Google Code for Conversions Conversion Page -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = %Purchase_ID%;
var google_conversion_language = "en";
var google_conversion_format = "2";
var google_conversion_color = "ffffff";
var google_conversion_label = "AAAAAAAAAAAAAAAAAAAA";
var google_conversion_value = %Order_Total%;
var google_conversion_currency = "USD";
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/0123456789/?value=%Order_Total%&currency_code=USD&label=AAAAAAAAAAAAAAAAAAAAAAAA&guid=ON&script=0"/>
</div>
</noscript>
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Jsekine,
As per our understanding "%24" at the beginning of conversion data value represents the "$" symbol. The problem here is that the browser encode s order value ($19.99) into UTF-8 format (encoding format that is set on the page ) i.e. to %24 and then value being passed to data element is %2419.99 and when the value is again fetched from data element it returns %2419.99. Hence we would recommend to pass the numerical value to the data element excluding the currency symbol.
Please let us know if you have any questions or queries.
Thanks & Regards
Parit Mittal
Views
Replies
Total Likes
Josh,
Did you ever get an answer to this one?
Views
Replies
Total Likes
Hi Jsekine,
As per our understanding "%24" at the beginning of conversion data value represents the "$" symbol. The problem here is that the browser encode s order value ($19.99) into UTF-8 format (encoding format that is set on the page ) i.e. to %24 and then value being passed to data element is %2419.99 and when the value is again fetched from data element it returns %2419.99. Hence we would recommend to pass the numerical value to the data element excluding the currency symbol.
Please let us know if you have any questions or queries.
Thanks & Regards
Parit Mittal
Views
Replies
Total Likes
Views
Likes
Replies