jenssegers / laravel-ab

A server-side A/B testing tool for Laravel.
288 stars 46 forks source link

Compatibility with Laravel 5 #8

Open rafelsanso opened 9 years ago

garygreen commented 9 years ago

There's a number of issues with this PR, like the console commands, tests. Also I don't think @jenssegers would like to remove support for L4. I've already got both L4 and L5 working in pr #7, it's just the tests that need updating (will try and update soon).

jenssegers commented 9 years ago

I do prefer to keep support for both L4 and L5. But if it is too hard we could tag a new major release.

jenssegers commented 9 years ago

@rafelsanso @garygreen I have been looking into the PR's last night. At first I wanted to keep supporting 4.x, 5.0 and 5.1. But after writing some code I kind of want to go for a new major release specifically for Laravel 5.1 LTS. I think keeping support for all 3 Laravel versions will make the codebase unnecessary complicated. I also have some new idea's that I want to integrate.

I can make separate branches with support for older versions, but they might not have all the features of the master branch.

garygreen commented 9 years ago

@jenssegers sounds good to me. You could use my PR as a base and strip out some L5 specific stuff (mainly the Helpers). I think using Config stuff inside Tester.php is bad practise, so it would be useful to bootstrap those in the service provider, as I have done in my PR. It makes tests easier as well.

jenssegers commented 9 years ago

Guys, I want your opinion. Do you think it would be a good idea to integrate Google Analytics for stats tracking?

rafelsanso commented 9 years ago

Hi @jenssegers!

I think it's good idea. In fact, I use for statistical analytics. Style:

@if (AB::experiment('text1'))
        ga('send', 'event', 'experiments', 'homepage', 'text1');
@elseif (AB::experiment('text2'))
        ga('send', 'event', 'experiments', 'homepage', 'text2');
@endif

The advantage is we can obtain more data from Analytics visits, like the bounce rate and the number of page views.

And another thing that I see very interesting is save goals by javascript events. In my case I'm register the goal by pressing a button, not when you switch views.

garygreen commented 9 years ago

Makes sense to me. I assume it will be optional?

jenssegers commented 9 years ago

I had a lot of issues integrating it with GA @rafelsanso. Can you show me a screenshot of what the reporting looks like with the ga('send', 'event', 'experiments', 'homepage', 'text1');. You can always send it to my email address if you do want to put it public :)

rafelsanso commented 9 years ago

Of course! Now I prepare an email with the example that I have. Can you tell me your email?

jenssegers commented 9 years ago

You can send it to hello at jenssegers.be

jenssegers commented 9 years ago

Replace the at with @ and remove the whitespaces :p

rafelsanso commented 9 years ago

Some progress of the project?

bart commented 7 years ago

@jenssegers @rafelsanso Any updates on this?

isbkch commented 6 years ago

Any updates on this ?

ben182 commented 5 years ago

I published a new package for ab testing that supports laravel 5.