Optimize
4.7K members online now
4.7K members online now
Understand the information in your Optimize reports and in your Google Analytics reports.
Guide Me
star_border
Reply
Highlighted

onClick tracking for Original variant

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I'm running an experiment to see if rearranging content blocks on our homepage will increase CTA clicks.

I have JS that will fire an event on CTA click:

 

$('.deals-carousel .btn').click(function(e) {
  ga('send','Homepage Blocks', 'Block Content Clicked', 'Deals Carousel');
});
$('.best-sellers-carousel .btn').click(function(e) {
  ga('send','Homepage Blocks', 'Block Content Clicked', 'Best Sellers Carousel');
});

 

I plan to implement this for the variations by targeting <head> and adding a JavaScript change.

But as far as I can tell, you can't make changes to the Original variation. Is there any way to add overall JS to an experiment?

 

What if I just add these handlers to our site code? This would obviously cause the events to trigger for any visitors, but will Opitimize only report these events for users who were bucketed into the experiment?

 

Thanks in advance for any insights anyone can provide.