Posted by Ken Hawkins on June 23, 2011 at 1:41pm
14 followers
| Project: | Google Analytics Statistics |
| Version: | 7.x-1.x-dev |
| Component: | Miscellaneous |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
The mandatory question: Do you know of much that prevents a D6 backport of this?
Comments
#1
+1
(Can't find something similar in Drupal 6)
#2
subscribe
#3
I think it should definitely be doable - just need to basically backport the views integration to views 2
#4
Happened upon this new module, Nice Dash.
It provides Google Analytics integration along with a dashboard for 6.x ... so there's feature bloat compared to this module. Still it may be of interest to some
http://drupal.org/project/nice_dash
#5
Ken, I just need a way to display the "most viewed" page on my site, once disabled the core "Statistics" module. The module you linked gives a google analytics panel inside my site?
#6
subscribe
#7
Subscribe, definitely!
#8
Here's a very quick and untested D6 backport. I should get a chance to test it later today.
#9
Thanks, tanc!
I'd been working with a similar idea myself, but you beat me to it with this patch ;-)
Have tested it against a site I'm building and it works fine.
#10
Hey Guys,
Let me know how this patch works and we'll get it committed.
#11
The
patch does not applynor to dev-version, nor to beta.I applied it "by hand" and I'm trying the module on a Drupal 6.20, it seems to work.
edit: the module patched seems to work, as I can configure it via
admin/settings/ga_statsand can add several Statistics fields inside my Views BUT those fields aren't showing any values ("label:" followed by nothing).#12
Here is why:
the site I was using to test the module was like http://xxx.xxx.xxx.xxx/drupal6test
And in the
ga_stats.modulethe functionga_stats_get_datais using<?phpif (!preg_match('/node\/([0-9]*)/', $alias, $matches) ) {
?>
<?phpif (preg_match('/node\/([0-9]*)/', $alias, $matches) ) {
?>
while (in my case) it should use:
<?phpif (!preg_match('/^drupal6test\/node\/([0-9]*)/', $alias, $matches) ) {
?>
<?phpif (preg_match('/^drupal6test\/node\/([0-9]*)/', $alias, $matches) ) {
?>
I'm not sure wether is an error in my configuration or it is better to modify somehow the regular expression.
#13
Updated patch.
Can you please commit it to a 6version's module?
#14
The preg_match stuff should be in a different issue, but thank you for bringing that up.
Im testing the 6.x patch right now.
#15
Awesome
#16
I'm not getting any results to show. I'm using Views 3, could that be a problem?
Edit: The problems seems to be that the data from GA is very little still.
#17
Subscribing. Patch in #13 worked for me using Views 3, thanks! I did need to manually edit the info file after patching, I'll attempt to edit the patch to reflect that, test, and upload.
#18
karljohann, is it working now that you've got some data populating your site?
#19
Scothiam, would you mind uploading your patch so we can close this out?
#20
Sorry for the delay. First patch, don't shoot me.
#21
apologies, again, first patch, getting up to speed on the patching standards. I am currently testing this patch, stay tuned.
Update: works fine for me.
#22
@twohlix I'm not quite sure how to get the data to update more regularly, we have a site with a few hudred thousand pageviews per day and at the end of the day the most popular posts still have 0 views, which is a bit off ... aside from that it seems to work fine.
#23
@scothiam your patch was done from the directory above ga_stats (which isnt right). I did a quick regex to replace the of /ga_stats/ with just / but that didnt work. Would you mind remaking the patch from the ga_stats directory? Thanks for your help with this port.
@karljohann cron controls how often ga_stats is pulling data from google analytics.
#24
sorry about that twohlix, I'll try to get a few minutes this weekend to recreate the patch correctly. Thanks, I appreciate the feedback, I'd rather learn and get it right.
#25
Try this again, sorry for the delay. I followed the steps here, http://drupal.org/node/707484
Let me know if I missed anything, again, I appreciate the feedback.
Thanks again to everyone that actually worked on this module (jec006, twohlix, ?) and the port (Balbo, tanc). Glad I can help even if only a little.
Cheers,
#26
Scothiam, awesome. Patch is made against an older version and includes stuff like:
++ //this is used because views currently lowercases field names but we're getting camelCase from google.
+ $mkl = strtolower($mk);
+
which is already in dev's latest. Would you mind rerolling the patch against latest version?
git pull before you git diff. :) Thanks a ton for the work you've been doing.
#27
oops! I'll try to get that out after 5pm today. Cheers, (sorry for the delay, putting out other fires, will get the latest dev version to create a patch against when I can get back to this)
#28
subscribing :-)
#29
Hey guys, any news on this issue? Will we have a backport (d6) of the module? Thanks :)
#30
I'm interested in backport for D6. Any news?