Better Analytics

Better Analytics 3.1.1

No permission to download
I upgraded to the latest version (from 2.0.1) on March 29, and instantly my sessions ballooned (nearly doubled) Is there something in the code that raises session counts? I'm not seeing anything else that would indicate a traffic surge. Pageviews for example are completely average with no fluctuations...

Screenshot at Apr 02 23-15-04.webp
 
Specific events, like email, attachment, etc spike up (of course pre March 29th there are 0):

Screenshot at Apr 03 13-29-34.webp


Overall, total events decreased March 29th, maybe because we're not tracking some with your new options?

Screenshot at Apr 03 13-33-25.webp
 
Something just occurred to me.

If you open up the DigitalPointBetterAnalytics/Model/Attachment.php file, and change this:
PHP:
DigitalPointBetterAnalytics_Helper_Analytics::getInstance()->event(
    XenForo_Application::getOptions()->googleAnalyticsWebPropertyId,
    @$customFields['analytics_cid'],
    XenForo_Visitor::getUserId(),
    @$_SERVER['REMOTE_ADDR'],
    'Attachment',
    'View',
    XenForo_Link::buildPublicLink('full:attachments', $attachment)
);

to this:
PHP:
DigitalPointBetterAnalytics_Helper_Analytics::getInstance()->event(
    XenForo_Application::getOptions()->googleAnalyticsWebPropertyId,
    @$customFields['analytics_cid'],
    XenForo_Visitor::getUserId(),
    @$_SERVER['REMOTE_ADDR'],
    'Attachment',
    'View',
    XenForo_Link::buildPublicLink('full:attachments', $attachment),
    null,
    true
);

That will prevent spiders grabbing attachment (like an image spider) from counting as a user session.

Basically just adding the null/true lines at the end there.
 
Something just occurred to me.

If you open up the DigitalPointBetterAnalytics/Model/Attachment.php file, and change this:
PHP:
DigitalPointBetterAnalytics_Helper_Analytics::getInstance()->event(
    XenForo_Application::getOptions()->googleAnalyticsWebPropertyId,
    @$customFields['analytics_cid'],
    XenForo_Visitor::getUserId(),
    @$_SERVER['REMOTE_ADDR'],
    'Attachment',
    'View',
    XenForo_Link::buildPublicLink('full:attachments', $attachment)
);

to this:
PHP:
DigitalPointBetterAnalytics_Helper_Analytics::getInstance()->event(
    XenForo_Application::getOptions()->googleAnalyticsWebPropertyId,
    @$customFields['analytics_cid'],
    XenForo_Visitor::getUserId(),
    @$_SERVER['REMOTE_ADDR'],
    'Attachment',
    'View',
    XenForo_Link::buildPublicLink('full:attachments', $attachment),
    null,
    true
);

That will prevent spiders grabbing attachment (like an image spider) from counting as a user session.

Basically just adding the null/true lines at the end there.

Ok I'll give that a shot. Other events show marked increase too (user, link, email, content). Well I guess "user" used to be "user engagement" so scratch that one. :)

Screenshot at Apr 03 14-15-42.webp
 
Yeah... well those are going to be higher because you probably weren't using them all before. Looks like you are comparing the first week with using them to a week where you weren't using them the whole time.

Let me know if that change on the attachments fixes it for you, and I'll roll it into source.
 
@digitalpoint has the text:

Advanced Analytics
Through Google Analytics, we have the ability to track things like user demographics, interests, gender, etc. which we use to build a better experience for users. Learn more about the Better Analytics add-on by Digital Point.

been phrased now? On the cookie page.

I think you mentioned it would be in the next version? And that should be this one.

/edit: yes it has, I just need to learn phrases first! :) Thanks!
 
That isn't being set by this add-on... If your web server allows for camel case URLs (without redirecting to lowercase), you probably want to set an Analytics filter like the message talks about to make them all lowercase for reporting.
 
I considered that too, but my webserver is redirecting to lowercase.

It's not a big deal--setting the filter is easy enough. My hunch is still that it's something either in Xenforo or this addon, but I completely agree it's not worth spending any time on unless others report it as an issue for them.
 
There is nowhere that we assign the domain/URL as a campaign variable anywhere, it's quite possible it's a one-off issue if a single end user did it manually (there's nothing preventing an end user or a browser plug-in or something) from doing it for some reason. Like maybe someone added it to the link they gave you from another site, so when someone clicks it, it gives you whatever arbitrary campaign variables they put in it.

If you want to figure out where it's coming from, probably a good idea to get at your raw web logs and grep them for the camelcase string it was giving you. Maybe you can see the referrer and figure out if it's a link someone is following or something.
 
There is nowhere that we assign the domain/URL as a campaign variable anywhere, it's quite possible it's a one-off issue if a single end user did it manually (there's nothing preventing an end user or a browser plug-in or something) from doing it for some reason. Like maybe someone added it to the link they gave you from another site, so when someone clicks it, it gives you whatever arbitrary campaign variables they put in it.

Oh, that makes sense. I completely forgot this is about the value in the utm_source variable--I was thinking it was the actual url. My apologies for wasting your time on this.

If you want to figure out where it's coming from, probably a good idea to get at your raw web logs and grep them for the camelcase string it was giving you. Maybe you can see the referrer and figure out if it's a link someone is following or something.

Excellent idea. I just grep'd the Nginx access log, and interestingly, all results were of the format:

Code:
"GET /forum/threads/thread-name.123/?utm_medium=twitter&utm_source=MyDomain.com HTTP/1.1" 200 13380 "-" "Twitterbot/1.0"

I'm not 100% sure, but it looks like twitterbot is following links that people post to my site on twitter, and for some reason it's appending GA variables and auto-camel-casing the domain. I have a tool that auto-tweets job postings from the site, but it's lowercase, as is the site url on the site's twitter account profile. Weird. Also weird that it's only twitterbot and not users coming in via twitter (I assume they'll have a different UA string.).
 
Well somewhere, someone had to of entered the domain like that. I really doubt they have an algorithm that would be able to "properly" camel case a domain. The effort to code it to do that would be pretty big and no real benefit.
 
@digitalpoint, we implement occasional adverts by hijacking the alert system.... is it possible to trigger an event each time an alert is viewed?
Here's hoping....
 
Ahhh.... found that option! Will monitor that. Will I be able to filter this down to alerts within analytics?
 
Ahhh.... found that option! Will monitor that. Will I be able to filter this down to alerts within analytics?
You can show just AJAX calls for the alert popup, but it doesn't track individual alerts within that popup if that's what you are trying to do?

You can see AJAX stuff like so in Google Analytics:

Behavior -> Top Events -> AJAX Request -> Event Label

Then you will see AJAX requests based on the request itself (things like alert-popup, conversation popup, etc.)
 
Top Bottom