average session length as variable for custom algo

Post Reply
Fett
Posts: 85
Joined: Tue Feb 28, 2017 1:23 pm

average session length as variable for custom algo

Post by Fett »

Greetings,

Is it possible to have average session length as a variable for custom algo?

Studying Google Analytics, it looks like that there are often times huge size trades (=very big number of sessions) that however have a terrible avg. session duration (example: avg.session length < 5 seconds)

Clearly enough, the higher is the avg.session length, the more valuable is the trade since it means "real" surfers versus hitbots. So this is great way to detect trades who mix hitbots with real traffic.

So if we can put this in a variable, then we can put this variable into algo and give it some weight!

It would be fantastic, because I think right now SCJ does not detect hitbots does it?

By hitbots I mean a session with a clicks (or many clicks) where session duration is < 1 second, so clearly not human surfer.
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: average session length as variable for custom algo

Post by admin »

Hi, yes if you already use "php eval" (sorry, i don't remember exactly if we already talked about it)

$d['day']['time_spent']
Don't forget to run script update
Fett
Posts: 85
Joined: Tue Feb 28, 2017 1:23 pm

Re: average session length as variable for custom algo

Post by Fett »

Amazing. SCJ is the most advanced trade script no doubt.
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: average session length as variable for custom algo

Post by admin »

Thank you )
Don't forget to run script update
Fett
Posts: 85
Joined: Tue Feb 28, 2017 1:23 pm

Re: average session length as variable for custom algo

Post by Fett »

Just for clarification, the number this variable gives is

A, the sum of seconds by all sessions in the last 24 hours from this trade
B, the average session length in seconds in the last 24 hours from this trade (sum of seconds by all sessions/number of sessions)

I haven't yet printed results of formula I am on my phone. Thank you.
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: average session length as variable for custom algo

Post by admin »

B )
Don't forget to run script update
Fett
Posts: 85
Joined: Tue Feb 28, 2017 1:23 pm

Re: average session length as variable for custom algo

Post by Fett »

I have implemented avg.session duration into custom algo. It works good.

However on one of my sites I see 'Time Spent On Site' column is 0.00 for all trades. How is this possible?
Fett
Posts: 85
Joined: Tue Feb 28, 2017 1:23 pm

Re: average session length as variable for custom algo

Post by Fett »

hmm its ok looks like it just needed some time
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: average session length as variable for custom algo

Post by admin »

Ok
Don't forget to run script update
Post Reply