Rich-text Reply

CORS issue when using custom events from within a non-iFrame colorbox

michaelw_dc 09-11-14

CORS issue when using custom events from within a non-iFrame colorbox

I am hoping someone may have an idea on how to fix this issue.

 

I've created an experiment that uses custom events.  The original is a donation form where the visitor can select one-time or monthly donations.  The variant is a redirect to the same form that displays a colorbox upon submit that asks the visitor if they wish to convert the one-time donation to a monthly donation.

 

The problem is that I've recently noticed that the custom events triggered from within the colorbox (it is not an iFrame--it displays a string of HTML I specify) generally do not get logged (upsell acceptance, upsell rejection).  Opening up Firebug console, I am seeing the following:

 

 

Tracking Optimizely Event (AU_upsell_displayed)
Donati...n=form1 (line 2000)
 
Tracking Optimizely Event (AU_upsell_conversion_success)
Donati...n=form1 (line 2000)
 
Tracking Optimizely Event (AU_monthly_donation)
Donati...n=form1 (line 2000)
 
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://1817250198.log.optimizely.com/event?a=1817250198&d=1776151720&y=false&x1883101048=1890460679... This can be fixed by moving the resource to the same domain or enabling CORS.
 
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://1817250198.log.optimizely.com/event?a=1817250198&d=1776151720&y=false&x1883101048=1890460679... This can be fixed by moving the resource to the same domain or enabling CORS.

 

Note that the first custom event does not trigger a Cross-Origin Request Blocked notice, as it is tracked just before the colorbox is displayed.  The second and third custom events are triggered from within the colorbox, which again is not an iFrame--I am specifying custom HTML and displaying it, which includes onclick handlers to log the event to Optimizely.

Amanda 09-16-14
 

Re: CORS issue when using custom events from within a non-iFrame colorbox

Hey @michaelw_dc , Since this appears to be a pretty unique issue, I am actually going to go ahead and open up a support ticket for you. The Techinical Support team will be able to look into this within your live experiment to see what's going on. 

Optimizely