https://www.growthbook.io/ logo
s

stocky-river-58964

01/29/2023, 6:23 AM
Hi everyone, I'm trying to use the visual editor and have added the script needed to start editing, but I keep seeing the error that I haven't added the script. https://github.com/growthbook/growthbook/issues/932 This is an issue someone else has created, however there was no answer there. I'm using v1.9 Thanks in advance
f

fresh-football-47124

01/29/2023, 9:32 AM
anything in the console?
s

stocky-river-58964

01/29/2023, 9:37 AM
Hi Graham, thanks for always answering. Actually I think I might have found the problem.
๐Ÿ‘ 1
Hi, @fresh-football-47124, I fixed the previous problem but, it still won't let me use the visual editor. Can you tell me what I'm doing wrong? Do I have to connect the javascript SDK as well?
Or must I actually send an event that can be tracked in Growthbook? because i just want to use the editor, not start an experiment(yet)
f

fresh-football-47124

01/31/2023, 5:11 AM
can you explain a bit more?
you were able to get the visual editor to create two variations?
s

stocky-river-58964

01/31/2023, 5:12 AM
sure, I'm trying to use the visual editor. I've copied the script into the HEAD section of the page, but when i open the editor, it still gives the error that i haven't added the script
f

fresh-football-47124

01/31/2023, 5:12 AM
ah
and i the console, any errors?
s

stocky-river-58964

01/31/2023, 5:13 AM
no. this is what it shows in the console
f

fresh-football-47124

01/31/2023, 5:14 AM
is what you pasted earlier still the implementation code?
s

stocky-river-58964

01/31/2023, 5:16 AM
at the moment yes. although because i deleted everything(๐Ÿ˜…) the key has changed and i haven't implemented it in the code yet. is it possible to test this in a local run of the code? because every change needs an update and our frontend code is really slow to dockerise
f

fresh-football-47124

01/31/2023, 5:17 AM
ya, you can test it local
some of the CORS things may need to be adjusted
s

stocky-river-58964

01/31/2023, 5:18 AM
really? how?
we have extensions that we use for that
but do the growthbook instance and the frontend code have to be on the same computer?
f

fresh-football-47124

01/31/2023, 5:19 AM
no
s

stocky-river-58964

01/31/2023, 5:19 AM
then what address am i supposed to set in the editor?
f

fresh-football-47124

01/31/2023, 5:19 AM
localhost? wherever youโ€™re running the page you want to test on
s

stocky-river-58964

01/31/2023, 5:20 AM
oh, i think i understand now. it doesn't have to be a domain then? it can be any where on my local network correct?
f

fresh-football-47124

01/31/2023, 5:21 AM
it could even be your live site- just has to have that code for the iframe to talk to
and load the payload of dom mutations
s

stocky-river-58964

01/31/2023, 5:21 AM
i'm sorry i don't understand that part
f

fresh-football-47124

01/31/2023, 5:21 AM
keeping in mind, that for React/Next based sites, this code will cause some flickering
(weโ€™re improving the visual editor currently)
so the visual editor, as loaded from the GrowthBook UI, loads your site inside an iframe
that iframe checks to make sure your site has the GrowthBook script running
s

stocky-river-58964

01/31/2023, 5:22 AM
it's definitely needed. we just can't use google optimise anymore
f

fresh-football-47124

01/31/2023, 5:22 AM
that can be blocked by CORS or x-origin settings
s

stocky-river-58964

01/31/2023, 5:23 AM
oh ok. i get it now
thanks. i'll start testing it on my local run of the code, so i can understand the problem better. after that, if the problem persists, i'll trouble you some more.๐Ÿ˜… thanks a lot
f

fresh-football-47124

01/31/2023, 5:24 AM
ok
๐Ÿ‘ 1
the new visual editor will use our chrome extension instead of iframes
much easier to use
s

stocky-river-58964

01/31/2023, 5:25 AM
that's lovely. when can we hope for an update?
f

fresh-football-47124

01/31/2023, 5:25 AM
that will be done in about 3 weeks
s

stocky-river-58964

01/31/2023, 5:26 AM
that's amazing. I'll be waiting๐Ÿ˜‡
2 Views