Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Dec 2008
    Posts
    63
    Plugin Contributions
    0

    Default Shopzilla Tracking Code Placement?

    Hey Everyone!!

    I'm just setting up my store www.baselinesoftware.com on shopzilla and other comparison shopping sites, and I need some help getting this tracker working correctly. Here is what shopzilla says:



    Code Integration

    It's easy to add the Shopzilla Performance Tracker to your website, just follow these steps:

    1. Copy the code in the box below.
    2. Paste the code anywhere on your store's receipt page. The receipt page appears after an order is completed, so the Shopzilla Performance Tracker will not interfere with your store's checkout process.
    3. Populate the values in the code. For more information on populating the values in the code, please continue reading after the box.

    Tracker Code

    <script language="javascript">
    <!--
    /* Performance Tracking Data */
    var mid = '******';
    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>

    The Performance Tracker code allows you to pass five data points back to Shopzilla:

    * Your Shopzilla Merchant ID (required)
    * The Order Value (strongly recommended)
    * The Order ID (recommended)
    * Whether the customer is new or repeat (recommended)
    * The Number of Units Ordered (optional)

    Your Shopzilla Merchant ID has already been added to the code above and does not change. The remaining four values are dynamic and must be populated by code on your site. Your IT department should be able to easily write a script to populate these four variables.

    Name: Shopzilla Merchant ID (var MID)
    Purpose: Allows Shopzilla to correctly identify the order activity with Baseline Software.
    Value to Enter: Your MID is ****** and has been added to the code. DO NOT ALTER the "var mid" value in the code above.
    Benefits: Your Merchant ID allows Shopzilla to correctly identify the order activity with Baseline Software.

    Name: Order Value (var order_value)
    Purpose: Specifies dollar value of an order.
    Value to Enter: The total amount of the order without formatting. If the order value is $1,200.38, then populate the "var order_value" with '1200.38'. Do not include dollar signs or commas.
    Benefits: Passing Order Value allows you to view Sales Revenue, Average Order Value, and Cost of Sale for Shopzilla-generated sales. This information is necessary to determine which products are driving sales at your store.

    Name: Order ID (var order_id)
    Purpose: Specifies merchant order identification number associated with an order.
    Value to Enter: The unique tracking number associated with an order. It can be numbers, letters, or both.
    Benefits:

    The Order ID will help should any troubleshooting needs arise but will not be visible in your Shopzilla Performance Report.
    Name: Customer Type (var cust_type)
    Purpose: Specifies whether the order is from a New or Repeat customer.
    Value to Enter:

    For a new customer, populate the var cust_type with '1'. For a repeat customer, populate the var cust_type with '0'.

    Only a 1 or a 0 is accepted in this field!

    For an easy way to tell if a customer is new or repeat, check to see if the customer's email address already exists in your database.
    Benefits: Passing Customer Type will allow you to see how many new customers were generated from your Shopzilla campaign and to determine the cost per new customer acquisition.

    Name: Units Ordered (var units_ordered)
    Purpose: Specifies the number of units of merchandise associated with an order.
    Value to Enter: Enter the number of units of merchandise that make up the order. For example, if someone orders a sweater, a shirt and a hat, the units ordered would be 3.
    Benefits: This value assists you when performing order value analysis.

    You may choose to add the code in the above box "as is" and pass only the Merchant ID, but this will only provide conversion information. We strongly recommend including at least the order value ("var_order_value") so that you can determine your cost of sale. You need to know your cost of sale in order to manage and optimize your campaign effectively.
    Performance Tracker Script Example

    The code sample below illustrates how the Shopzilla Performance Tracker Script might look after populating all the eligible fields with relevant data from an order. After integrating the Performance Tracker, you should see a similar piece of code when viewing the source code of your receipt page:

    <script language="javascript">
    <!--
    /* Performance Tracking Data */
    var mid = '204008';
    var cust_type = '1';
    var order_value = '1349.18';
    var order_id = '928641';
    var units_ordered = '3';
    //-->
    </script>
    <script language="javascript" src="https://www.shopzilla.com/css/roi_tracker.js"></script>

    In the example above:

    * MID (Merchant ID) is 204008 (this is your Shopzilla MID; never alter this MID!)
    * The order value is $1,349.18.
    * The order id is 928641
    * The order was from a new customer (represented by 1 in the var cust_type field)
    * The number of units ordered is 3.

    Does anybody have any idea how I would go about doing this?

  2. #2
    Join Date
    Jun 2008
    Posts
    187
    Plugin Contributions
    0

    help question Shopzilla Tracking Code Help

    Hey all,

    right im trying to add our shopzilla tracking code to the checkout success page,

    proposed code:

    PHP Code:
    <?php
    $cn_orders 
    "SELECT count( orders_id ) FROM orders WHERE customers_id = '$customer_id'";
    $cn_orders_result $db->Execute($cn_orders);
    if 
    $cn_orders_result <= '1'{
    $cn_orders_final '1';
    }
    else{
    $cn_orders_final '0';
    }
    ?>
    <script language="javascript">
    <!--
        /* Performance Tracking Data */
        var mid            = '000000';
        var cust_type      = '<?php echo $cn_orders_final ?>';
        var order_value    = '<?php echo round($orders->fields['order_total'], 2); ?>';
        var order_id       = '<?php echo (int)$orders->fields['orders_id']; ?>';
        var units_ordered  = '<?php echo sizeof($order->products); ?>';
    //-->
    </script>
    <script language="javascript" src="https://www.shopzilla.com/css/roi_tracker.js"></script>
    I know 'mid' 'order_value' and 'order_id' i know all work as i've tested this.

    I'm just trying to sort these last two fields and need a little bit of help.

    I need 'cust_type' to display either a '0' or a '1' depending on if they have ordered before. So as i see it the above code should display a 0 if they have ordered 1 time or more, or a 1 if they have never ordered before.

    for 'units_ordered' i saw on another post (http://www.zen-cart.com/forum/showth...e+number+items) that this piece of code should work for displaying number of items:

    PHP Code:
    <?php echo sizeof($order->products); ?>
    i basically just want to know if im right about these two things or if the extra bit of php code i added to find number of times the person has ordered is already present on the checkout screen before i implement this.

    regards

    Andy.

  3. #3
    Join Date
    Jul 2006
    Posts
    84
    Plugin Contributions
    0

    Default Re: Shopzilla Tracking Code Help

    Andy,
    Looks like it's been a long time since you posted this, and nobody answered - did you get it hashed out? I'm trying to do the same, and would be honored if you'd share the integrated code?

  4. #4
    Join Date
    Jul 2006
    Posts
    84
    Plugin Contributions
    0

    Default Re: Shopzilla Tracking Code Help

    Coming back ... Andy, I applied the code exactly as given above, and the customer type and units ordered did NOT parse ... see below (taken from the source code of the checkout_success page after I successfully placed an order)

    <script language="javascript">
    <!--
    /* Performance Tracking Data */
    var mid = '000000';
    var cust_type = '';
    var order_value = '26.48';
    var order_id = '4638';
    var units_ordered = '0';
    //-->

    </script>
    <script language="javascript" src="https://www.shopzilla.com/css/roi_tracker.js"></script>

  5. #5
    Join Date
    Jun 2008
    Posts
    187
    Plugin Contributions
    0

    Default Re: Shopzilla Tracking Code Help

    Hi fmckinnon,

    apologies on the delay coming back to you been on 'holiday'.

    i had actually completely forgotten about this, so much so i went back into checkout confirmation page and found that i had actually removed it :O.

    Apologies if the code i suggested did not give you the outcome you were looking for.

    Just been told i need to relook at this anyway so as soon as i come up up with a solution ill update this thread :)

    Andy.

  6. #6
    Join Date
    Jun 2008
    Posts
    187
    Plugin Contributions
    0

    Default Re: Shopzilla Tracking Code Help

    Hey again,

    right i think i've done some code that seems to work for me.


    PHP Code:
    <?php 
    //Zilla ROI Code
    $zilla_oid = (int)$orders->fields['orders_id'];

    $cn_orders "SELECT count( orders_id ) AS zilla FROM orders WHERE customers_id = '" . (int)$_SESSION['customer_id'] . "'"
    $cn_orders_result $db->Execute($cn_orders); 


    if (
    $cn_orders_result->fields['zilla'] <= '1'){ 
    $cn_orders_final '1'

    else{ 
    $cn_orders_final '0'


    $cn_items "SELECT count( orders_id ) AS zitems FROM orders_products WHERE orders_id = '" $zilla_oid ."'"
    $cn_items_result $db->Execute($cn_items); 
    $zitems =  $cn_items_result->fields['zitems']; 


    ?> 
    <script language="javascript"> 
    <!-- 
        /* Performance Tracking Data */ 
        var mid            = '000000'; 
        var cust_type      = '<?php echo $cn_orders_final?>'; 
        var order_value    = '<?php echo round($orders->fields['order_total'], 2); ?>'; 
        var order_id       = '<?php echo $zilla_oid?>'; 
        var units_ordered  = '<?php echo $zitems?>';
    //--> 
    </script> 
    <script language="javascript" src="https://www.shopzilla.com/css/roi_tracker.js"></script>
    I'm not really sure what i was thinking with that code i posted before (brain dead moment).

    hope this helps
    Andy.

  7. #7
    Join Date
    Jul 2006
    Posts
    84
    Plugin Contributions
    0

    Default Re: Shopzilla Tracking Code Help

    Thanks a ton .. I'll try it!

  8. #8

    Default Re: Shopzilla Tracking Code Placement?

    sartor,
    I'm having the same problem. Did you ever figure this out? Also I use Volsion not Zen Cart. But I do beleive that the solution is similar, if not the same. Thanks!

  9. #9
    Join Date
    Feb 2007
    Posts
    1,704
    Plugin Contributions
    0

    Default Re: Shopzilla Tracking Code Placement?

    trying to do the same myself...

  10. #10
    Join Date
    Jan 2006
    Posts
    6
    Plugin Contributions
    0

    Default Re: Shopzilla Tracking Code Help

    Andy_GS,

    Tried your fix - but I get an error message:

    1146 Table 'cb_zc1.orders' doesn't exist
    in:
    [SELECT count( zen_orders_id ) AS zilla FROM orders WHERE customers_id = '1']


    cb_zc1 is the correct database, however I note that the "orders" table is titled "zen_orders". I am not that good at this? Any ideas how to fix?

    Thanks
    nuin

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v138a Facebook and Twitter tracking code placement
    By 007mcfod in forum General Questions
    Replies: 1
    Last Post: 24 Aug 2014, 01:48 AM
  2. v150 How to install Shopzilla revenue tracking script?
    By sephowin in forum General Questions
    Replies: 4
    Last Post: 16 Jan 2014, 10:54 PM
  3. Script for Shopzilla "performance tracking"
    By marvin in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 10 Nov 2009, 04:28 AM
  4. Shopzilla tracking in Worldpay integration
    By crazycucumber in forum Addon Payment Modules
    Replies: 1
    Last Post: 24 Apr 2007, 09:13 AM
  5. Tracking Code placement - Shopzilla
    By crazycucumber in forum General Questions
    Replies: 0
    Last Post: 3 Apr 2007, 08:29 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR