473,568 Members | 2,898 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A/B split testing on PHP built website

Hello guys,

I want to do kinda of an A/B split testing on a website I run. I just
created a new version but I need to keep both version running and see
which one will perform better. First, I'm not sure if I'm in the right
group.
How can I randomly let a user enter from the index.php page and keep
the same URL. So the splitting is being done in the backend, I don't
want the users to see for example in the url /new/index.php and /
index.php.

Thank you.
Sep 27 '08 #1
21 2484
Message-ID:
<21************ *************** *******@k30g200 0hse.googlegrou ps.comfrom
FadĄ contained the following:
>How can I randomly let a user enter from the index.php page and keep
the same URL. So the splitting is being done in the backend, I don't
want the users to see for example in the url /new/index.php and /
index.php.
Use include() to randomly include either A or B
--
Geoff Berrow 011000100110110 0010000000110
001101101011011 001000110111101 100111001011
100110001101101 111001011100111 010101101011
http://slipperyhill.co.uk - http://4theweb.co.uk
Sep 27 '08 #2
On Sep 27, 12:54*pm, Geoff Berrow <blthe...@ckdog .co.ukwrote:
Message-ID:
<21f49151-796b-4e87-aae3-081058595...@k3 0g2000hse.googl egroups.comfrom
FadĄ contained the following:
How can I randomly let a user enter from the index.php page and keep
the same URL. So the splitting is being done in the backend, I don't
want the users to see for example in the url /new/index.php and /
index.php.

Use include() to randomly include either A or B
--
Geoff Berrow *01100010011011 00010000000110
001101101011011 001000110111101 100111001011
100110001101101 111001011100111 010101101011htt p://slipperyhill.co .uk-http://4theweb.co.uk
Aha I see what you mean. But let's say each of the versions are in a
folder (new and old folders). I created index.php that would randomly
give access the index.php in the new and old folders?

Thanks for the help
Sep 27 '08 #3
FadĄ wrote:
On Sep 27, 12:54 pm, Geoff Berrow <blthe...@ckdog .co.ukwrote:
>Message-ID:
<21f49151-796b-4e87-aae3-081058595...@k3 0g2000hse.googl egroups.comfrom
FadĄ contained the following:
>>How can I randomly let a user enter from the index.php page and keep
the same URL. So the splitting is being done in the backend, I don't
want the users to see for example in the url /new/index.php and /
index.php.
Use include() to randomly include either A or B
--
Geoff Berrow 011000100110110 0010000000110
00110110101101 100100011011110 1100111001011
10011000110110 111100101110011 1010101101011ht tp://slipperyhill.co .uk-http://4theweb.co.uk

Aha I see what you mean. But let's say each of the versions are in a
folder (new and old folders). I created index.php that would randomly
give access the index.php in the new and old folders?

Thanks for the help
You can't do that from PHP - it's handled by the server before PHP ever
gets involved.

Geoff's suggestion is the best from the PHP end. Otherwise you're
looking at the server.

But the real question here is - why do you need this? Is there a
problem with the current site?

And beware - if you're on a shared host, any measurements will be
subject to the load the other sites are also placing on the server, as
well as network traffic, etc.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===

Sep 27 '08 #4
Message-ID:
<7d************ *************** *******@e39g200 0hsf.googlegrou ps.comfrom
FadĄ contained the following:
>Use include() to randomly include either A or B
>Aha I see what you mean. But let's say each of the versions are in a
folder (new and old folders). I created index.php that would randomly
give access the index.php in the new and old folders?
Yes. You'll need to use the <basetag if you are using folders.
--
Geoff Berrow 011000100110110 0010000000110
001101101011011 001000110111101 100111001011
100110001101101 111001011100111 010101101011
http://slipperyhill.co.uk - http://4theweb.co.uk
Sep 28 '08 #5
Geoff Berrow wrote:
Message-ID:
<7d************ *************** *******@e39g200 0hsf.googlegrou ps.comfrom
FadĄ contained the following:
>>Use include() to randomly include either A or B
>Aha I see what you mean. But let's say each of the versions are in a
folder (new and old folders). I created index.php that would randomly
give access the index.php in the new and old folders?

Yes. You'll need to use the <basetag if you are using folders.
It doesn't help. By the time the <basetag takes effect, the page is
already loaded.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===

Sep 28 '08 #6
On Sep 27, 11:12*pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
Geoff Berrow wrote:
Message-ID:
<7d4a2c89-d9ad-44c8-a168-9a9d71e44...@e3 9g2000hsf.googl egroups.comfrom
FadĄ contained the following:
>Use include() to randomly include either A or B
Aha I see what you mean. But let's say each of the versions are in a
folder (new and old folders). I created index.php that would randomly
give access the index.php in the new and old folders?
Yes. *You'll need to use the <basetag if you are using folders.

