No announcement yet.

Order total variable for Adwords / Yahoo Search Conversions

  • Filter
  • Time
  • Show
Clear All
new posts

  • Order total variable for Adwords / Yahoo Search Conversions

    I am trying to setup Google Adwords and Yahoo Search Marketing to track the order total for conversions. Does anyone know the exact code needed to pass the order total?

    Google shows I need a line like this in the conversion code

    if ([TOTAL]) {
    var google_conversion_value = [TOTAL];

    And Yahoo shows I need a line like this in the conversion code

    window.ysm_customData.conversion = "transId=,currency=,amount=[TOTAL]";

    Will inserting the [TOTAL] variable into the javascript work or is there some other way to pass the total value?

  • #2
    Well after a couple of days of using that code I am pretty sure it is not working. I will post here if I do figure out what will work.


    • #3
      google conversion tracking

      from looking at the checkout-step3 template it seems logical to use the following code:

               <!--start block 2-->
               <!-- Google Code for purchase Conversion Page -->
      <script language="JavaScript" type="text/javascript">
      var google_conversion_id = xxxxxxxxxx;
      var google_conversion_language = "en_US";
      var google_conversion_format = "1";
      var google_conversion_color = "FFFFFF";
      if ([BALANCE]) {
        var google_conversion_value = [BALANCE];
      var google_conversion_label = "purchase";
      <script language="JavaScript" src="">
      <img height=1 width=1 border=0 src="">
      <!--end block 2-->
      can someone who has this working correctly or someone from 3dcart admin please confirm how to do this??


      • #4

        Can I Add Tracking and Conversion Scripts?

        3DCart allows you to add Custom scripts to your website; this could be Javascript functions to be used in the HTML, Tracking Scripts from third part services like Google Analytics or StatCounter, and Conversion Scripts from affiliate programs to track the sales.

        All these scripts can be added directly to the HTML files via FTP or from the Store Manager.

        Tracking Codes

        Any code entered to the Global Header, Footer, Left Banner or Right Banner sections will be displayed on every page of your site. Some of these could be disabled in the website depending on your specific layout.

        1. Login to your Store Manager
        3. Add the script to the Footer field with the WYSIWYG mode OFF (you cannot paste code when this is enabled). This can also be done using the Global Header, Left Banner or Right Banner.
        4. Click SAVE CHANGES

        Conversion Codes

        These codes are used to report your conversion goals or sales to third party services like Affiliate Programs.

        1. Login to your Store Manager
        3. Click on EDIT next to "Checkout #4"
        4. Add the script to the Footer section.
        5. If the code requires to pass the Invoice Number or the Order amount you can use the variables [invoicenum] for the Invoice number, [total] for the Order Total, or [osubtotal] for the Subtotal of the order (before shipping and taxes).
        6. Click on SAVE CHANGES

        When a script makes reference to a external site you want them to be secure; always check that they are https instead of http. These scripts also include links to the third party websites so it's better to place the scripts at the Footer instead of the Header.

        You can also use .js files when adding custom javascript that you want to keep it behind the page, it's more organized and it makes the code reusable, you can just save the file on your templates folder and then call it from the html.