Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Jun 2005
    Posts
    22
    Plugin Contributions
    0

    Default Code for Tracking Purposes

    I have tracking code given to me by 3 tracking sources:
    1) Shopzilla
    2) Shopping.com
    3) Conversion Ruler (for google PPC ads)

    What code should I input in order for me to be able to track my orders and sales, using the code. It's not working right now...

    Here is the code for all three in my tpl_checkout_success file:

    <!-- ConversionRuler.com ROI Performance Tracking: Orders -->
    <script language="JavaScript"
    src="https://www.conversionruler.com/bin/js.php?siteid=2670"
    ></script><script language="JavaScript">
    if (typeof cr_track != 'undefined') {cr_track(3, '<?= $order['order_total'] ?>' , '<?= $order['orders_id'] ?>' );}
    </script><noscript><img
    src="https://www.conversionruler.com/bin/tracker.php?siteid=2670&amp;actn=3&amp;nojs=1"
    width="1" height="1" style="position: absolute; left: 1px" /></noscript>
    <!-- ConversionRuler.com END -->
    <script language="JavaScript">
    var merchant_id = 'PUT_YOUR_DATA_HERE'
    var order_id = 'PUT_YOUR_DATA_HERE'
    var order_amt = 'order_total'
    var category_id = 'PUT_YOUR_DATA_HERE'
    var category_name = 'PUT_YOUR_DATA_HERE'
    var product_id = 'PUT_YOUR_DATA_HERE'
    var product_name = 'PUT_YOUR_DATA_HERE'
    </script>
    <script language="JavaScript" src="https://stat.DealTime.com/ROI/ROI.js?mid=415731"></script>
    <script language="javascript">
    <!--
    /* ROI Tracking Data */
    var mid = '138223';
    var cust_type = '';
    var order_value = '';
    var order_id = '';
    var units_ordered = '';
    //-->
    </script>
    <script language="javascript" src="https://www.shopzilla.com/css/roi_tracker.js"></script>

  2. #2
    Join Date
    Feb 2004
    Posts
    1,774
    Plugin Contributions
    14

    Default Re: Code for Tracking Purposes

    You wouldn't want to put that code into the tpl files.

    Instead you would add it to
    Code:
    /include/templates/YOUR_TEMPLATE/common/html_header.php
    towards the bottom just above the </head> tag

  3. #3
    Join Date
    May 2005
    Location
    Bath, Somerset
    Posts
    1,053
    Plugin Contributions
    3

    Default Re: Code for Tracking Purposes

    Ummm, going to need more than that I'm afraid.

    Firstly, what are you trying to do? Are you trying to track every user, or just sales?

    Secondly, what does the javascript currently do, if anything?

    Absolute

  4. #4
    Join Date
    Feb 2004
    Posts
    1,774
    Plugin Contributions
    14

    Default Re: Code for Tracking Purposes

    Quote Originally Posted by Absolute
    Ummm, going to need more than that I'm afraid.

    Firstly, what are you trying to do? Are you trying to track every user, or just sales?

    Secondly, what does the javascript currently do, if anything?

    Absolute
    ah.. mebbe ur right.. i forgot he only wanted it on his checkout success page.. it should be working the way it is then.
    Last edited by qhome; 8 Jun 2006 at 05:33 PM.

  5. #5
    Join Date
    Jun 2005
    Posts
    22
    Plugin Contributions
    0

    Default Re: Code for Tracking Purposes

    Well, it's supposed to be in the body, not the head. That is why I put it in that file. I'm trying to track the following things:

    1) Order Number
    2) Order Total in US$

    A nice bonus would be what the customer ordered, but that's not necessary. So, I guess I need a variable for the Order ID and the Order Amount. I can't find the variables I need that work here.

    Basically, I am tracking orders based on the marketing used, ie... shopping.com, shopzilla/bizrate, or Google ads.

  6. #6
    Join Date
    May 2005
    Location
    Bath, Somerset
    Posts
    1,053
    Plugin Contributions
    3

    Default Re: Code for Tracking Purposes

    It sounds like you have it in the right place, but there is something else wrong with your coding. Your variables are not returning the correct values for a start, as when you checkout, there is no SESSION['cart'], and you need to obtain the details from the database yourself. This will need to be done through a database query.

    Are none of the tracking scripts working at the moment?

    Can you post a link to the store so we can take a look?

    Absolute

  7. #7
    Join Date
    Jun 2005
    Posts
    22
    Plugin Contributions
    0

    Default Re: Code for Tracking Purposes

    Yeah, none of them are working now...

    The link to the store is http://www.smartmomma.com/zencart/index.php

  8. #8
    Join Date
    May 2005
    Location
    Bath, Somerset
    Posts
    1,053
    Plugin Contributions
    3

    Default Re: Code for Tracking Purposes

    Does the code appear in the html for the success page? What I mean is, when you place an order, and you go back to the success page, is you view the source of this page, can you see the javascript?

    It sounds like your code is either being omitted, or skipped. This could either be due to a javascript error, or its in the wrong file, or its placing within the correct file.

    Which tpl_success file have you placed this code within? What is the EXACT path to this file within your website? Which template does your site currently use?

    I didn't really want to place a test order, as even if I place one, I would have no way of checking the statistics.

    Absolute

  9. #9

    Default Re: Code for Tracking Purposes

    Dr Byte had an older post that went into a bit of detail on how to do this, but when I look at my header file, it seems that the coding for this section has been vastly changed in the current release.

    http://www.zen-cart.com/forum/showth...rsion+tracking

    Any help on this matter would be great. I know my PHP skills still suck, and messing around on my own has not panned out.

    Thanks,

    -Wayne

  10. #10
    Join Date
    Jan 2006
    Location
    Australia
    Posts
    330
    Plugin Contributions
    0

    Default Re: Code for Tracking Purposes

    Hi Everyone

    I am about to embark on a PPS campaign with Shopferret and they have given me code that needs to be placed in the Post Checkout page.

    Below is the instructions they have given me:

    Select the protocol of your post-checkout page (first page shoppers see after they have completed a purchase). Selecting the right protocol is important to avoid any warning dialogs.
    Copy the resulting code and insert it into your post-checkout page just before the closing body tag (</body>).
    Below is the code:

    The code I need to place is
    Code:
    <!-- ShopFerret Conversion Code -->
    <SCRIPT LANGUAGE='JavaScript' src='https://secure.shopferret.com.au/home?_init=cpc.js&store_key=2880&Order_ID=&Order_Value='></SCRIPT>
    Questions:

    Do I need to put this code in

    https://mywebsite/catalogue/index.ph...eckout_process as this is the page that paypal returns the customer to

    or do I need to put it in the

    https://mywebsite/catalogue/index.ph...eckout_success file

    and

    Will this code work?

    other instructions they have given me for tracking order id and order values is

    Track Order IDs and Order Values
    If you'd like to be able to view your order IDs and order values within the ShopFerret sales reports (highly recommended) then you'll need to replace the following variables in the sales tracking code with the actual values from your shopping cart:

    {Order_ID}
    {Order_Value} - Shopping cart total (before shipping, gst exclusive)

    This means integrating your shopping cart data with our sales tracking code and requires custom programming on your part.

    Question:

    How do I do this?

    Any help would be greatly appreciated!!

    TIA

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 Adding sale tracking code for price comparison website
    By louisapple in forum General Questions
    Replies: 2
    Last Post: 4 Sep 2015, 03:31 AM
  2. v139h tracking code for perfect audience
    By tomarriola in forum All Other Contributions/Addons
    Replies: 7
    Last Post: 20 Mar 2014, 12:47 AM
  3. Ecommerce Tracking code for Google Analytics
    By Endre in forum General Questions
    Replies: 7
    Last Post: 14 Nov 2012, 03:20 PM
  4. Adding tracking code for analytics To Every Page?
    By fabienne in forum Basic Configuration
    Replies: 4
    Last Post: 14 Jul 2010, 08:02 PM
  5. Adding tracking code for purchase
    By clarkeyi in forum General Questions
    Replies: 1
    Last Post: 20 Apr 2009, 11:02 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