Optimize
2.5K members online now
2.5K members online now
Learn how to create your first experiment and get tips on creating A/B, redirect, and multivariate tests.
Guide Me
star_border
Reply

Server side testing not working

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Howdy!

 

I'm running a server-side experiment, wherein we divert 50% of traffic to a different URL. I've followed the instructions at https://developers.google.com/optimize/devguides/experiments but I'm not seeing any results. No matter what I try, the 

ga('set', 'exp', 'EXPERIMENTID1')

code does not seem to ever register any visitors to the experiment. Using the GA debug tools, I see the pageview event posted, with the corresponding `exp` property successfully sent.

 

To me, the instructions about setting a target URL of "SERVER_SIDE" seem awfully goofy, and perhaps are misdocumented?

 

Is anybody running a successful server-side experiment?

 

Andy Fowler

1 Expert replyverified_user
Marked as Best Answer.
Solution
Accepted by topic author Andy F
June

Server side testing not working

Google Employee
# 2
Google Employee

It appears you are sending slightly incorrect experiment information. 'EXPERIMENTID1' should be 'EXPERIMENTID.1' (note the period before the '1') The period separates the experiment ID from the variation ID. The suggestion of using "SERVER_SIDE" is there simply to prevent accidentally triggering the experiment if you happened to include the Optimize container on your website.

Server side testing not working

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Thank you, Jim! That did the trick. I completely missed it in the sample code: I read it as PHP's concatenation operator. I'm on track now!

 

Andy