Page 1 of 2 12 LastLast
Results 1 to 10 of 2161

Hybrid View

  1. #1
    Join Date
    Feb 2009
    Posts
    12
    Plugin Contributions
    0

    help question Re: Simple Google Analytics - Support

    Hello,

    I have installed the Google Analytics Mod and it works fine. Nevertheless, I have a small issue: My site runs in multiple domains (server-related issue).

    Google says I must add two lines to the tracking code:

    <script type="text/javascript">
    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    </script>
    <script type="text/javascript">
    var pageTracker = _gat._getTracker("UA-12345-1");
    pageTracker._setDomainName("none");
    pageTracker._setAllowLinker(true);

    pageTracker._trackPageview();
    </script>
    I already did this. Now the second thing they ask for is this:

    Next, you'll need to add the _link function to any links between the domains. Please note that your analytics tracking code and calls to _gat._getTracker (shown in Step 1) must be placed on the page above the call to _link. If your current links look like:

    <a href="https://www.secondsite.com/?login=parameters"> Login Now</a>

    change them to:

    <a href="https://www.secondsite.com/?login=parameters" onclick="pageTracker._link(this.href); return false;">Login Now</a>

    3. If you send information between domains using forms, you'll need to use the _linkByPost function. Your analytics tracking code and calls to _gat._getTracker (shown in Step 1) must be placed on the page above the call to _linkByPost.

    <form action="http://newdomain.com/form.cgi" onSubmit="javascriptageTracker._linkByPost(this)">

    This will work even for forms where the method="GET"
    How can I do this? Please help me!

    Thanks a lot!

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

    Default Re: Simple Google Analytics - Support

    Quote Originally Posted by beowulf8 View Post
    Hello,

    I have installed the Google Analytics Mod and it works fine. Nevertheless, I have a small issue: My site runs in multiple domains (server-related issue).

    Google says I must add two lines to the tracking code:



    I already did this. Now the second thing they ask for is this:



    How can I do this? Please help me!

    Thanks a lot!
    Beowulf,

    PM me and I'll work with you to get this in place.
    Eric
    20 Ways to Increase Sales Using Zen Cart
    Zen Cart contribs: Simple Google Analytics, Export Shipping Information

  3. #3
    Join Date
    Apr 2007
    Posts
    5
    Plugin Contributions
    0

    Default Re: Simple Google Analytics - Support

    Just for the record...
    there's no need for any mod...

    i have no problems whatsoever in just copying and pasting the adwords code (as generated by google) into
    the bottom of tpl_main_page.php

    just need to wait for a while to take effect

    then the next day, i checked...
    the tracking of the website is fine...

    btw, zencart is installed in root...

    tks!
    wee

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

    Default Re: Simple Google Analytics - Support

    Quote Originally Posted by firefish View Post
    Just for the record...
    there's no need for any mod...

    i have no problems whatsoever in just copying and pasting the adwords code (as generated by google) into
    the bottom of tpl_main_page.php

    just need to wait for a while to take effect

    then the next day, i checked...
    the tracking of the website is fine...

    btw, zencart is installed in root...

    tks!
    wee

    True you can do this but that method will not allow you to fully and properly track ecommerce transactions or adwords conversion tracking. What it will give you is just statistics but they won't be very useful if you don't completely add the rest of the components so you can make more informed decisions.

    If you pasted the "adwords tracking code" at the bottom of that page (you can ONLY get this code if you are running paid search and have conversion tracking turned on) you'll really have a mess on your hands when it comes to checking the effectiveness of your site. Adwords conversion tracking should only appear on the thank you page after a sale has been completed to accurately record data.

    If you added the "Google analytics tracking code" (very different from the adwords conversion tracking code) to the bottom of that page then as stated above you will only receive general stats on all pages of the site. Ecom tracking code (part of google analytics) needs to also only appear on the thank you page or it will not work.

    So it is possible to take the route you did, but your analytics data will be incomplete and provide incorrect data if you do so.
    Last edited by econcepts; 14 Apr 2009 at 07:30 PM. Reason: added clarity
    Eric
    20 Ways to Increase Sales Using Zen Cart
    Zen Cart contribs: Simple Google Analytics, Export Shipping Information

  5. #5
    Join Date
    Apr 2007
    Posts
    5
    Plugin Contributions
    0

    Default Re: Simple Google Analytics - Support

    ah...
    thanks for pointing out the subtle but very crucial difference bet. the two...

    i guess i will try to implement your code
    when i am trying out paid search to track actual conversions.

    have you implemented jrox affiliate succesfully to fully encompass the whole spectrum of internet marketing?
    i.e. does jrox affiliate tracks affiliates' conversions as well?

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

    Default Re: Simple Google Analytics - Support

    Quote Originally Posted by firefish View Post
    ah...
    thanks for pointing out the subtle but very crucial difference bet. the two...

    i guess i will try to implement your code
    when i am trying out paid search to track actual conversions.

    have you implemented jrox affiliate succesfully to fully encompass the whole spectrum of internet marketing?
    i.e. does jrox affiliate tracks affiliates' conversions as well?
    Keep in mind that the difference involves more than just paid search. If you are just posting Google Analytics tracking code into your zen cart site in the tpl_main_page.php file then you will loose the ability to track ecommerce transactions and accurately track goals. Both very important parts of the Google Analytic -- that is, if you are looking to have enough data to tell you how to make more money. If you just want statistics and are not as interested in finding out where you can generate more sales then your method will work.

    If you are using JROX then you will need to make a slight modification to the code I have. Let me know when you get to that point. JROX has you alter the footer of the checkout success page during it's install. This overrides the Google Analytics thank you page code. They both work together just fine, but you have to move the JROX code to a different page to get it to work with Google Analytics.
    Eric
    20 Ways to Increase Sales Using Zen Cart
    Zen Cart contribs: Simple Google Analytics, Export Shipping Information

  7. #7
    Join Date
    Mar 2009
    Posts
    1
    Plugin Contributions
    0

    Default Re: Simple Google Analytics - Support

    Quote Originally Posted by econcepts View Post
    Keep in mind that the difference involves more than just paid search. If you are just posting Google Analytics tracking code into your zen cart site in the tpl_main_page.php file then you will loose the ability to track ecommerce transactions and accurately track goals. Both very important parts of the Google Analytic -- that is, if you are looking to have enough data to tell you how to make more money. If you just want statistics and are not as interested in finding out where you can generate more sales then your method will work.

    If you are using JROX then you will need to make a slight modification to the code I have. Let me know when you get to that point. JROX has you alter the footer of the checkout success page during it's install. This overrides the Google Analytics thank you page code. They both work together just fine, but you have to move the JROX code to a different page to get it to work with Google Analytics.
    Hi I would like to know what the mod is for the JROX intergration so that the Analytics keep working as it should.
    Thanks

  8. #8
    Join Date
    Mar 2009
    Posts
    102
    Plugin Contributions
    0

    Default Re: Simple Google Analytics - Support

    Jeasus I'm getting tired of this! Thanks btw for helping out with the "install" instructions of the code, much appreciated!

    Anyhow, the code doesn't show up in my shop. I've read post #888 (and several more). I've narrowed it down, i.e. I know i'm working in the correct file (my_template/custom/tpl_main_page.php), but I can't get it to work anyway. To be, as far as I know, 100% sure I added two comments, namely <!-- A --> and <!-- B --> respectively.

    1. my_template/custom/tpl_main_page.php
    Code:
    <!--eof- banner #6 display -->
    <!-- A -->
    </body>
    <!-- B -->
    --> source code

    Code:
    <!--eof- banner #6 display --><!-- A --></body><!-- B --></html>
    2. my_template/custom/tpl_main_page.php
    Code:
    <!--eof- banner #6 display -->
    <!-- A -->
    <?php
    require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
    ?>
    </body>
    <!-- B -->
    --> source code

    Code:
    <!--eof- banner #6 display --><!-- A -->
    Can someone pleeeease tell me what i'm doing wrong? Since I'm seeing <!-- A --> I have to be editing in the correct file, right?

    I'm running 1.3.x and the $zv_onload is there. I'm still able to access the settings via Admin --> Configuration --> Google Analytics. I do not type the code, I copy paste it from the readme.

  9. #9
    Join Date
    Jul 2007
    Posts
    2,169
    Plugin Contributions
    16

    Default Re: Simple Google Analytics - Support

    Quote Originally Posted by scrap View Post
    Jeasus I'm getting tired of this! Thanks btw for helping out with the "install" instructions of the code, much appreciated!

    Anyhow, the code doesn't show up in my shop. I've read post #888 (and several more). I've narrowed it down, i.e. I know i'm working in the correct file (my_template/custom/tpl_main_page.php), but I can't get it to work anyway. To be, as far as I know, 100% sure I added two comments, namely <!-- A --> and <!-- B --> respectively.

    1. my_template/custom/tpl_main_page.php
    Code:
    <!--eof- banner #6 display -->
    <!-- A -->
    </body>
    <!-- B -->
    --> source code

    Code:
    <!--eof- banner #6 display --><!-- A --></body><!-- B --></html>
    2. my_template/custom/tpl_main_page.php
    Code:
    <!--eof- banner #6 display -->
    <!-- A -->
    <?php
    require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
    ?>
    </body>
    <!-- B -->
    --> source code

    Code:
    <!--eof- banner #6 display --><!-- A -->
    Can someone pleeeease tell me what i'm doing wrong? Since I'm seeing <!-- A --> I have to be editing in the correct file, right?

    I'm running 1.3.x and the $zv_onload is there. I'm still able to access the settings via Admin --> Configuration --> Google Analytics. I do not type the code, I copy paste it from the readme.
    A link to your store would help.
    Is your site Upgraded to the current version 1.5.4 Yet?
    zencart-upgrades-website-installation

  10. #10
    Join Date
    Mar 2009
    Posts
    102
    Plugin Contributions
    0

    Default Re: Simple Google Analytics - Support

    Quote Originally Posted by countrycharm View Post
    A link to your store would help.
    Thanks, but no need, it kind of resolved itself

    For other viewers: i honestly can't tell what was wrong. I had disabled the footer by uncommenting * $flag_disable_footer = true; <br /> * in tpl_footer.php; result: */ $flag_disable_footer = true; <br /> /*. I un-uncommented (uhm, made it a comment again ) the line and tried again, but placed the slashes differently; result: */ $flag_disable_footer = true;/* <br />. Woilá, it worked. Don't ask me how, but it did.

    My current source code:
    Code:
    <!--eof- banner #6 display -->
    <!-- A -->
    <script type="text/javascript">
    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    </script>
    <script type="text/javascript">
    var pageTracker = _gat._getTracker("UA-xxxxxxx-1");
    pageTracker._initData();
    pageTracker._trackPageview();
    </script></body>
    <!-- B --></html>

 

 
Page 1 of 2 12 LastLast

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