Two other changes in addition to this that are (probably) necessary b/c Weebly inserts its own GA tracker on your pages.
[1] In your analytics tracker code, you need to add a custom domain (in this case, along with the prefix). So right after your
_gaq.push(['my._setAccount', 'UA-12345678-0']);
add the following:
_gaq.push(['my._setDomainName', 'your-domain-name-whatever-it-is']);
So now your GA tracker code should start with something like the following:
var _gaq = _gaq || [];
_gaq.push(['my._setAccount', 'UA-12345678-0']);
_gaq.push(['my._setDomainName', 'your-domain-name-whatever-it-is']);
_gaq.push(['my._trackPageview']);
NOTE: that _setDomainName is what Google would tell you to do by default had you told Google that you were actually tracking a subdomain. In this case, your Weebly site is (most likely) a subdomain of weebly.com e.g. my-domain-name.weebly.com
[2] In your Content Experiments (CE) code, you have to tell Google to use this "other" domain. Otherwise, it uses the default domain (which seems to be Weebly's domain).
To do this, look at your CE code. It probably begins something like this:
function utmx_section(){}function utmx(){}(function(){var
k='12345678-0',d=document,l=d.location,c=d.cookie;
if(l.search.indexOf('utm_expid='+k)>0)return;
blah-blah-blah
Insert the following line immediately after the comment and before the function:
_udn = "your-domain-name-whatever-it-is"
So now your CE code looks like this:
<!-- Google Analytics Content Experiment code -->
<script>_udn = "your-domain-name-whatever-it-is"</script>
<script>function utmx_section(){}function utmx(){}(function(){var
k='12345678-0',d=document,l=d.location,c=d.cookie;
if(l.search.indexOf('utm_expid='+k)>0)return;
blah-blah-blah
Last important point.
The CE code appears ONLY on the "primary" or "A" version of your AB test page. Put this code in the "Header" of the page by going to Weebly's "Advanced Settings" for the "A" version of your AB test page.
However, the CE code must appear before your analytics tracker code
Weebly's tracker code is (helpfully, for this purpose) in the footer of every page. So Weebly's tracker code will not interfere with your AB Test code. However, if you use Site Settings to put your analytics tracker code onto every page of your Weebly site, then you probably want to use the Site Settings FOOTER (capitalized for emphasis) and not the header. Weebly appears to put Site Settings headers above (in front of) page specific headers. Content Experiments will choke on this. If you really want your Analytics tracker code in the header of every page (and there are some reasons for this having to do with counting bounces etc.) then you probably will need to manually paste your tracker code onto every page header using Advanced Settings. When you get to the "A" version of your AB test page, simply remember to paste your tracker code AFTER your CE code.