Rich-text Reply

Custom events not firing for url redirect variations

rktitan 02-11-15

Custom events not firing for url redirect variations

I have a set of custom goals that fire off when the user interacts with the page. In the editor it states the events are firing, however when I actually test this on the page, the results page shows that nothing has happened (or even that a visit has been made). The redirects are the same page, but the variations have a querystring appended to them and show different contant. 

Level 1

Brian_Abad 02-12-15
 

Re: Custom events not firing for url redirect variations

Thanks for your question!

We have a knowledge base article that details the process of checking whether tracking calls are sent to Optimizely after a user conducts the desired behavior (such as clicks), which you can find here: https://help.optimizely.com/hc/en-us/articles/201862554-Your-Pre-Launch-Checklist-QA-your-experiment...

This will be the most accurate indicator that a goal has been set up correctly and is recorded within Optimizely.

For redirect experiments, a few extra steps are needed in order to track click goals on the redirected pages. Another knowledge base article outlines that in full here: https://help.optimizely.com/hc/en-us/articles/200040675-Redirect-experiments-Test-separate-URLs-#cli...

Please let us know if we can help with anything else or if I've misunderstood your question!
---
Brian Abad
Manager, Technical Support
Customer Success
Optimizely
Tuuli 10-09-15
 

Re: Custom events not firing for url redirect variations

[ Edited ]

Could you tell me about how you managed to work around this issue?

 

I'm seeing this same issue on a form submission event in a cross-domain experiment. I've set JavaScript for the experiment, that increments the conversions when a form with a given class gets submitted. This works fine on page versions on the original domain, but does not work for a variation that is a cross-domain experiment. The JS I have is the following:

window['optimizely'] = window['optimizely'] || [];

$("form.action, form.ak-form").submit(function(){
  alert('submit');
  window.optimizely.push(["trackEvent", "champaign_petition_signature"]);
});

The alert is in because in both cases, form submission triggers a redirect - this allows me to keep an eye on whether the custom JS got called. In the case of the redirect experiment, the alert never shows up. What does work fine also on the redirect variation is a cross-domain click goal I set earlier (so there is a cross-domain event that is working all right), and an event goal. Only the custom goal isn't getting triggered.

Level 1