开发者

Fire javascript after GWO serves it through multivariate test

开发者 https://www.devze.com 2023-04-12 20:02 出处:网络
Our marketing team are asking to test an entire new booking flow on our site through Google Website Optimizer. In order for this to work, test participants will need to have;

Our marketing team are asking to test an entire new booking flow on our site through Google Website Optimizer. In order for this to work, test participants will need to have;

  • Various different links around the site (to change from basket1 to basket2)
  • A form to change its action (from add-to-basket to add-to-basket2)

Initially thoug开发者_C百科ht of doing this with JQuery and doing a MV test to alter the attributes like this and get google to serve this code to test participants;

<script type = "text/javascript">
    $(document).ready(function() {
        var addLink = "add-to-basket2.aspx";
        $("#basketTopLink").attr("href", addLink);
        $("#frmBooking").attr("action", addLink);
        //and so on...
    });
</script>

Which works fine on my dev machine when i comment/uncomment it, but I guess I haven't been getting enough sleep lately because I forgot that of course this won't fire when google serves the content! So my questions are;

  • Is there any way to get the site to fire that javascript after it's served back from GWO?
  • If not, has anyone ever performed a MV test which required DOM attributes to be changed as part of the test and if so, how did you manage this?
0

精彩评论

暂无评论...
验证码 换一张
取 消