Rich-text Reply

Unable to add a background image to my landing page

nikhilsamuel 12-17-15

Unable to add a background image to my landing page

Hello,

 

How can I upload a background image and test with optimizely.

 

There doesn't seem to be a functionality to add an image. 

 

Thanks

N

robertchan 12-17-15
 

Re: Unable to add a background image to my landing page

Hi,

One solution would be to upload the image to your server, or if you've not got access to your server, you could upload the image to a free image-hosting site like Imgur.

Next, you can add the following to your variation code section (change the selector and attribute value accordingly):

$('yourOjbect').css('background-image', 'url(' + yourImageUrl + ')');
Robert Chan

Experimentation Hero
onecampaign 03-02-16
 

Re: Unable to add a background image to my landing page

We're trying to use the Edit Style <div> tool by adding a background image to our variation (testing background color vs background image). We're entering the Background Image URL, but it's not saving. Any thoughts?

robertchan 03-02-16
 

Re: Unable to add a background image to my landing page

Find out what the class or ID is for the element you're trying to set a background for, and in your variation code you can make the mod similar to the code I pasted in my reply above. Otherwise, attach the code here and I can look at it for you.

Robert Chan

Experimentation Hero