How to do a button conversion on different pages, to test which button gets more clicks.

Want to test a few different buttons and see which button is clicked more? The simplest way is to add the same class to every one of those buttons, then use that class as the selector for an Element Clicked conversion. It doesn’t matter which page each button sits on - the conversion fires wherever it’s clicked.

Set it up

  1. Add a class of your own to each button you want to count, for example book-now-btn. Every builder has a field for this - in most it’s on the Advanced tab, under CSS Classes.
  2. Go to AB Split Test > New Test and set your test up as usual.
  3. Under the conversion goal, choose Element Clicked from the Goal Trigger dropdown.
  4. Enter your class as the selector, with a leading dot: .book-now-btn
  5. Start the test.

Every click on any element carrying that class now counts as a conversion for this test, on any page of the site.

Counting each button separately

If you want to know which of several different buttons gets clicked more - rather than counting them all together - give each one its own class and set them up as sub-goals instead. The primary conversion stays as your real outcome (a sale, a booking, a form submission) and each button gets its own sub-goal, so you can see the click counts side by side without losing sight of what actually mattered.

 

Leave a Comment

You must be logged in to post a comment.