Google analytics and PBAS 4.3 new store

Discussion in 'News & Announcements' started by cirrusadmin, Aug 21, 2013.

  1. cirrusadmin

    cirrusadmin Bit Poster

    Messages:
    7
    Dear Support

    We have been using PBAS for many years and we have had integrated the old store with Google Analytics Ecommerce Tracking.

    The file we used to change to make the integration work was a template file called confirmation.inc.

    With the new store there seems to be a file called confirmation.php.html but we are not able to find the proper session variables to make the integration work.

    Here is the google help, https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingEcommerce

    Please advise how this can work and what variables should be called.
     
  2. FedorK

    FedorK Mega Poster

    Messages:
    224
    Hello,

    Yes, you can use confirmation.php.html template, variables which you need for this:

    Code:
    $_SESSION['order']
                      ['id']
                      ['doc_num']
                      ['doc_date']
                      ['description']
                      ['detail_list']
                                   [i]
                                       ['comment']
                                       ['quantity']
                                       ['unit']
                                       ['rate']      // unit price
                                       ['duration'] // period
                                       ['discount']
                                       ['amount']
                                   [i+1]
                                       ['comment']
                                       ['quantity']
                                       ['unit']
                                       ['rate']
                                       ['duration']
                                       ['discount']
                                       ['amount']
                      ['doc_total']
                                     
    $_SESSION['account']
                             ['address']
                                   ['address1']
                                   ['address2']
                                   ['city']
                                   ['state'] or ['state_alt']
                                   ['country_loc']
    Also you can dump any variables by:
    sw_log (dumper($_SESSION['order']));

    All dumped information will be in:
    /var/log/hspc/store.log
     
  3. cirrusadmin

    cirrusadmin Bit Poster

    Messages:
    7
    Hello Thanks for the reply how do you know the the detail_list length?
     
  4. FedorK

    FedorK Mega Poster

    Messages:
    224
  5. cirrusadmin

    cirrusadmin Bit Poster

    Messages:
    7
    Can you also please tell me what has to be set as the goal URL in new store? it used to http://<pbas url>/store/confirmation.php
     
  6. dkolvakh

    dkolvakh Odin Team

    Messages:
    343
    New Store use single page design, so url will be the only one, https://<yourdomain.tld>/shop/<lang_id>/
    By the way, to render different stages of shopping process, like index, configuration, checkout, payment, confirmation, different templates are used. Possibly this will help.
     
    Last edited: Sep 17, 2013
  7. scardus01

    scardus01 Kilo Poster

    Messages:
    31
    Check out the "Identical URLs Across Multiple Steps" section of https://support.google.com/analytics/answer/1116091 - This is what I'm using to track hits to the plan groups, payment, checkout, payment & confirmation pages.

    Sean
     

Share This Page