Rich-text Reply

Multiple Selectors in Single Click Goal

seoehealth 10-20-16
Accepted Solution

Multiple Selectors in Single Click Goal

[ Edited ]

Hello,

 

Is there a way to have 2 or more selectors in a single click goal?

 

The reason I'm asking is that one of my variations has a button with a different selector even though the CTA buttons are essentially the same.

 

I'd rather see if it's possible through Optimizely vs editing the webpage directly to rename the selectors so they match.

 

At the moment, I created two goals

- clicks on .zip-action-btn

- clicks on #continue-btn 

 

When I run them as separate goals it shows one variation as both the winner and loser for essentially the same thing.

 

Assuming there is a way to track multiple selectors, do the custom event names need to be defined differently?

 

Thanks!!

rockymcg 10-21-16
 

Re: Multiple Selectors in Single Click Goal

[ Edited ]

Hi seoehealth,

 

It is possible to add multiple selectors to a goal in Optimizely. This is detailed in our knowledgebase here.

 

Best,

Rocky

 

Optimizely
robertchan 10-24-16
 

Re: Multiple Selectors in Single Click Goal

You can totally track both of your elements as one click goal. To make things organised, I like to add a class for multiple elements that I know will feed to one click goal. In your case, for example, I would do something like the following:

$('.zip-action-btn').addClass('opt-some-name');
$('#continue-btn').addClass('opt-some-name');

Now, for your click tracking, you can just use .opt-some-name and it will track those elements.
Robert Chan

Experimentation Hero
bogdanc 05-07-17
 

Re: Multiple Selectors in Single Click Goal

The link you posted doesn't work I have spent the last 2 hours trying to figure this out in Optimizely X - at this point I am starting to think it's a POS compared to Classic - REALLY FRUSTRATED
Level 1
sbussard 3w ago
 

Re: Multiple Selectors in Single Click Goal

your link is broken rockymcg
Level 2
rockymcg 3w ago
 

Re: Multiple Selectors in Single Click Goal

bogdanc-

Sorry to this has been a frustrating process. Optimizely X does allow for multiple selectors in a single click goal, but it is a bit more of a manual process. First, you'll need to find the selector for each element you'd like to track. You can either do this by clicking on the element in the editor, copying the selector that is shown in the selector field, and taking note of it somewhere like a text document— or you can use the Chrome dev tools to inspect the element and copy the selector. Once you've got all the selectors you'd like to track, you just need to comma-separate them (ex: #header, .column, #button) in the selector box.

We do have plans to add the shift click functionality from Classic to the X UI, but it hasn't been implemented yet.

Let me know if this helps. Keep in mind you are entitled to support; so you're always welcome to log a support ticket from the help menu when you're logged into Optimizely.

Best,
Rocky
Optimizely
rockymcg 3w ago
 

Re: Multiple Selectors in Single Click Goal

sbussard,

Thanks for the heads up! Not sure how that happened. I've fixed the link.

Best,
Rocky
Optimizely