Page 1 of 1
Gold R12 SR1 bots update?
Posted: Mon Oct 24, 2016 7:53 am
by AbleMods
Did I read somewhere that SR1 for R12 had some sort of update for identifying bots so bots crawling a site did not create a ton of unwanted user records?
I can't find it in the release notes, but I swear I read it somewhere and now I can't find it.
Re: Gold R12 SR1 bots update?
Posted: Mon Oct 24, 2016 9:36 pm
by jmestep
I'm not sure where the notes are, but the new code is in Services/Membership/WebUserLocator.cs
Code: Select all
if (user == null)
{
// LOOK FOR COOKIES IN REQUEST
bool foundCookies = !string.IsNullOrEmpty(request.ServerVariables["HTTP_COOKIE"]);
lock (_anonymousUserCreateLock)
{
if (foundCookies)
{
// THE USER IS NOT AUTHENTICATED OR NOT LOADED, USE THE ANONYMOUS ID AS THE USERNAME
user = UserDataSource.LoadForUserName(request.AnonymousID, true);
}
else
{
Guid guid = AlwaysConvert.ToGuid(context.Application["BOT_USER_GUID"], Guid.Empty);
if (guid == Guid.Empty)
{
guid = Guid.NewGuid();
context.Application["BOT_USER_GUID"] = guid;
}
// USE BOT USER GUID AS USER NAME
user = UserDataSource.LoadForUserName(guid.ToString(), true);
}
if (user.Id == 0)
user.Save();
}
}
Re: Gold R12 SR1 bots update?
Posted: Mon Oct 24, 2016 11:54 pm
by mazhar
It was fixed in R12 release. Check AC8-3042 in R12 change log here
http://help.ablecommerce.com/upgrades/a ... to_r12.htm
Re: Gold R12 SR1 bots update?
Posted: Mon Oct 24, 2016 11:59 pm
by AbleMods
That's what I was looking for, thanks Judy!
Thanks Mazhar, I looked there but obviously missed it ugh.
I've got a client using a marketing tool called SharpSpring. It requires a piece of javascript embedded into each page to handle page tracking. The javascript requires a unique ID for each shopper, so we've been using the shopper BasketId value as the ID parameter.
This broke after updating to R12 SR1. Most shoppers are getting the exact same ID value now. Which then breaks the SharpSpring implementation.
I don't have source for SR1, so I'll have to request it. I see changes were made to that code from R11 to R12, but can't tell if SR1 changed it again. Client was on R12, so I can only presume an SR1 change is the culprit.
Re: Gold R12 SR1 bots update?
Posted: Tue Oct 25, 2016 12:25 am
by AbleMods
Ok I've found the SR1 files, there was no change to WebUserLocator.cs between R12 and SR1. So that path didn't lead anywhere.
Mazhar: From reading the code that Judy posted, it looks as if you're using the fact a cookie exists in the request to determine that the user is a human instead of a bot.
But, every brand new shopper to the site will meet that criteria, won't they? Their very first hit to a domain they've never visited will have no cookies in their first request. So doesn't the code as written above forcibly treat the first hit of every new shopper as a bot and give them the bot ID?
I understand every subsequent hit will have a cookie since Able will pass one back to the browser at the end of the first hit. But still, this design seems very presumptuous to me.