Google Analytics Content Experiments A/B testing server-side code without page refresh -


Actually, we want 2 separate page layout headers for A / B testing. There are some structural differences (this is not just closing the CSS) We also want to decide that Google should not wait to see the difference in the visitor to flip the coin to find out; Instead, we want to select variation server-side and want to avoid a page redirect.

What do I hope for the code given below; This UTX cookie generates the same way as Google-generated Javascript if I do not leave it from the head tag.

Server-side PHP code:

  Public function setUtmxCookie ($ cookieName, $ experimentsString) {$ domainHash = $ this- & gt; GetDomainHash ($ _ SERVER ['SERVER_NAME']); $ CookieVal = $ domainHash $ ExperimentsString; $ End = time () + 60 * 60 * 24 * 30; $ Domain = '.' . $ _SERVER ['SERVER_NAME']; Setcookie ($ cookie name, $ cookie well, $ expired, '/', $ domain); } Private work getExperimentsFromUtmxCookie ($ cookieName) {if (isset ($ _ cookie [$ cookieName])) {$ cookieVal = $ _COOKIE [$ cookieName]; $ ExperimentsArray = array (); $ ExperimentMatches = preg_split ('/../', $ cookieVal); $ DomainHash = array_shift ($ experimentMatches); // Remove the first item which will be in all the $ experiment matches, it is an array of experimentIds with its combos. Foreign Currency ($ experimentMatches as $ m) {$ Segment = preg_split ('/: /', $ m); $ Experiments $ [Segment [0]] = $ Segment [1]; } Return $ ExperimentsArray; } Return array (); } Private Function getExperimentsString ($ cookieName, $ experimentId, $ variation) {$ experiment = $ this- & gt; GetExperimentsFromUtmxCookie ($ cookieName); $ Experiment [$ experimentId] = $ variation; $ ExperimentsString = ''; Forex currency ($ experiment as $ key = & gt; $ val) {$ experimentsString = '.' . $ Key ':' $ Vals; } Return $ experimentsString; }   

Why are not my Google Analytics Content Experiments Dashboard showing to any visitors in my experiment? Did I set up the UTX cookie unsuccessfully? Besides setting UTMX cookies, is GACE looking for other things?

We are completely using different perspectives for the last two months: Amazon load- Balancers (AWS ELB) plus Google Analytics (not content use). (See my comment above.) As we were hoping, we have improved our experience with the merger back in the trunk.

  _gaq.push (['_ setCustomVar', 2, varName, varValue, 2]); // https: //developers.google.com/analytics/devguides/collection/gajs/gaTrackingCustomVariables _gaq.push (['_ trackPageview']); // It will come after the set CustomVar // varName whatever you want to call the experiment / varValue original and something like "original" for "variation" should be different. We only use "trunk" and [name of diversity branch].   

There are obvious drawbacks that Google does not do the math for us (telling us what the difference is statistically Significant performance) and we can not run many experiments easily at a time. We will not even be able to do many forms (we want the load-balanced examples we want).

But for our purposes (for example, how important it is to us that no page is fresh), it works better than other methods.

Comments