Skip to content

Is a round live?

A round is live on a page when this request returns a JSON array with at least one row:

https://api.endlesstesting.ai/api/tests/by-url-allocations?url=

Put the page in the url query parameter. The call takes no token. The snippet calls this path to fetch variants for a visitor. It may also send vid and known. Those two are optional. A request with only url is enough.

Terminal window
curl -fsS "https://api.endlesstesting.ai/api/tests/by-url-allocations?url=https%3A%2F%2Fendlesstesting.ai%2F"

[] means that page is not serving a round. One or more objects means a round is live. The body is the array itself. Each object includes testId and variantId. A row is the variant chosen for a running test, or the winner still being served after that test finished.

Only a JSON array counts. A missing url is HTTP 400 and the body is {"error":"url required"}. An invalid url is HTTP 400 and the body is {"error":"invalid url"}. Query strings and hashes on the page URL are ignored. https://endlesstesting.ai and https://endlesstesting.ai/ are the same page.

<site> is the host (endlesstesting.ai) or the site id from et sites.

  • et round start <site> [--url <page>] starts a round. --url sets the page. Without --url, the site host is the page.
  • et status <site> shows what is live: tests, challengers, and the round.
  • et goals <site> shows the conversion goal.
  • et goal set <site> --text "<button text>" replaces the goal with that one button text. Other labels on the goal are cleared.
Terminal window
et round start endlesstesting.ai --url https://endlesstesting.ai/
et status endlesstesting.ai

et status is the site view. The allocation URL above is how you tell a specific page is serving a round. The full list is on Commands.

The conversion goal is the button text “Start 7-day free trial”. “Get Started” counts as the same goal. Clicks on either button text count as the conversion.

Terminal window
et goals endlesstesting.ai

et goal set endlesstesting.ai --text "Start 7-day free trial" would drop “Get Started”. Read the goal with et goals and leave both labels in place.