I was directed here by a Google Adwords Support member after a lengthy conversation in which she was eventually unable to help me with this code.
Anywho, I am attempting to add an onClick tag to an "Add to Cart" image button so that I can track the conversions of people clicking it. This code : '<form action="https://www.landscapesupplyco.com/cart/?action=add" method="post"><input type="hidden" name="id" value="'.$id.'"><button type="submit" class="btn btn-block btn-modern">Add to <img style="max-width: 58px;" src="../img/paypal_logo_smb.png" alt="paypal" onClick="goog_report_conversion('https://www.landscapesupplyco.com/cart/')"/> cart<br/>$'.$price.'</button></form>' is giving me a parse/syntax error and preventing the page from loading (I also tried adding a space between conversion and the beginning parentheses). Even the .pdf download link in the example located here : https://support.google.com/adwords/answer/6095821?hl=en&authuser=0 under "Setting up an onClick handler for conversions" in the image portion results in a syntax error. What would be the correct code to avoid this error and accurately report conversions of "Add to Cart" clicks? With the given example I'd be surprised if anyone has gotten a click tracking even to report correctly, lol. Thanks in advance for your help. -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at http://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/bf0de9f5-07a9-4d76-a62a-5fe427d75a63%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
