Global JS activation codes for Study editor
Studies built in the Study beta editor need their own Global JS activation code. Global JS codes now have a type. A Study Editor (beta) code runs studies built in the Study beta editor, and a Legacy editor code runs studies built in the legacy editor.
One code can't run both.
⚠️ Your existing Global JS won't work for the Study beta editor
If your site already has a Global JS snippet from before, it's a Legacy editor code. Studies built in the Study beta editor won't show through it, even when it says Live.
If you add the Study beta editor snippet to your site as well, the type and the snippet on your site must match what you see on the study's Publish page.
The Type of Global JS field
When you add a code in Manage Global JS, the first field is Type of Global JS:
- Study editor (recommended): runs studies built in the Study editor.
- Legacy editor: runs studies built in the legacy editor.
A few things to know:
- You can't change the type after the code is saved. If you picked the wrong one, add a new code with the right type.
- Every account gets a Study editor code named Study editor (beta) default, which you can rename.
- In the list of codes, Study editor codes come first and have a Beta tag.

Which snippet is on my site?
Check the script address in the snippet, either in your tag manager or with your developer. The ID ending in -gl is the code's Global ID, and it's different for every code.
| Type | Script address looks like |
|---|---|
| Study editor | //ethn.io/si/relay/abcde-gl.js |
| Legacy editor | //ethn.io/abcde-gl.js |
If the address has no /si/relay/ in it, it's a legacy snippet and it won't work for the Study editor.
Creating a Study editor Global JS code
- Click Manage Global JS. It's on the study's Publish page or under Setup.
- Click Add Global Activation Code.
- Under Type of Global JS, pick Study editor and give it a label. You can also add a High traffic wrapper if your site is very busy.
- Click Save & close before you copy the snippet. A new code doesn't work until it's saved.
Only the account owner and admins can create or edit Global JS codes.
Publishing a study with Global JS
- Open the study, go to Publish and choose Web intercept.
- On the Setup tab, under How the code gets on your site, choose Global JS not Study-specific JS ID (they will use the standard none global code).
- In dropdown Select the Global JS for this intercept, pick a code.
- Copy the snippet shown on the Publish page and make sure that exact snippet is on every page of your site you want, usually through your tag manager. Compare the Global ID and the
/si/relay/part with what's on your site. - Click Check code status. Code is live means Ethnio sees pageviews from this code.
- To show the intercept on certain pages only, open the Targeting tab and add URL targeting. URL targeting required the Global JS not the Study-specific JS ID.
- Turn the study on.
Using both editors on one site
Keep your legacy snippet on the site while you still run studies from the legacy editor, and add the Study editor snippet next to it. Each snippet only runs studies of its own type. Once no study uses the legacy code, you can remove its snippet.
Troubleshooting
My existing codes are missing from the Publish page.
They're Legacy editor codes, and the list only shows codes that match the study. Pick a Study editor code or create one.
I picked the wrong type.
The type can't be changed. Add a new code with the right type, select it on the study's Publish page and put its snippet on your site.
It says Code not detected right after I installed the snippet.
The status is based on recent pageviews. Give it some time to generate traffic, then click Check code status again.