Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

DTM: Adding Adwords Conversion Tag

Jsekine
Level 1
Level 1

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%&amp;currency_code=USD&amp;label=AAAAAAAAAAAAAAAAAAAAAAAA&amp;guid=ON&amp;script=0"/>
</div>
</noscript> 

1 Accepted Solution
ParitMittal
Correct answer by
Level 10
Level 10

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

View solution in original post

2 Replies
flandyroyd
Level 3
Level 3

Josh,


Did you ever get an answer to this one?

ParitMittal
Correct answer by
Level 10
Level 10

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

View solution in original post