Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Dec 2006
    Posts
    11
    Plugin Contributions
    0

    Default E-commerce tracking code in checkout_success page

    Hi, hope someone can help me as I have spent several days and many hours searching for an answer with no luck.

    I have google analytics code installed but want to install the e-commerce tracking code. This needs to be ONLY in the checkout_success.php.

    The only page I can find for this is in: public_html/includes/templates/template_default/templates/tpl_checkout_success_default.php

    In that page I have installed the google adwords conversion tracking code which works fine, but because this is a php file I placed the code anywhere in the page and works fine.

    However, the e-commerce code needs to be placed just after the normal analytics code. My analytics code is installed in public_html/includes/templates/template_default/common/tpl_main_page.php but this makes the code to appear in ALL pages, so I cannot install the e-commerce code there because it will show in ALL pages.

    Please I need help if someone knows the answer.. I need to put the e-commerce code just after the normal analytics code to appear ONLY in the checkout_success page.. where can I do this???

    The Zen Cart version I use is 1.3.6

    Please help.. !

  2. #2
    Join Date
    Sep 2004
    Location
    Western Massachusetts
    Posts
    2,945
    Plugin Contributions
    5

    Default Re: E-commerce tracking code in checkout_success page

    Put your regular adwords code in includes/templates/your_template/common/tpl_footer.php

    Then make a copy of that file, put your extra code in it after the adwords tracking, and save it as includes/templates/your_template/checkout_success/footer.php
    Neville
    An assumption is what you arrive at when you get tired of thinking...

  3. #3
    Join Date
    Dec 2006
    Posts
    11
    Plugin Contributions
    0

    Default Re: E-commerce tracking code in checkout_success page

    Dear Bunyip,

    Thanks a lot for your reply..
    My analytics code is successfully installed here:

    /public_html/includes/templates/template_default/common/tpl_main_page.php

    The normal analytics code is tracking ok on that location, it tracks all pages...

    You said I should install the normal analytics code in
    public_html??/includes/templates/your_template/common/tpl_footer.php

    but the tpl_footer.php does not have any /body tag to place the code before.. so dont know where I could place it on that php file to make the code appear before the /body tag.

    Also, if I install the code successfully in the tpl_footer.php file, when I make a copy of it, you say I should put it in:

    public_html??/includes/templates/your_template/checkout_success/footer.php... but I cannot see the directory "chekout_success".. do I need to create it?

    Sorry for long questions.. hope you can help me with this...

    Thanks, Jorge.

  4. #4
    Join Date
    Sep 2004
    Location
    Western Massachusetts
    Posts
    2,945
    Plugin Contributions
    5

    Default Re: E-commerce tracking code in checkout_success page

    Anywhere in the tpl_footer.php file will be before the /body tag.

    To make it a little easier for you, you can keep your existing code in your edited tpl_main_page file. That file should be saved as public_html/includes/templates/YOUR_TEMPLATE/common/tpl_main_page.php, rather than in the template_default folder - otherwise it will get overwritten during an upgrade.

    Make a copy of that tpl_main_page.php, add your new code where you need it to be before the /body tag. Then save that edited copy as
    public_html/includes/templates/template_default/checkout_success/tpl_main_page.php

    You will need to create the folder public_html/includes/templates/template_default/checkout_success - because it's a new folder, it won't get overwritten during an upgrade. The tpl_main_page.php there will only be used on your checkout_success page.
    Neville
    An assumption is what you arrive at when you get tired of thinking...

  5. #5
    Join Date
    Dec 2006
    Posts
    11
    Plugin Contributions
    0

    Default Re: E-commerce tracking code in checkout_success page

    Bunyip.. That is brilliant thank you so much!
    I have installed the e-commerce code successfully with your guidance. It now shows only in the checkout_success page, and all other pages show the normal analytics code.. now I just need to wait some days to see if it's tracking properly..

    Thanks again for your time! hope this helps others..
    Jorge.

  6. #6
    Join Date
    Dec 2006
    Posts
    11
    Plugin Contributions
    0

    Default Re: E-commerce tracking code in checkout_success page

    My e-commerce activity is now being track by analytics.. this is great... my only silly question now is: I installed the code as it appears here: http://www.google.com/support/google...n&answer=55528

    One part of the code is like this:


    pageTracker._addItem(

    "1234", // Order ID

    "DD44", // SKU

    "T-Shirt", // Product Name

    "Green Medium", // Category

    "11.99", // Price

    "1" // Quantity

    );

    pageTracker._trackTrans();

    </script>
    Now my activities are being track as selling item T-Shirt and at 11.99 price.
    How do I make my products to be trackable??? I have about 100 products..!, how do I make the code to track each item sold?..

  7. #7
    Join Date
    Dec 2006
    Posts
    11
    Plugin Contributions
    0

    Default Re: E-commerce tracking code in checkout_success page

    Just to clarify my last post.. my e-commerce code is tracking the item T-shirt when I have a sale, this is because t-shirt is in my code, but I don't sale t-shirts, I sale over 100 different items.. ! and I need the code to register the sales of each item.. please help.. thanx

  8. #8
    Join Date
    Jan 2007
    Location
    Carlsbad, CA
    Posts
    158
    Plugin Contributions
    0

    Default Re: E-commerce tracking code in checkout_success page

    Quote Originally Posted by jorgebnuk View Post
    Just to clarify my last post.. my e-commerce code is tracking the item T-shirt when I have a sale, this is because t-shirt is in my code, but I don't sale t-shirts, I sale over 100 different items.. ! and I need the code to register the sales of each item.. please help.. thanx
    Were you able or was anyone able to fix this? I am installing the code on my store and I'm not sure what to do with that.
    -Buck

  9. #9
    Join Date
    Sep 2004
    Location
    Western Massachusetts
    Posts
    2,945
    Plugin Contributions
    5

    Default Re: E-commerce tracking code in checkout_success page

    You'll need to use php code on the checkout_success page to build the tracker code with the order contents.
    Neville
    An assumption is what you arrive at when you get tired of thinking...

  10. #10
    Join Date
    Nov 2008
    Posts
    164
    Plugin Contributions
    0

    Default Re: E-commerce tracking code in checkout_success page

    Quote Originally Posted by bunyip View Post
    You'll need to use php code on the checkout_success page to build the tracker code with the order contents.
    Thanks for the support bunyip, I had the same problem as jeorge and it's good to have gotten this far.

    My other solution would have been to define a constant to hold the conversion tracking code and only call it on the checkout_success page :) It wouldn't have made it through the upgrades though.

    This thread is a few months old, does anybody know which variables hold the values?

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. GA and tracking main_page=checkout_success
    By solo_400 in forum General Questions
    Replies: 0
    Last Post: 13 May 2015, 02:03 PM
  2. Adding tracking code for analytics To Every Page?
    By fabienne in forum Basic Configuration
    Replies: 4
    Last Post: 14 Jul 2010, 08:02 PM
  3. Free E-commerce Tracking for Email Newsletters by MailChimp
    By mailchimp_api in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 7 May 2010, 07:23 PM
  4. Replies: 5
    Last Post: 27 May 2009, 07:50 PM
  5. Tracking Code on Checkout Page
    By BigMacYin in forum Managing Customers and Orders
    Replies: 0
    Last Post: 2 May 2007, 04:23 PM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR