Results 1 to 10 of 2161

Hybrid View

  1. #1
    Join Date
    Dec 2005
    Posts
    1,509
    Plugin Contributions
    6

    Default Re: Simple Google Analytics - Support

    Quote Originally Posted by dw08gm View Post
    Apologies if this has been answered before in this long thread, however...

    I created a new page called "main", which has its own "tpl_main_page.php" in \includes\templates\mytemplate\main\ because its layout is different from all other pages.

    (Background: This new page was originally the homepage of my old site, but upon migrating the site to zen cart, "index.php" has become the homepage. Wishing to retain the content and layout of the old homepage, I had to create a new page called "main".)

    1. Just before the </body> at the bottom of the "main" page, I inserted the following code as instructed:

    Code:
    <!-- Google Analytics 1-2-3 start-->
    <?php
    if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
    // Do nothing
    } else {
    require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
    }
    ?>
    <!-- Google Analytics 1-2-3 end-->
    and then removed the "/" before "google_analytics.php".

    2. I then placed a copy of "google_analytics.php"
    from
    includes\templates\mytemplate\google_analytics\
    into
    \includes\templates\mytemplate\main\

    However, while the above throws no errors and because my zen cart is still under development on localhost, I have no idea whether the above actually works on a live site or indeed is the correct way to invoke google analytics for this one page.

    Comments/Criticisms most appreciated.
    This is one way to do it. The way to see if it will work is to look at the page on your local server and simply "view source" (from the browser). If you see the Google Analytics code on the page you're all set.
    Eric
    20 Ways to Increase Sales Using Zen Cart
    Zen Cart contribs: Simple Google Analytics, Export Shipping Information

  2. #2
    Join Date
    Sep 2008
    Location
    DownUnder, overlooking South Pole.
    Posts
    984
    Plugin Contributions
    6

    Default Re: Simple Google Analytics - Support

    Quote Originally Posted by econcepts View Post
    This is one way to do it. The way to see if it will work is to look at the page on your local server and simply "view source" (from the browser). If you see the Google Analytics code on the page you're all set.
    Hi econcepts. Thanks for your prompt reply.

    Yes, the code does appear in view source.

    On further thought, however, I am wondering how else to access the original google_analytics.php in includes\templates\mytemplate\google_analytics\.

    It seems I only need to change the "$current_page_base" in the following code at the bottom of my new tpl_main_page.php to reference /mytemplate/, but which is currently rendering as "main" .

    Code:
    require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . 'google_analytics.php');
    Any thoughts or solutions.

  3. #3
    Join Date
    Dec 2005
    Posts
    1,509
    Plugin Contributions
    6

    Default Re: Simple Google Analytics - Support

    Quote Originally Posted by dw08gm View Post
    Hi econcepts. Thanks for your prompt reply.

    Yes, the code does appear in view source.

    On further thought, however, I am wondering how else to access the original google_analytics.php in includes\templates\mytemplate\google_analytics\.

    It seems I only need to change the "$current_page_base" in the following code at the bottom of my new tpl_main_page.php to reference /mytemplate/, but which is currently rendering as "main" .

    Code:
    require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . 'google_analytics.php');
    Any thoughts or solutions.
    If the code is showing on you page when you view source then you should have to change anything. The tracking is installed correctly.
    Eric
    20 Ways to Increase Sales Using Zen Cart
    Zen Cart contribs: Simple Google Analytics, Export Shipping Information

  4. #4
    Join Date
    Jun 2005
    Location
    Portland, OR
    Posts
    189
    Plugin Contributions
    0

    Default Re: Simple Google Analytics - Support

    Searching through threads and trying to find an answer - hoping someone here can help. It seems that no matter if I use this module or I'm inserting analytics code manually, ALL orders placed through paypal or check/money order aren't being tracked by google. Only my credit card transactions.

    Is anyone else seeing this? I'm using the standard IPN paypal module. Thanks and apologies if this has been covered.

  5. #5
    Join Date
    Dec 2005
    Posts
    1,509
    Plugin Contributions
    6

    Default Re: Simple Google Analytics - Support

    If none are being tracked then there has to be a problem with how you are returning the users to the site after a successful order. The only way Google (r any other tracking system on your site) will ever be able to track a sale from a site like PayPal is if the customer returns to your site after the sale. If they don't all you'll see if them 'leaving' (going to paypal) and never returning.

    I have worked with hundreds of sites that use PayPal and all track just fine with Google Analytics. I would highly recommend you use the Simple Google Analytics module to insert the code on your site. Manually inserting if not done correctly (you don't just insert the code in one spot for it to work) will get you undesired results.
    Eric
    20 Ways to Increase Sales Using Zen Cart
    Zen Cart contribs: Simple Google Analytics, Export Shipping Information

  6. #6
    Join Date
    Jun 2005
    Location
    Portland, OR
    Posts
    189
    Plugin Contributions
    0

    Default Re: Simple Google Analytics - Support

    Manually inserting if not done correctly (you don't just insert the code in one spot for it to work) will get you undesired results.
    thanks for your help and advice. still searching on why this is happening. i've been using the module to track conversions for several months now and scrolling back, I do see orders being tracked, just not all of them and usually paypal orders.

    to address your last point, do you mean to say I can't just paste the google conversion tracking code into my checkout success page and be done with it? what else would i be missing?

  7. #7
    Join Date
    Jul 2010
    Location
    Australia
    Posts
    231
    Plugin Contributions
    0

    Default Re: Simple Google Analytics - Support

    For proper conversion tracking, can you plewase advice what setting this shouyld be set to?

    Provide details about the page where this conversion will be tracked.

    Page security level HTTP or HTTPS

    Thanks a lot!

  8. #8
    Join Date
    Dec 2005
    Posts
    1,509
    Plugin Contributions
    6

    Default Re: Simple Google Analytics - Support

    Quote Originally Posted by bi11i View Post
    thanks for your help and advice. still searching on why this is happening. i've been using the module to track conversions for several months now and scrolling back, I do see orders being tracked, just not all of them and usually paypal orders.

    to address your last point, do you mean to say I can't just paste the google conversion tracking code into my checkout success page and be done with it? what else would i be missing?
    A few things ...

    1) The only "conversion tracking" script Google provides you with either relates directly to Adwords or Optimizer. There is no 'conversion script' for Analytics. Analytics automatically tracks your conversions if you have the proper code in place.

    This module places the proper code in the right locations (even for Google Adwords conversion tracking) throughout the site and on the 'checkout success' pages.

    So if you go and manually try to add the code to those page(s) you'll conflict with what is already in place.


    2) If talking about Google Analytics, then the 'added tracking' which would be placed on the checkout success page is the 'ecommerce tracking'. However, this too is already inserted along with my module, so no need to manually add that either.


    3) If you just place the conversion tracking script that Google gave you (for Adwords of course) on your thank you page, you might track a conversion, but you won't have the dynamic tracking ability that my script provides. So instead of getting an order for $50 (as an example) recorded as $50, you'll get an order, but it will likely show either $1 or "$0" for the value.

    The module I've built automatically takes the order information and adds it to the proper locations to be tracked.


    In short, everything you need to track all types of transactions is included with the Simple Google Analytics module. You shouldn't have to place any tracking code manually anywhere on the site. Doing so could conflict with what is already being tracked.

    If you added manual code you likely caused a conflict. I would recommend removing the manually inserted code and letting the module do the work for you.
    Eric
    20 Ways to Increase Sales Using Zen Cart
    Zen Cart contribs: Simple Google Analytics, Export Shipping Information

 

 

Similar Threads

  1. v150 Simple Google Analytics .sql error !
    By Miff in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 10 Feb 2012, 11:33 PM
  2. Simple Google Analytics-not working
    By RobertG in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 11 Nov 2010, 06:07 PM
  3. Simple (From Google) Analytics Install
    By DagLindt in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 26 May 2009, 10:46 PM
  4. Simple google analytics- help
    By Pet Herbal Remedies in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 1 Oct 2008, 10:37 PM
  5. Simple Google Analytics not working
    By jvanree in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 29 May 2008, 03:46 AM

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