0

My client wants to improve coupon usage in cart page which will act as a typeahead component. He wanted to test with Google Optimise(A/B testing).

Current cart page: Just a coupon textbox and apply button.

Variation: suggestion textbox(like typeahead) with the apply button.

We have developed cart page with angularjs but my client wants to create variation page only with google optimize visual editor. How can I create typeahead using optimize editor without angularjs and how to bind a value to the textbox model?

Kishan Patel
  • 778
  • 11
  • 26
Pradeep devendran
  • 489
  • 1
  • 9
  • 22

1 Answers1

0

The best approach that i can see here is to make use of a redirect test described here:

https://support.google.com/optimize/answer/6361119?hl=en

If implemented correctly the URL of you variation should be something like this ?ver=2

Now, In you angular code write a run block which will read the URL and set a flag i.e depending on whether ver=2 is present or not set the flag to true or false.

Further in you cart page create a widget for the type-ahead coupon text-box. If implemented correctly you should have 2 widgets to enter the coupon, the first should be the original and the second should be the one with type-ahead.

Lastly you need to hide/show the appropriate widget based on the flag created above.

Hope this points you in the right direction, Cheers!

Jonathan Dsouza
  • 568
  • 1
  • 5
  • 17