View Single Post
Old 03-17-2011, 03:28 PM
Eugene Rimmer's Avatar
Eugene Rimmer Eugene Rimmer is offline
Senior Member
Join Date: Jan 2011
Location: Ecwid headquarters
Posts: 7,765

Here is the JS code that should be present on your shop page:

function googleConversion() {
    var hash = document.location.hash;
    if (hash.indexOf('mode=orderConfirmation') > 0) {
      //Set vars
      google_conversion_id = Your Value;
      google_conversion_language = "en";
      google_conversion_format = "2";
      google_conversion_color = "ffffff";
      google_conversion_label = Your Value;
      google_conversion_value = Your Value;

      //Do conversion
      var headID = document.getElementsByTagName("head")[0];
      var newScript = document.createElement('script');
      newScript.type = 'text/javascript';
      newScript.src = '';


pollTimer = setInterval(googleConversion, 100);
The values for the places where this code says 'Your value' are taken from the code Google generates for you (Reporting → Conversion → 'Your Conversion' → Code tab).

This code should be either inserted into the shop page enclosed in <script></script> tag, or saved into the file on your server and linked from the shop page via <script src="/url/of/your/file"></script>.

To test this solution out you need to mak a full purchase (including placing order) from an Adwords link.