Re: Simple Google Analytics - Support
Hi,
Got some error messages when trying to install this program... hoping you can help me out.
After step 3 I got this code on my website:
Warning: require(includes/templates/template_default/google_analytics/google_analytics.php) [function.require]: failed to open stream: No such file or directory in /home/thrift4/public_html/includes/templates/maria/common/tpl_header.php on line 109
Did I miss something in step 1?
In step 3: I added the code:
<?php
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
?> to my file as instructed (although may have added it in the wrong place) Here's a snippet of that file:
<!--bof-header ezpage links-->
<?php if (EZPAGES_STATUS_HEADER == '1' or (EZPAGES_STATUS_HEADER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { ?>
<?php require($template->get_template_dir('tpl_ezpages_bar_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_header.php'); ?>
<?php } ?>
<!--eof-header ezpage links-->
</div>
<?php
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
?><?php } ?>
FYI: I had not yet copied and pasted the googlesanalytics.sql patch into my 'Install sql patches' area yet.
Thanks for your help!
Re: Simple Google Analytics - Support
Just realized where I may have went wrong. As per the instructions:
Make sure your body tag in /includes/templates/[your_template]/common/tpl_main_page.php
includes this code:
<body id="<?php echo $body_id . 'Body'; ?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>>
The only file I had in the my_template/common was a tpl_header.php (this is the one i made changes to)
The only tpl_main_page.php file is in my template_default/common folders. Should I be editing this file and copying it over to
my_template/common files?
thanks!
Re: Simple Google Analytics - Support
I ran it on my test site with the revision I mentioned above and it seemed to work, but have one more question before I run it on my live site :blush:
When I copy & paste google sql patch into my Install sql patch area ...the Executor notes that I 'should end with ;'
However, in the googleanalytics.sql file- it ends with
#----------------------------------------
should I delete this last line before I add it to the sql.
thanks again!!
Re: Simple Google Analytics - Support
Hi,
Me again :no:
went ahead with changes mentioned above. I'm getting 'Tracking not Installed' warning from Google. My # shows up on my Page Source, so not sure where I went wrong.
Any ideas would be appreciated.
thanks!
Re: Simple Google Analytics - Support
looks like it's working now-just deleted the account # and re-entered it and now it's recieving data
sorry for all the lengthy posts....thanks anyway :smile:
Re: Simple Google Analytics - Support
Thanks for the great contrib!
Can someone tell me how to set up 'Site Search'? It's asking for a 'Query Parameter' and I'm not sure what to put. I searched the thread but didn't get any hits. Thanks!
Re: Simple Google Analytics - Support
Me again. On top of the 'Site Search' question, has anyone noticed GA missing sales? I've tried switching from 'ga.js' to 'urchin.js' and I still can't get it to track every sale. I do have GA set for ecommerce.
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:
Quote:
<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:
Quote:
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="javascript:pageTracker._linkByPost(this)">
This will work even for forms where the method="GET"
How can I do this? Please help me!
Thanks a lot!
Re: Simple Google Analytics - Support
I have installed the zencart apple template and since ten I don't receive google analytics info anymore.
Why is this?
Re: Simple Google Analytics - Support
This is a long long thread. My problem may have been resolved before but I can't find the fix.
Step 3 in the installation of the Simple Google Analytics requires a line of code to be inserted just before the </body> tag at the end of tpl_main_page.php. I did that. The code now looks like this:
Code:
<!--eof- banner #6 display -->
<?php
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
?>
</body>
And when I run the code, the page source ends like this:
Code:
<!--eof- banner #6 display -->
That's it. No analytics code. Even lost the </body> tag.
What am I missing, please.