Rich-text Reply

crash when creating new click goals

georgec 06-16-16

crash when creating new click goals

Whenever I tried to create new cilck golas, it crashed. There's no way I can make a custom cilck goal in this case?

Screen Shot 2016-06-16 at 3.08.01 PM.png
Level 1

AllisonR 06-17-16

Re: crash when creating new click goals

Can you please let me know either the experiment id or the URL of the page you're trying to create goals on? It sounds like there might be a script on the site blocking Optimizely from loading it. In the meantime, a way around setting up click goals through the Visual Editor is to set up custom event goals instead. 


You can bind a custom event using Experiment Javascript. The jQuery .delegate method can be used to "attach a handler to one or more events for all elements that match the selector, now or in the future." This means that the following line of code will attach the custom event to an element regardless of when it is available on the page.


$("html").delegate("#buttonID", "mousedown", function() { 
   window.optimizely.push(["trackEvent", "eventName"]); 


The element's selector and the custom event name will need to be filled into the above template. You can read more about custom events here.


Does this help? 

Sr. Technical Support Engineer
Optimizely | EMEA
georgec 06-23-16

Re: crash when creating new click goals

Hi Allison,


Thanks for the quick response! This is the url I'm testing. You have to get through the firewall. Can you help me locate the issues? It seems like setting up any custom goals crashes Optimizely. Thanks!

Level 1
Trancton 09-16-16

Re: crash when creating new click goals

[ Edited ]

I have the exact same problem. It crashes in all browsers on all machines. I am trying to add goal tracking on a click using a selector; $("[data-automation-id=offerDropInButton]", "[data-automation-id=mainDropInButton]")

It crashes every time, every where (as in different browsers, OS, and computers). It seems to crash whenever I move the marker away from the input field of the selector, not necessarily when I try to save the goal. If I click anywhere else in the "window" for setting up the goal, it locks up.

Level 1