I'm trying to use Split Test Accelerator with amember, so I've placed this code in the header.html template, before the <html> tag (tried after too): {php} global $id, $f, $code; $id=4; include('/home/site/public_html/sta/topper.php'); {/php} Then later to get the output: {php} if ($f[1]==1) {echo $code[1];} if ($f[1]==2) {echo $code[2];} {/php} But I'm not getting anything in the output. php in smarty is running properly when I just do a simple {php} echo 'test'; {/php} Any ideas? Thanks
aMember and Split Test Accelerator I was able to merge aMember and Split Test Accelerator by coding thanks.php (not thanks.html) with this: Code: <?php $id=1; include('/home/user/public_html/sta/TY_topper.php');?>
Thanks Markus. You're solution is for the tracking of transactions, but david is asking about the "topper" code (that goes on the page he's testing & must be at the very top b/c is sets cookies) not "TY_topper" code. Why I try to put the code at the top of signup.php, I get a session error: line 1807 is "session_start();" line 1651 is "header("Content-type: text/html; charset=".$GLOBALS['_LANG'][$lang]['encoding']);" If anyone has the solution, I am in need of it as well.
I've used STA with aMember, and I haven't run into any problems with the sales page, since this usually takes place before aMember gets involved. On the sales page, I just include a link to aMember's signup page and all's good. The problem I HAVE run into is with the thank you page code, which seems to interfere with aMember's processing. When I added the TY_topper.php include statement, I did so in the thanks.php file right before the line: $t->display("thanks.html"); I haven't yet tested placing it at the top of the thanks.php file, which may fix the issue.
Let me get this straight... Here's the buying process on amember: Sales Letter -> aMember's Signup Page -> Payment Processor -> aMember's Thank You page Now, there's NO PROBLEM getting your STA work on sales letter, mainly because it's not amember's territory yet, so you just insert simple PHP lines there. But my problem is not that... I want to TEST different styles of my aMember's signup page. I want to test different colors of signup order form, different headlines, testimonials, and, of course, order page copy. To do that you have to insert your STA include code: PHP: <?php $id=14; include('/home1/public_html/sta/topper.php');?> ...and here's where all hell breaks loose, because when later you to get the output code: PHP: <?phpif ($f[1]==1) {echo $code[1];}if ($f[1]==2) {echo $code[2];}?> ...you're not getting anything in the output. Like mentioned above, even when you convert this php code into smarty, doesn't do the trick.
Tried adding: PHP: {php} $id=14; include('/home1/public_html/sta/topper.php');{/php} and PHP: {php} if ($f[1]==1) {echo $code[1];} if ($f[1]==2) {echo $code[2];} {/php} to the signup.html
Okay, I understand now -- you're testing the signup page itself and not the sales page. With STA, you have to add the topper code before ANY headers are sent, so I suspect you'll need to add it to the signup.php file, not the html template file. Try adding the topper code as the first lines in the signup.php file and see how that works.
No not yet. I put a support ticket in to the aMember guys, but all they told me so far was to add "global $id, $f, $code;" to the topper code... which I had already added from David's ORIGINAL example. And, no; it didn't help. I've added it to the top of signup.php, with no luck. --- Hold on... I think I've found a working combination!! 1. the standard topper.php code at the very top of signup.PHP - the PHP file, *not* the HTML template. 2. this line at the top of signup.HTML Code: {php}global $id, $f, $code;{/php} 3. the STA output code converted to smarty Example: Code: {php} if ($f[1]==1){echo $code[1];} {/php} {php} if ($f[1]==2){echo $code[2];} {/php} {php} if ($f[1]<1){ {/php} <!-- ERROR: $f not set --> {php} } {/php} This is currently working in my setup, on my server. I'm going to do some more testing, but I think it's going to be a winner. If you find any problems/solutions, please post them to this thread.
OMG! It works -- at least code output. I'll do some more testing and get back with results/bugs ASAP. Thank you for this, Daniel! --- One interesting thing so far... If you refresh your page the variation changes, so it seems as STA doesn't set and read cookies to display the same test variation to the same visitor. --- Yeah, somehow STA now ignores the part of creating Cookies to display the same variation to the same user. But what's even worse, without cookies you won't be able to track which your test's variation is converting. I'll try to look for the solution and report back if am able to see what's wrong here. :/
you're welcome. I'm not getting that cookie problem. I've reloaded my page 12 or times, and I see the same page each time. And, I see that the "reloads" count goes up in the STA 'report'. I'll add conversion tracking today, and let you know how that goes. --- FYI... the cookie's name is "vacookie". Example value = "a:11:{i:0;i:4654;i:1;i:0;i:2;i:0;i:3;i:0;i:4;i:0;i:5;i:0;i:6;i:0;i:7;i:0;i:8;i:0;i:9;i:0;i:10;i:0;}" --- When I delete vacookie and reload I get a new STA salesletter. I can reload several times, and I still get the same page.
I think if one sees a page generated by STA you don't want the customer to see another page when he comes back but display the same page again. I believe you need to set something as your own IP as admin, then when you reload you'll see a new page every time you do a refresh (at least that's the case with my test software).
The cookie problem apparently is a bug in STA... I have my amember's signup form installed in subdomain at http://members.domain.com/signup.php And thus it doesn't work ...but if you go to http://www.domain.com/members/signup.php everything works as it supposed to.
Default cookies behavior is that they cannot be share across domains. They have to be on the same (sub)domain to work... But there's a solution to make it work. It does require some programming: PHP: http://www.idealog.us/2006/09/php_session_coo.html ASP: http://www.15seconds.com/issue/971108.htm