Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16
  1. #11
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: E-commerce tracking code in checkout_success page

    If your tracking tools are google tools, there are already a few full-featured addons that will take care of sending analytics data by installing them to your store.

    If you're building your own, you can use the variables available in tpl_checkout_success as posted here: http://www.zen-cart.com/forum/showthread.php?t=131900
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  2. #12
    Join Date
    Nov 2008
    Posts
    164
    Plugin Contributions
    0

    Default Re: E-commerce tracking code in checkout_success page

    Quote Originally Posted by DrByte View Post
    If your tracking tools are google tools, there are already a few full-featured addons that will take care of sending analytics data by installing them to your store.

    If you're building your own, you can use the variables available in tpl_checkout_success as posted here: http://www.zen-cart.com/forum/showthread.php?t=131900
    I had seen the "simple google analytics" but figured it would be easier to do it myself...

    Just went ahead and installed it, configured it, and everything looks to be not-broken. Let's see if it still works tomorrow.

  3. #13
    Join Date
    Nov 2008
    Posts
    164
    Plugin Contributions
    0

    Default Re: E-commerce tracking code in checkout_success page

    It works great. Except for Paypal, which doesn't trigger the checkout_success page.

  4. #14
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: E-commerce tracking code in checkout_success page

    Quote Originally Posted by bobthemolder View Post
    It works great. Except for Paypal, which doesn't trigger the checkout_success page.
    PayPal Express Checkout *does* trigger the checkout-success page, which is another good reason to use the more sophisticated Express Checkout module instead of the older "IPN/Standard" module.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #15
    Join Date
    Jun 2005
    Posts
    12
    Plugin Contributions
    0

    Default Re: E-commerce tracking code in checkout_success page

    We're also confused by this.

    It seems obvious that we will need to replace the text in quotes below with a variable. Does anyone have the exact code with variables as it should be used in Zen Cart?

    Thanks


    pageTracker._addItem(

    "1234", // Order ID

    "DD44", // SKU

    "T-Shirt", // Product Name

    "Green Medium", // Category

    "11.99", // Price

    "1" // Quantity

    );

  6. #16
    Join Date
    Nov 2008
    Posts
    164
    Plugin Contributions
    0

    Default Re: E-commerce tracking code in checkout_success page

    Quote Originally Posted by ckalech View Post
    We're also confused by this.

    It seems obvious that we will need to replace the text in quotes below with a variable. Does anyone have the exact code with variables as it should be used in Zen Cart?

    Thanks


    pageTracker._addItem(

    "1234", // Order ID

    "DD44", // SKU

    "T-Shirt", // Product Name

    "Green Medium", // Category

    "11.99", // Price

    "1" // Quantity

    );
    I was wondering about this too, but Simple GA already has it:
    From simpleGoogleAnalytics\includes\templates\your_template\google_analytics\google_a nalytics.php
    For Item Details:
    echo "
    pageTracker._addItem(
    \"". $order->fields['orders_id'] ."\",
    \"". $products->fields['skucode'] ."\",
    \"". $products->fields['products_name'] ."\",
    \"". $category->fields['categories_name'] ."\",
    \"". number_format($products->fields['final_price'], 2, '.', '') ."\",
    \"". $products->fields['products_quantity'] . "\"
    );
    ";
    For Transaction details:
    pageTracker._addTrans(
    \"" . $order->fields['orders_id'] . "\",
    \"". GOOGLE_ANALYTICS_AFFILIATION ."\",
    \"". $google_analytics['ot_total'] ."\",
    \"". $google_analytics['ot_tax'] ."\",
    \"". $google_analytics['ot_shipping'] ."\",
    \"". $order->fields['city'] ."\",
    \"". $order->fields['state'] ."\",
    \"". $order->fields['country']."\"
    );
    ";

 

 
Page 2 of 2 FirstFirst 12

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

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