It doesn't help. * By the time the <basetag takes effect, the page is
already loaded.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attgl obal.net
=============== ===
well sorry if i didn't make myself clear :S i appreciate the help :)
I'm going to explain the scenario. I have the new website in the /
wwwroot/ folder and the old one in a folder inside the new website
called v2 because the new site it's the v3. I want any user when he
types www.mydomain.com for example to go randomly either to wwwroot/
index.php or to wwwroot/v2/index.php. Each one of the sites would have
different analytics so that i can see the performance of both (A/B
split testing).

Please let me know if I need to clarify even more.

thanks a lot!!
Sep 28 '08 #7
FadĄ wrote:
On Sep 27, 11:12 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
>Geoff Berrow wrote:
>>Message-ID:
<7d4a2c89-d9ad-44c8-a168-9a9d71e44...@e3 9g2000hsf.googl egroups.comfrom
FadĄ contained the following:
Use include() to randomly include either A or B
Aha I see what you mean. But let's say each of the versions are in a
folder (new and old folders). I created index.php that would randomly
give access the index.php in the new and old folders?
Yes. You'll need to use the <basetag if you are using folders.
It doesn't help. By the time the <basetag takes effect, the page is
already loaded.

--
============== ====
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attg lobal.net
============== ====
well sorry if i didn't make myself clear :S i appreciate the help :)
I'm going to explain the scenario. I have the new website in the /
wwwroot/ folder and the old one in a folder inside the new website
called v2 because the new site it's the v3. I want any user when he
types www.mydomain.com for example to go randomly either to wwwroot/
index.php or to wwwroot/v2/index.php. Each one of the sites would have
different analytics so that i can see the performance of both (A/B
split testing).

Please let me know if I need to clarify even more.

thanks a lot!!
As I said - you can get a load balancer and place them on two different
servers, then compare the statistics between them. Or, you can do like
Geoff suggested and include one set of files or the other.

But you never told us WHY you need such a thing. Is the current site
having performance problems?

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===

Sep 28 '08 #8
On Sep 28, 9:47*am, Jerry Stuckle <jstuck...@attg lobal.netwrote:
FadĄ wrote:
On Sep 27, 11:12 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
Geoff Berrow wrote:
Message-ID:
<7d4a2c89-d9ad-44c8-a168-9a9d71e44...@e3 9g2000hsf.googl egroups.comfrom
FadĄ contained the following:
Use include() to randomly include either A or B
Aha I see what you mean. But let's say each of the versions are in a
folder (new and old folders). I created index.php that would randomly
give access the index.php in the new and old folders?
Yes. *You'll need to use the <basetag if you are using folders.
It doesn't help. * By the time the <basetag takes effect, the pageis
already loaded.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attgl obal.net
=============== ===
well sorry if i didn't make myself clear :S i appreciate the help :)
I'm going to explain the scenario. I have the new website in the /
wwwroot/ folder and the old one in a folder inside the new website
called v2 because the new site it's the v3. I want any user when he
typeswww.mydoma in.comfor example to go randomly either to wwwroot/
index.php or to wwwroot/v2/index.php. Each one of the sites would have
different analytics so that i can see the performance of both (A/B
split testing).
Please let me know if I need to clarify even more.
thanks a lot!!

As I said - you can get a load balancer and place them on two different
servers, then compare the statistics between them. *Or, you can do like
Geoff suggested and include one set of files or the other.

But you never told us WHY you need such a thing. *Is the current site
having performance problems?

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attgl obal.net
=============== ===
Well the old website was not performing well, up to the client's
expectation so we made a new version of the site. But still we need to
have both online to measure the performance of the new site.
First, I thought it would be something easy. Like create an index.php
file that would randomly formard the user request to either /v2/
index.php (old) or /v3/index.php (old). But the issue here is that
even with this forward I still want to user to see /index.php instead
of /v2 or v3/index.php and the same for all the other files in both
folders. So I want it to be transparent for the users.

What do you think? can it be done without a load balancer and the use
of 2 different servers?
As I understood Geoff mentioned the use of include. So if I understand
correctly i would have to create for each file in the folders v2/v3 a
file that would be the root folder and that would randomly include v2
or v3?

