HappyPorch / uSplit

A/B Testing plugin for Umbraco
The Unlicense
11 stars 7 forks source link

Cannot edit experiments #13

Closed harvzor closed 7 years ago

harvzor commented 7 years ago

I created a new test using uSync between two pages.

I noticed that the test was automatically set to test page views and that I couldn't set the weight of a page (as in if one variation should start with a higher percentage of users being sent to it).

I tried editing the experiment through Google but due to the configuration of the experiment, I would not be able to save the experiment without making changes to the URLs (as Google didn't have any URLs set). However the experiment is working.

Here's the configuration:

{
  "accountId": "#######",
  "created": "2017-05-02T10:46:11.952Z",
  "description": null,
  "editableInGaUi": true,
  "endTime": null,
  "equalWeighting": null,
  "id": "#####################",
  "internalWebPropertyId": "#########",
  "kind": "analytics#experiment",
  "minimumExperimentLengthInDays": null,
  "name": "uSplit - 1200 - Contact",
  "objectiveMetric": "ga:pageviews",
  "optimizationType": "MAXIMUM",
  "parentLink": {
    "href": "https://www.googleapis.com/analytics/v3/management/accounts/########/webproperties/UA-########-1/profiles/#########",
    "type": "analytics#profile"
  },
  "profileId": "#########",
  "reasonExperimentEnded": null,
  "rewriteVariationUrlsAsOriginal": null,
  "selfLink": "https://www.googleapis.com/analytics/v3/management/accounts/#########/webproperties/UA-#######-1/profiles/########/experiments/######################",
  "servingFramework": "UNKNOWN",
  "snippet": "<!-- Google Analytics Content Experiment code -->\n<script>function utmx_section(){}function utmx(){}(function(){var\nk='########-0',d=document,l=d.location,c=d.cookie;\nif(l.search.indexOf('utm_expid='+k)>0)return;\nfunction f(n){if(c){var i=c.indexOf(n+'=');if(i>-1){var j=c.\nindexOf(';',i);return escape(c.substring(i+n.length+1,j<0?c.\nlength:j))}}}var x=f('__utmx'),xx=f('__utmxx'),h=l.hash;d.write(\n'<sc'+'ript src=\"'+'http'+(l.protocol=='https:'?'s://ssl':\n'://www')+'.google-analytics.com/ga_exp.js?'+'utmxkey='+k+\n'&utmx='+(x?x:'')+'&utmxx='+(xx?xx:'')+'&utmxtime='+new Date().\nvalueOf()+(h?'&utmxhash='+escape(h.substr(1)):'')+\n'\" type=\"text/javascript\" charset=\"utf-8\"><\\/sc'+'ript>')})();\n</script><script>utmx('url','A/B');</script>\n<!-- End of Google Analytics Content Experiment code -->\n",
  "startTime": "2017-05-02T10:50:37.291Z",
  "status": "RUNNING",
  "trafficCoverage": null,
  "updated": "2017-05-02T10:50:37.294Z",
  "variations": [
    {
      "name": "ORIGINAL",
      "status": "ACTIVE",
      "url": "1200",
      "weight": 0.5,
      "won": null
    },
    {
      "name": "Contact 2 - cabb9207-9099-4871-a6be-8afef7baf5be",
      "status": "ACTIVE",
      "url": "14239",
      "weight": 0.5,
      "won": null
    }
  ],
  "webPropertyId": "UA-#######-1",
  "winnerConfidenceLevel": null,
  "winnerFound": null,
  "eTag": "\"f7I_c57UUFPNhe6k9kg6-jYr1TI/A1FCcRjSPsSuc10-rJ6LqxV1K5I\""
}

And an image of not being able to edit the experiment:

experiment


Is this just the case with Analytics?

It seems like the URL provided is the ID of the node. which will work if you go to http://websitename.domain/ID, but doesn't seem work when editing in Analytics - the URL doesn't show up in it.

If there are long term plans with this package, it might be nice if the experimentation criteria can be set up.

ondrejpialek commented 7 years ago

Hi @HarveyWilliams,

You should be able to change the goal via GA. On your screenshot you posted there is an "edit" link on the first step of the process. This only works before you start the experiment though. Making goals selectable via uSplit is something we want to add in the future.

The weights are not editable as these are managed and updated diractly by GA. Theoretically it would be possible to add custom weighting algoritms to uSplit and disregard what weights are reported back by GA, but so far nobody requested such feature.

As for the URLs - I believe you should be able to save the experiment even with the URLs being invalid. You are correct in that we store the Page or Variation IDs as the URLs. These URLs are not meant to be valid though, uSplit does not use redirects to render experiments to visitors. All your variations will be served under the URL of the original page. uSplit simply reads the ID from the variation URL and uses that to fetch the content server side and adjust the values that are being rendered accordingly. The side effect is that preview does not work in GA, but that is expected and does not cause any issues with the experiment itself.

Hope that helps?

Cheers, Ondrej.

harvzor commented 7 years ago

This only works before you start the experiment though - Ah of course.

Creating the experiment in Umbraco, then going into Analytics to change the test works. I can next go back into Umbraco to commence the experiment.

The weights are not editable as these are managed and updated diractly by GA - I see. I thought GA allowed us to choose how much traffic goes to a page at the start, but I can now see that's wrong. It's not a requirement of mine either way.

Thanks for the help.