Every saved version of a variation’s JavaScript, CSS and libraries, kept for the life of the experiment. Compare any two, see what changed since launch or the last reset, and restore an older version as a draft.
ABTestly keeps a version of a variation’s code every time its JavaScript,
CSS or attached libraries change. History answers three questions inside
the dashboard: what did this variation look like when the test launched, what
has changed since, and how do I get an older version back.Versions are stored in full and kept for as long as the experiment exists.
There is nothing to set up. An experiment that existed before code history
starts with one version of each variation’s code as it was then.
On the experiment page, open a variation’s code with the code button on
its row (its tooltip reads Show code).
2
Click History
History sits above the code, in the read view and in the editor. Its
tooltip reads Version history.
A panel opens on the right, titled History: and the variation’s name. It
lists the stored versions newest first, 50 at a time. Load older versions
at the bottom fetches the next 50.Anyone who can open the experiment can open History and compare versions,
Viewers included. Restoring needs more, see
who can see and restore.
Versions are numbered from 1 for each variation. Numbers are never reused
Author
A first name, or an email address when there is no first name
Who saved it. Code before history began marks a Baseline version. Author not recorded marks a Recovered version, which has no author on record. Former member means the person who saved it no longer has an account
Time
How long ago, such as 25m ago or 2d ago, or a date such as Sep 3 for older versions
When the version was stored. Hover for the full date and time
Status
Live, Draft, Scheduled, Paused, Archived or Completed
The experiment’s status when the version was stored. A running experiment shows as Live
Source
See the next table
How the version was stored
Badge
Data reset
The save that stored this version also reset the experiment’s data, because you chose Reset and continue
A reset from the Reset data button changes no code, so it stores no
version and no badge.
The code as it was before history began. Every variation of an experiment that existed before code history starts with one, dated at that variation’s last save
Sometimes the list starts with an entry named Current (not yet in
history). It is the variation’s code as the page loaded it, shown when that
code differs from the newest stored version, or when nothing is stored yet.
You can compare it like any other version. It has no Restore button, since it
is the saved code.It appears for one of two reasons:
A save went through, but storing its version did not. The save itself
is never affected. The missing code is added as a Recovered version (a
Baseline, if the variation had no versions yet) the next time the
experiment’s variations are saved. Launching the experiment, a scheduled
start, and a data reset from Reset data or from Reset and continue
when you resume also add it.
Someone saved after you opened the page. Your page then holds older
code than the newest version. Reload the page.
Tick the checkbox on any two entries. Ticking a third one drops the one
you ticked first.
2
Read the comparison
The comparison opens above the list, headed for example Comparing
revision 3 with revision 5. The older version is always on the left
and the newer one on the right, whatever order you ticked them in. The
current code is always the newer side.
3
Switch files
variation.js and variation.css switch which file you compare.
Comparisons in History are read only. Close one with its close button (×) or
Esc. The list stays as it was and the focus goes back to the checkbox or
button that opened the comparison. In the panel, Esc closes an open
comparison first. With no comparison open, Esc closes the panel.When the two versions have different libraries, a line under the
Comparing revision heading names the difference, in the same format as
Review changes:
Libraries: adds <key>; removes <key>, or
Libraries: same libraries in a new load order. It reads from the older
version to the newer one, so adds means the newer version has a library
the older one does not. When the libraries are the same, no line shows.
Revision 5 and revision 6 compared in History. The older version is always on the left. Below the comparison, each version shows its author, time, status and source.
Three buttons under the panel title pick a comparison for you.
Button
When it shows
What it compares
Previous save
Always. Disabled until the variation has two stored versions
The two newest stored versions, whatever stored them
Since launch
Once the experiment has started
The version that was current when the experiment first started, with the current code
Since last reset
Once the experiment’s data has been reset
The version that was current at the last data reset, with the current code
“The version that was current” at a moment means: of all the versions stored
at or before that moment, the most recent one. Launch is the first start,
from draft or scheduled to running. Pausing and resuming does not move it.The quick picks load older versions for you when the moment falls further
back than the list shows, up to 2,000 more.
Since launch on a variation whose code has not changed since the test started. The note reads No code changes since launch, and only the version current at launch is selected. It is already the saved code, so there is nothing to compare.
The code now is the code at launch. Only that version is selected, because there is nothing to compare
No code changes since the last reset
The same, for the last reset
History starts on and a date
The launch or reset happened before the oldest stored version, so the oldest version is compared instead. The date shows in your browser’s format, for example Jul 14, 2026
Showing the latest and a number of versions, then Load older versions to go further back.
The history is longer than a quick pick loads, and the moment falls before everything loaded. Click Load older versions and pick again
No saved versions to compare yet
The variation has no stored versions
Couldn’t read the launch date or Couldn’t read the reset date
The experiment’s date could not be read. Reload the page
The panel closes and the variation’s code opens in the editor with that
version loaded as an unsaved draft. When it differs from the saved code,
Review changes is already on, open on a file that changed, and the button
reads Back to editor.
3
Save it, or cancel
Nothing is saved until you click Save. Cancel drops the draft
and leaves the saved code as it was.
A version that differs only in its libraries opens in Review changes
with the same code on both sides. The library line under the header names
what the restore adds or removes. See
library changes.
A version identical to the saved code, with the same JavaScript, CSS
and libraries, has nothing to restore. Its button is disabled with the
tooltip This is already the saved code., and the same words show on its
row. That happens once its code has been loaded, for example by comparing
it. If you click Restore before that, the panel says so and restores
nothing.
The save is an ordinary save. It goes through every check any save
does: your access, the lock, the reset or keep data question, the library
rules, the syntax check and code check. Restoring is
never a way around one of them.
A restored version opens as an unsaved draft in Review changes, with the saved code on the left. This one also adds a library, named in the line under the header.
When you cannot restore, the panel says why near the top and every Restore
this version button is disabled with the same words as its tooltip. The
reasons are checked in this order:
Message
Why
What to do
Viewers can’t restore versions.
You are a Viewer. Viewers can open History and compare
Ask a Dev or an Admin
You need code editor access to restore versions. Ask an admin to grant it from Team & access.
You do not have Code editor access on this site
Ask an Admin for Code editor access on the site
This experiment is archived, so its code can’t be restored.
Archived experiments cannot be edited
Clone the experiment and work on the code in the new draft
You can’t edit this experiment’s code.
The experiment is running or paused, so saving its code republishes it, and you cannot publish on this site
Ask an Admin for Publish experiments on the site
This experiment is locked for editing. Pause it first, then restore.
The running experiment has 1,000 visitors since its last reset
Pause it, restore, save, then answer the reset or keep data question
Save or cancel your open edit first.
The inline editor is open with unsaved changes, on this variation or another one
Save or cancel that edit
An unsaved draft is waiting. Recover or discard it in the editor first.
A recovery banner is waiting, or this variation has an autosaved draft from an earlier visit
Open that variation’s editor and click Recover or Discard
The last two exist so a restore never overwrites work you have not saved.
Autosave would replace a waiting draft with the restored code within about a
second, before you ever saw it.The panel checks again when a version’s code arrives. If something changed
while it loaded, for example you started typing, you see Can’t restore this
version with the reason, and nothing changes.
A version holds its library keys as well as its code, and restoring brings
them back. Save sends them with the code, and the save applies the usual
library rules:
A library the variation already has is kept, even if it has been deprecated
since.
A library the variation does not have now counts as newly attached. That
needs Dev libraries on your plan (Pro and above) and the library
approved for the site under Site → Developer libraries. Otherwise the
save is refused and nothing is stored. Remove the library in Libraries,
or approve it, then save again.
After a restore, autosave treats the restored code as your draft and mirrors
it to this browser within about a second, the same as your typing. It keeps
the libraries too when they differ from the saved ones. If the page reloads
before you save, the recovery banner offers the draft back, and Recover
puts back the code and the libraries.If someone saves the variation in the meantime, the banner warns Unsaved
changes found, but the saved code has changed and the button reads
Recover anyway, because recovering replaces the newer saved code with your
draft. The same warning appears when your draft changed the libraries and
someone has since changed the saved libraries. Use Compare with saved in
the banner to see both first. See
Autosave and drafts.
A save that changes the JavaScript, the CSS or the library keys, from either editor. A new library load order counts
Saved
Creating an experiment, one version per variation
Created
Cloning an experiment, one version per variation of the clone
Cloned
Drafting an experiment from a Signals scan
From Signals
History beginning on an experiment that already existed
Baseline
Finding saved code that is missing from the history
Recovered
These store nothing new:
A save that leaves the code and the libraries as they were. Changing only a
variation’s weight or name, the goals, the targeting, the schedule or the
traffic split stores no version.
Starting, pausing, resuming or archiving the experiment.
Autosave. Drafts in your browser never reach history.
Restoring. Only the save after it stores a version.
A variation’s name is not part of a version, so renaming one stores nothing.
The panel title uses the name it has now.If you remove a variation, its versions are kept, but History is only offered
on variations the experiment still has.
Kept for the life of the experiment. Nothing is pruned on a timer.
Stored in full. Each file can be up to 500,000 characters, the same
limit a save has. A version is never shortened.
Archiving keeps them. Versions are deleted when the experiment is
permanently deleted, when its site is deleted, and when the account is
closed.
The Activity log also shows code changes,
but it keeps workspace changes for 6 months only, and it does not keep a file
over 32 KB in full. Code history is the complete record.
Two read only endpoints list a variation’s versions and return one version
with its code. See variant code history
in the REST API reference. No endpoint writes versions: they are stored only
as a side effect of the saves above.
Storing a version happens after the save itself, and if it fails the save is
kept anyway. Your code was saved, but the history missed that version. The
next time ABTestly writes to the history for that experiment, it finds that
the saved code differs from the newest version and stores the missing code as
Recovered, dated when that code was saved. Until then, History shows
Current (not yet in history).A Recovered version has no author recorded, because ABTestly cannot know who
saved that code. Its author shows as Author not recorded. To find who
saved it, look for the save in the Activity log.
Why does Since launch say History starts on a date?
The experiment launched before the oldest stored version. That happens with
experiments that existed before code history: their first version is a
Baseline dated at the variation’s last save. If the variation was saved
after launch, the code that actually ran at launch was never stored, so
History compares the oldest version it has and tells you where its record
starts. The same applies to Since last reset when the last reset came
before the oldest version. If the variation had not been saved since launch,
the Baseline is the launch code and no note appears.
Why is Review changes greyed out right after I saved?
Once the save goes through, your draft is the saved code, so there is
nothing left to compare. Open History and click Previous save to see
what that save changed.
Two versions show the same code. Why are they separate versions?
Look under the Comparing revision heading. When the libraries differ, a
different library or the same libraries in a new order, a line there names
the difference, for example Libraries: same libraries in a new load
order. Whitespace changes show in the comparison too, so check the
highlighted lines as well. Two versions that are not next to each other can
also hold the same code, for example when a later save put back older code.
The person who saved that version no longer has an account. The version and
its code are kept. A Recovered version shows Author not recorded
instead, and a Baseline version shows Code before history began.
History sits above a variation’s code, so it is offered wherever the code
is. The Original shows its code section only when it has code, and variations
in a Split URL test carry a redirect instead of code,
so neither offers History. A variation that was removed from the experiment
has no row to open.