Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Aug 2013
    Location
    Montreal
    Posts
    4
    Plugin Contributions
    0

    cart error Affiliate Pixel Tracking - Commision Junction Tracking

    Hi,

    I am being assigned to add pixel tracking codes for Commission Junction and have made a dynamic codes tracking using variables given on http://www.zen-cart.com/content.php?...filiates-Tools

    Now, the tracking works great on vllusion.com/estore (Canadian online store zencart 1.5.*, PSI gateway). You can run a test by going to: http://vllusion.com/estore/index.php...index&cPath=19 ... we use "Mini Test" product to run some test.

    The result of the tracking on that store as follow:
    <!-- BEGIN CJ TRACING CODE -->


    <div>
    <iframe frameborder='0' height='1' name='cj_conversion' scrolling='no'
    src='https://www.emjcd.com/tags/c?containerTagId=xxxx&ITEM1=109&AMT1=0.0000&QTY1=2&CID=xxxxxxxx&OID=147&TYPE=xxx xxxxx&CURRENCY=CAD&DISCOUNT=0&COUPON=0'
    width='1'>
    </iframe>
    </div>
    <!-- END CJ TRACING CODE -->


    The codes are:
    PHP Code:
    <!-- BEGIN CJ TRACING CODE -->



    <?php



            
    /* variables */

            
    $oid        $order_summary['order_number'];

            
    $currency   $order_summary['currency_code'];

            
    $coupon     = isset($order_summary['coupon_code'])?$order_summary['coupon_code']:"0";

            
    $discount   $order_summary['credits_applied'];          



            
    $itemsStr "";

            
    $i 1;

            foreach (
    $notificationsArray as $num => $product) {

                
    $itemsStr .= "&ITEM".$i."=".$product['products_id']."&AMT".$i."=".$product['products_price']."&QTY".$i."=".$product['products_quantity'];

                
    $i++;

            }



            echo 
    "

            <div>

            <iframe frameborder='0' height='1' name='cj_conversion' scrolling='no' 

               src='https://www.emjcd.com/tags/c?containerTagId=xxxx"
    .$itemsStr."&CID=xxxxxxx&OID=".$oid."&TYPE=xxxxxxx&CURRENCY=".$currency."&DISCOUNT=".$discount."&COUPON=".$coupon."' 

               width='1'>

            </iframe>

            </div>

            "


     
    ?>

    <!-- END CJ TRACING CODE -->

    now, my issue is that ..... the tracking codes are not giving the same thing when I placed it for vllusion.com/estoreusa (the USA cart store) ... I am really feeling stuck in a loop right now because it does not matter what I did the tracking codes do not work on the estore usa ..... same zencart version .... please help =(

    http://vllusion.com/estoreusa/index....index&cPath=15
    We use "vllusion test" as product

    And the result of the tracking as follow:
    <!-- BEGIN CJ TRACING CODE -->


    <div>
    <iframe frameborder='0' height='1' name='cj_conversion' scrolling='no'
    src='https://www.emjcd.com/tags/c?containerTagId=xxxx&ITEM1=84&AMT1=&QTY1=&ITEM2=84&AMT2=0.0000&QTY2=1&CID=xxxxx xxx&OID=39&TYPE=xxxxxxxx&CURRENCY=USD&DISCOUNT=&COUPON=0' width='1'>
    </iframe>
    </div>
    <!-- END CJ TRACING CODE -->

    The problems:
    1. the quantity was only 1 but it keeps appearing item1, item2, etc ... which looks like there are 2 products purchased but there was only 1.

    2. AMT1=&QTY1= , it keeps giving blank values

    The codes for the estoreusa after small tweaks (the difference are: used $zv_orders_id variables and force the currency to USD)
    PHP Code:
    <!-- BEGIN CJ TRACING CODE -->
     
    <?php
     
            
    /* variables */
            
    $oid        $zv_orders_id
            
    $currency   $order_summary['currency_code'];
            
    $coupon     = isset($order_summary['coupon_code'])?$order_summary['coupon_code']:"0";
            
    $discount   $order_summary['credits_applied'];         
     
            
    $itemsStr "";
            
    $i 1;
            foreach (
    $notificationsArray as $num => $product) {
                
    $itemsStr .= "&ITEM".$i."=".$product['products_id']."&AMT".$i."=".$product['products_price']."&QTY".$i."=".$product['products_quantity'];
                
    $i++;
            }
     
            echo 
    "
            <div>
            <iframe frameborder='0' height='1' name='cj_conversion' scrolling='no'
            src='https://www.emjcd.com/tags/c?containerTagId=xxxx"
    .$itemsStr."&CID=xxxxxxx&OID=".$oid."&TYPE=xxxxxxx&CURRENCY=USD&DISCOUNT=".$discount."&COUPON=".$coupon."' width='1'>
            </iframe>
            </div>
            "
    ;
     
    ?>
    <!-- END CJ TRACING CODE -->

  2. #2
    Join Date
    Jan 2004
    Posts
    66,380
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Affiliate Pixel Tracking - Commision Junction Tracking

    Your CJ code is based on what products your customer has selected to be notified for updates ... which populates the $notificationsArray variable.
    But, that has two problems: the customer might have selected to not enable global notification, and the storeowner might have turned that feature off. In both cases you'll get no output using the code you've chosen.

    Better would be to instantiate the order class as $order, using the order number you want info for, and then loop through the $order->products array for id, price, quantity, etc.

    Or just turn the global-product-notifications back on for that customer.
    .

    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.

  3. #3
    Join Date
    Aug 2013
    Location
    Montreal
    Posts
    4
    Plugin Contributions
    0

    Default Re: Affiliate Pixel Tracking - Commision Junction Tracking

    Global product notifications is switched on just like vllusion.com/estore so no change there.

    I am gonna try on $order->products

  4. #4
    Join Date
    Aug 2013
    Location
    Montreal
    Posts
    4
    Plugin Contributions
    0

    Default Re: Affiliate Pixel Tracking - Commision Junction Tracking

    DrByte,

    credits_applied variable does not work on estoreusa ..... any suggestion?

  5. #5
    Join Date
    Jan 2004
    Posts
    66,380
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Affiliate Pixel Tracking - Commision Junction Tracking

    credits_applied is calculated from the value of all order-total-modules which are flagged as credit-class modules, ie: ot_coupon, ot_gv, ot_group_discount

    If you don't have those enabled, then credits_applied will always be blank.
    .

    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.

 

 

Similar Threads

  1. How to add a conversion tracking pixel?
    By ulost999 in forum General Questions
    Replies: 0
    Last Post: 21 Sep 2010, 06:13 AM
  2. Replies: 1
    Last Post: 12 Jul 2009, 03:28 AM
  3. Where do I put a tracking pixel for an affilaite network?
    By beejeebers in forum General Questions
    Replies: 2
    Last Post: 27 Nov 2008, 01:48 PM
  4. Tracking pixel for Jumbo affiliates?
    By letshops in forum General Questions
    Replies: 1
    Last Post: 15 Sep 2008, 07:33 AM
  5. Help installing a tracking pixel
    By imperialis in forum General Questions
    Replies: 9
    Last Post: 19 Jul 2008, 06:40 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