Thanks again!
Sep 28 '08 #9
FadĄ wrote:
On Sep 28, 9:47 am, Jerry Stuckle <jstuck...@attg lobal.netwrote:
>FadĄ wrote:
>>On Sep 27, 11:12 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
Geoff Berrow wrote:
Message-ID:
<7d4a2c89-d9ad-44c8-a168-9a9d71e44...@e3 9g2000hsf.googl egroups.comfrom
FadĄ contained the following:
>>Use include() to randomly include either A or B
>Aha I see what you mean. But let's say each of the versions are in a
>folder (new and old folders). I created index.php that would randomly
>give access the index.php in the new and old folders?
Yes. You'll need to use the <basetag if you are using folders.
It doesn't help. By the time the <basetag takes effect, the page is
already loaded.
--
============ ======
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@at tglobal.net
============ ======
well sorry if i didn't make myself clear :S i appreciate the help :)
I'm going to explain the scenario. I have the new website in the /
wwwroot/ folder and the old one in a folder inside the new website
called v2 because the new site it's the v3. I want any user when he
typeswww.mydo main.comfor example to go randomly either to wwwroot/
index.php or to wwwroot/v2/index.php. Each one of the sites would have
different analytics so that i can see the performance of both (A/B
split testing).
Please let me know if I need to clarify even more.
thanks a lot!!
As I said - you can get a load balancer and place them on two different
servers, then compare the statistics between them. Or, you can do like
Geoff suggested and include one set of files or the other.

But you never told us WHY you need such a thing. Is the current site
having performance problems?

--
============== ====
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attg lobal.net
============== ====

Well the old website was not performing well, up to the client's
expectation so we made a new version of the site. But still we need to
have both online to measure the performance of the new site.
First, I thought it would be something easy. Like create an index.php
file that would randomly formard the user request to either /v2/
index.php (old) or /v3/index.php (old). But the issue here is that
even with this forward I still want to user to see /index.php instead
of /v2 or v3/index.php and the same for all the other files in both
folders. So I want it to be transparent for the users.
Why wasn't the old site performing well? Did you do any analysis to see
what the problem was, or did you just write a new site, hoping it would
perform better?
What do you think? can it be done without a load balancer and the use
of 2 different servers?
As I understood Geoff mentioned the use of include. So if I understand
correctly i would have to create for each file in the folders v2/v3 a
file that would be the root folder and that would randomly include v2
or v3?

Thanks again!
Not unless you use the include() method Geoff indicated.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===

Sep 28 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
31164
by: Stu Cazzo | last post by:
I have the following: String myStringArray; String myString = "98 99 100"; I want to split up myString and put it into myStringArray. If I use this: myStringArray = myString.split(" "); it will split myString up using the delimiter of 1 space so that
2
12805
by: SL_McManus | last post by:
Hi All; I am fairly new to Perl. I have a file with close to 3000 lines that I would like to split out in a certain way. I would like to put the record type starting in column 1 for 2 spaces, the employer code in column 23 for 29 spaces and employer description in column 53 for 30 spaces. I have tried modifying an existing file with no real...
2
2214
by: middletree | last post by:
Not really sure what the problem is, perhaps I am using split wrong. Page should get form fields form previous page and some of them will go into a tabel called Personal. Other items, to resolve a many-to-many relationship, will go into a table called PersonalPeople, which consists of 2 fields: the PK's from the People table and the Perosnal...
2
1385
by: Jay | last post by:
Well this is my function to split the data into its own lines Sub preSift(ByVal input As String) Dim spl() As String spl = New String() {} spl = Split(input, ControlChars.NewLine) ', , CompareMethod.Text)
2
2652
by: Ruud Ortmans | last post by:
Hi, I developed an "Contact Us" - page with VS 2005 and ASP.NET 2.0. By clicking the send button the following code is executed: Configuration config = WebConfigurationManager.OpenWebConfiguration(Request.ApplicationPath); MailMessage mailBericht = new MailMessage(txtbxEmailadres.Text.Trim(),
9
2306
by: martinskou | last post by:
Hi, I'm looking for something like: multi_split( 'a:=b+c' , ) returning: whats the python way to achieve this, preferably without regexp? Thanks.
8
1431
by: Eric | last post by:
I've spent some time this morning looking into unit testing frameworks for ASP.NET 2.0, but none seem satisfactory. I don't have Visual Studio Team Edition, so apparently I can't use Microsoft's solution, and TestDriven.net has no support for web applications. The best I have found is to use NUnit on the .dll that is created when the site...
2
2842
by: dmeglio | last post by:
Hello, I've just ported an ASP.NET project from VS 2003 to 2008. In 2003, I was using NUnit to test. Under 2008, I don't get a single DLL for my website, so I can't use NUnit anymore. Additionally, I'd prefer to use the built in VS2008 Pro tools. I don't want to actually test ASPX functionality, rather I have several classes that are in my...
0
1235
by: Alexnb | last post by:
Timothy Grant wrote: well I can tel you it didn't work for me. In fact I didn't see the code you posted on there, I ended up figuring it out on my own with a little help from the missing manual for urllib2. Also, being rude is kinda stupid because you don't have to help in the first place... -- View this message in context:...
0
7693
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7604
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8117
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7660
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6275
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5498
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2101
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.