Better Analytics

Better Analytics 3.1.1

No permission to download
The session is never guaranteed (in the pre_dispatch listener or otherwise). Even the standard XenForo_Controller::_setupSession() method checks to see if the session is available before it tries to do anything with it.

As far as checking if the session exists in pre_dispatch not working or not having any affect, that's absolutely incorrect. This works perfectly fine within the controller_pre_dispatch listener:
PHP:
if (XenForo_Application::isRegistered('session'))
{
    $session = XenForo_Application::getSession();
    // do whatever you want to do with the session.
}

Nothing in the registry is guaranteed... it's the whole point of having things like the isRegistered() and getWithFallback() methods.

Either way, session (and other registered items) isn't always there... which is why you need to check to make sure they exist before trying to sue them (same thing with "cache", but that's more common to not be available since it's not even enabled by default in XF).

No, as I said it ( /misc/a.js ) is not even on my server and not in your install package.
Right... it's not supposed to be a static file. Just like the URI of "community/threads/better-analytics.58746" here isn't a file either.
 
@digitalpoint
Using the below code in the pre_dispatch listener to avoid to continue my custom modification didn't work and your addon was still triggering the error. My custom modification was of course after the condition.
PHP:
    if (!XenForo_Application::isRegistered('session'))
     {
       return;
     }

What did work was to disable other listeners from your addon:
PHP:
  protected function _preDispatchFirst($action)
 {
      XenForo_CodeEvent::removeListeners();
 }


Feel free to try yourself. If you find that the the registered check is working as you think it is, I will look at it again. All I know is during my last attempt it wasn't.
 
how come i cannot see my analytics report under my account?
MEcG47R.png


it say it not setup? what is there to setup? and where?
 
The problem with a blanket removing listeners, is you then start blindly messing with things (other addons) that really I should not be touching. There certainly *are* things you would want certain addons to be doing (so you would want their listeners to be working).

how come i cannot see my analytics report under my account?
MEcG47R.png


it say it not setup? what is there to setup? and where?
Oops... missing phrase there (well it's there, but wasn't assigned to right addon, so it didn't become part of the package). Fixed for next version.

This is what the phrase is *supposed* to say: "Analytics reporting is not set up (it's done under Admin -> Options -> Statistics and Metrics)"
 
well i have it set up as far as i can.. if its the charts thing it required me to have VIP on ur site <-- if this is the configuration you are referring. and its to expensive in my opinion...

$25 a month rip off...

yearly is overkill...

for us its like $45 a year other forums about $60 a year which is fair in my opinion..
the idea is to get as many members paying not scaring them off with the high values...

why not build the API integration into the add one? or make it a premium ver of the add one one time payment...
 
well i have it set up as far as i can.. if its the charts thing it required me to have VIP on ur site <-- if this is the configuration you are referring. and its to expensive in my opinion...

$25 a month rip off...

yearly is overkill...

for us its like $45 a year other forums about $60 a year which is fair in my opinion..
the idea is to get as many members paying not scaring them off with the high values...

why not build the API integration into the add one? or make it a premium ver of the add one one time payment...
Yep... I wouldn't expect anyone to get premium membership just to be able to use our reporting server. It's basically just intended as an additional free benefit for *existing* premium members.

I would have rather built it into the addon, but the support it would require is way outside the scope of the $5 total I've ever made from this addon. lol Because you would need to help people set up new developer projects under Google's Developer Console, help them manage credential generation, enable the right APIs, etc, etc...

So I took the easier route and just allow users to utilize our reporting server that we already have in place for other things. For example users selling sites/domains are able to link their Analytics account in read-only mode to automatically display data without them needing to get into the complexities of making API calls and authenticating those calls. An example of this (AdSense data too in this domain's case): https://marketplace.digitalpoint.com/hindisonglyrics-info.258000/domain

Unfortunately there's no easy way to utilize the Google APIs without going through the complexities of creating projects and credentials in the Google Developer Console unless it's done via OAuth2 through a central project (which is how it's done against our reporting server).

Truthfully, nothing it gives you is anything you can't get from normal reporting in Google Analytics, so it's not a big deal anyway.
 
I've upgraded to the the 2.0 version yesterday and since then Google Analytics isn't tracking anymore! :(
 
We removed minify in the end (and the rewrite which redirected .js calls) and everything is fine, now.
Seems like server configuration might be an issue for a few people.
 
We removed minify in the end (and the rewrite which redirected .js calls) and everything is fine, now.
Seems like server configuration might be an issue for a few people.

its most likely due to strict rules. when ever i have such issues its due to something in htaccess file..
or the php handler i remember i had encoding issues or something similar how the url was being served up to the client due to fastCGI
the issue was resolved after some debugging with the author of the add one and he changed a few things within the add one to get it work...

i suggest the workaround be permanent in the next update as about 25% t0 50% of us using this may be having such issues.
 
working fine for me but low traffic on active right now is usually normal for us..

depends what time of day it is...

this is with the fix/solution provided (work around)

g0OtB.png

g0OwL.png
 
For those with server configuration issues that disallow the use of a "virtual" .js file there is a new option that lets you run the JS code inline on your page like in the old version.

upload_2015-2-17_11-49-22.webp

It also should help those that have third party addons installed that try to interact with the user's session without checking if it exists.

The Reporting API calls no longer rely on PHP curl extensions being installed (instead it's using the Zend HTTP Client system which should work with whatever underlying method is available on your server.

Less support for me. :)
 
Oops... missing phrase there (well it's there, but wasn't assigned to right addon, so it didn't become part of the package). Fixed for next version.

This is what the phrase is *supposed* to say: "Analytics reporting is not set up (it's done under Admin -> Options -> Statistics and Metrics)"
I am not seeing this or the option on my site, what am I missing here? The newest version 2.01 is installed.

Thanks!
 
Here is what I am seeing in my Statistics and Metrics screen. Am I missing something or is that Profile Tab shown above ONLY if we are using your API? (Sorry some of these things get confusing) :)
 

Attachments

  • whatiamseeing.webp
    whatiamseeing.webp
    51 KB · Views: 12
Yeah... The charts on the profile tab is via reporting API. It will still show you computers being shared by multiple users regardless.

If you don't see the tab at all, go to usergroup permissions and enable it for your usergroup.
 
Back
Top Bottom