osCmax v2.5 User Manual
Results 1 to 8 of 8

Google Adwords Tracking

This is a discussion on Google Adwords Tracking within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; Ok once again I am stuck and could use a push! I have read this post and other on oscommerce ...

      
  1. #1
    New Member
    Join Date
    Apr 2007
    Posts
    8
    Rep Power
    0


    Default Google Adwords Tracking

    Ok once again I am stuck and could use a push!

    I have read this post and other on oscommerce site
    Google Adwords ROI Tracking

    But I can't seem to get this to work! I am trying to put the google adwords conversion tracking code into my checkout_success.php file. I followed the steps on the article above and it is still not working. Any help would be appreciated on what code I need to put where?

    Thanks

  2. #2
    New Member
    Join Date
    Apr 2007
    Posts
    8
    Rep Power
    0


    Default Re: Google Adwords Tracking

    Still no luck, is anyone currently doing this?

  3. #3
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default Re: Google Adwords Tracking

    What specifically is not working? What are the instructions?
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  4. #4
    New Member
    Join Date
    Apr 2007
    Posts
    8
    Rep Power
    0


    Default Re: Google Adwords Tracking

    Thanks for the reply, this is code google give you to put on your order completion page to track conversions from their adwords program. I have tried to put it on the checkout_sucess.php page. Here is google's directions for adding code in php. They state that it need to go inside of the body tag, but in oscmax code on that page does not contain that. I will also post below that the code that they auto generate for me to add to my site.

    CONVERSION TRACKING & HYPERTEXT PREPROCESSOR (PHP)
    Follow these instructions to insert the conversion tracking code to a website created using
    dynamically-generated PHP: Hypertext Preprocessor (PHP) pages.
    To add conversion tracking code to PHP pages using your web page editor, complete the
    following tasks:
    1. Open your conversion confirmation page PHP file. If multiple pages are generated from
    the same file, find the section in the PHP file which generates your conversion page.
    Google AdWords Conversion Tracking Setup Guide
    16
    2. If your site has a variable conversion value, determine the PHP expression that displays
    that value. For example: <?php echo $totalValue ?>, <? echo totalValue ?>
    Choose the
    Purchase/Sale conversion type while going through the conversion tracking
    setup. Insert the full string (<? echo $totalValue ?>) into the “Value” field and press

    Refresh
    to generate the final tracking code. Copy and save this code snippet.
    3. Insert the conversion tracking code onto the conversion confirmation page. Make sure
    that the code appears within a static HTML section, not contained within an PHP code
    section (delineated by <? and ?> markers).
    Insert the conversion tracking code snippet directly into the body of the conversion
    confirmation page. Search for the </body> tag and place the code immediately above it.
    If the </body> tag is not located within the static portion of the HTML page, make sure
    that you add the code snippet so that it appears within the <body> section of the page.

    Example:
    <!-- Google Code for Purchase Conversion Page -->
    <script language="JavaScript" type="text/javascript">
    <!--
    var google_conversion_id = 1234567890;
    var google_conversion_language = "en_US";
    var google_conversion_format = "1";
    var google_conversion_color = "666666";
    if (<? echo $totalValue ?>) {
    var google_conversion_value = <? echo $totalValue ?>
    }
    var google_conversion_label = "Purchase";
    //-->
    </script>
    <script language="JavaScript"
    src="http://www.googleadservices.com/pagead/conversion.js">
    </script>
    <noscript>
    <img height=1 width=1 border=0
    src="http://www.googleadservices.com/pagead/conversion/1234567890/?value=<? echo
    $totalValue ?>&label=Purchase&script=0">
    </noscript>
    </body>
    4. Save your conversion confirmation file and upload to your web server if necessary. If you
    would like to test the placement of your conversion tracking code, go to your conversion
    page by completing a conversion on your site. View the source of the page (in Internet
    Explorer choose
    View > View Source). You should see the conversion tracking code
    between the <body> and </body> tags on your page. Note that the PHP expression will
    be replaced by the actual conversion value when you view the source.

    Here is my code:

    <!-- 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 = "666666";
    if (1.0) {
    var google_conversion_value = 1.0;
    }
    var google_conversion_label = "purchase";
    //-->
    </script>
    <script language="JavaScript" src="https://www.googleadservices.com/pagead/conversion.js">
    </script>
    <noscript>
    <img height=1 width=1 border=0 src="https://www.googleadservices.com/pag...chase&script=0">
    </noscript>

    Any help on this would be really appreciated, php is definitly not by strong point, but I really love the oscmax shopping cart solutions, so hope to improve my php knowledge.

    Thanks


  5. #5
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default Re: Google Adwords Tracking

    Are you adding this to your template checkout_success.tpl.php? That is where I would put it. The html for the checkout_success.tpl.php is included within the body tags, so that would be where to put it.

    In osCMax, the checkout_success.tpl.php file is in the /catalog/templates/fallback/content directory.
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  6. #6
    New Member
    Join Date
    Apr 2007
    Posts
    8
    Rep Power
    0


    Default Re: Google Adwords Tracking

    Sorry for the delay, actually took a vacation.... yes I am adding the code to checkout_success.tpl.php, but It does not have the body tag. Should it?

  7. #7
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default Re: Google Adwords Tracking

    No, it doesn't have a body tag, but all the content is between the body tags, so it should not make a difference.
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  8. #8
    New Member
    Join Date
    Apr 2007
    Posts
    8
    Rep Power
    0


    Default Re: Google Adwords Tracking

    Thanks alot, I believe it is working now! One more quick question, if I wanted to insert tracking code into the head of the checkout_success page which file should I use.

Similar Threads

  1. DPD Tracking Box
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 03-22-2007, 06:11 PM
  2. Google Adwords ROI Tracking
    By Bsnrjones in forum osCmax v1.7 Discussion
    Replies: 5
    Last Post: 08-27-2006, 09:58 PM
  3. Affiliate Not Tracking
    By toddw in forum osCMax v2 Features Discussion
    Replies: 3
    Last Post: 04-11-2006, 11:49 AM
  4. Bug Tracking
    By nefertari7 in forum osCmax v1.7 Discussion
    Replies: 1
    Last Post: 02-21-2005, 07:35 AM
  5. 'Package Tracking' vs. MS1
    By Petter in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 03-22-2003, 05:09 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •