Rich-text Reply

Test works on Chrome and FF but not Safari

nguyendylan92 02-28-19

Test works on Chrome and FF but not Safari

[ Edited ]

Looking to get help from specifically Optimizely devs/support. I'm currently working through a test for my company and it works fine on Chrome and FF but not on Safari. Checked the console and there doesn't seem to be any errors that are out of the ordinary or that would break the functionality that i've put on the test. Any help is greatly appreciated.

JasonDahlin 02-28-19
 

Re: Test works on Chrome and FF but not Safari

Depending on your perspective, Optimizely doesn't do a good job of letting you know when the code inside the experiment has an error (conversely, they do a great job of hiding those errors from users). Would be nice is there was a setting for optimizely_log=info that would allow the errors to propogate out of their container.

Anyway...
(If you used the Variation Code Editor):
1- Does the code work properly when you run it in the browser's console?
2- Can you share the code that your experiment uses?

Does your Safari browser have any anti-tracking plugins/extensions that could be blocking Optimizely? (e.g., ghostery, adblock, etc.)

What are your browser's security settings? Does it work if you disable all the privacy stuff (not incognito, allow 3rd party tracking, etc.)
--Jason Dahlin
Analytics and Testing Guru Smiley Happy


Experimentation Hero
Highlighted

Re: Test works on Chrome and FF but not Safari

From the looks of it - Safari has either cached the endpoint i'm making an ajax request to and will refuse to use the new endpoint that I'm using for the test. Another issue I've had is stopping a specific script from executing so that I could load my test script in it's place but by the time I come across it on pageload it has already been executed. I have two files that are the main culprit as of now..

 

 

;(function ($, window, document, undefined) {

    "use strict";

    // our plugin constructor
    var InfoWidget = function (elem, options) {
        this.elem       = elem;
        this.$elem      = $(elem);
        this.options    = options;
        this.metadata   = this.$elem.data("infowidget-options");
    };
    .......//more code
});

 and after script is loaded then this one is loaded..

 

 

$(function() {
    $("#infowidget-01").infowidget({
        dataFile: $("#ToRootURL").text() + "json/infowidget.json",
        toRootURL: $("#ToRootURL").text()
    });
    $("#infowidget-02").infowidget({
        dataFile: $("#ToRootURL").text() + "json/infowidget-02.json",
        toRootURL: $("#ToRootURL").text()
    });
    $("#filter-01").infowidget({
        dataFile: $("#ToRootURL").text() + "json/filter-01.json",
        toRootURL: $("#ToRootURL").text()
    });
});

For through optimizely i created a container with an id of `filter-01` but no matter what in Safari the page is making an ajax request to `infowidget-02.json` instead of `filter-01.json`.

 

 

 

JasonDahlin 02-28-19
 

Re: Test works on Chrome and FF but not Safari

Sounds like a timing issue that is more evident in Safari than other browsers.

From my experience, you cannot reliably prevent the page from doing what it normally does, you can only make it do things after it does what it already does, or have IT modify what it normally does to recognize Optimizely variables.

e.g.,
1- let the page load then do extra stuff
2- set a variable that your code recognizes so that it does something "different"

--Jason Dahlin
Analytics and Testing Guru Smiley Happy


Experimentation Hero