Skip to content

Commit

Permalink
[EDU-2289] fix: review marketplace guides (#421)
Browse files Browse the repository at this point in the history
* a/b testing review

* bot-protection review

* args and contributors a/b guides

* tables structure

* tables structure pt

* adding variables EN

* chore: review and update pt version

* Apply suggestions from code review

Co-authored-by: Bru Andrade <[email protected]>
Co-authored-by: hannah <[email protected]>

* Apply suggestions from code review

Co-authored-by: hannah <[email protected]>
Co-authored-by: Bru Andrade <[email protected]>

* Apply suggestions from code review

Co-authored-by: hannah <[email protected]>
Co-authored-by: Bru Andrade <[email protected]>

* delete extra backtick

* Apply suggestions from code review

---------

Co-authored-by: Bru Andrade <[email protected]>
Co-authored-by: hannah <[email protected]>
  • Loading branch information
3 people authored Nov 14, 2023
1 parent 92b16e2 commit 9d8b1de
Show file tree
Hide file tree
Showing 6 changed files with 433 additions and 292 deletions.
Original file line number Diff line number Diff line change
@@ -1,59 +1,58 @@
---
title: How to install the A/B Testing solution through Azion Marketplace
description: How to use the A/B Testing solution from Marketplace.
title: How to install the A/B Testing integration through Azion Marketplace
description: How to use the A/B Testing integration from Marketplace.
meta_tags: marketplace, a/b test, how-to
namespace: documentation_how_to_ab_testing_configuration
permalink: /documentation/products/guides/ab-testing-marketplace/
---

Mainly, you can use **A/B tests** to validate certain addresses, interfaces, or even workflows. Tests enable you to experiment with variations and how they work with your users, providing two options to access certain content or complete task.

## Getting the solution

To use the A/B test solution provided through Azion Marketplace, follow these steps:
---

1. Access [Real-Time Manager (RTM)](https://manager.azion.com/) and log in.
- If you don't have an account, [visit the creating an account documentation](/en/documentation/products/accounts/creating-account/)
2. On the upper-left corner of the page, select **Products menu** > **Marketplace**.
3. On the Marketplace's homepage, type "*test*" in the search box or browse through the cards below it to find the desired A/B Testing solution.
4. Select the desired A/B Testing card to be redirected to the solution's page.
5. On the **Subscribe for** section, at the bottom-right corner of the page, click the **Get It Now** button.
## Getting the integration

> A successful message appears. Your solution is installed and ready to use.
To use the A/B test integration provided through Azion Marketplace, access [Real-Time Manager (RTM)](/en/documentation/products/guides/how-to-access-rtm/) and go to **Marketplace**.

---
On the Marketplace homepage, select the integration's card.

## Using the solution
Once the integration's page opens, click the **Get It Now** button, at the bottom-right corner of the page, and a successful message appears to confirm your integration is installed.

Once you’ve gotten your solution on **Marketplace**, it’ll be available at your edge functions list. To use the solution, you’ll have to create a new edge application.
:::tip
You can search any integration by browsing through the cards or typing a keyword in the search bar.
:::

To create an edge application you have three options:
---

- By visiting the documentation on [getting started](/en/documentation/products/getting-started/).
- Through **RTM**, on the upper-left corner of the page, select **Products menu** > **Edge Application** and follow the instructions.
- Using an already existing edge application.
## Configuring the integration

---
Being an [Edge Application function](/en/documentation/products/marketplace/integrations/#edge-application-functions), **A/B Testing** runs tasks and services on the edge, employing an *existing* edge application.

## Configuring the A/B Testing Edge Application
:::tip
Go to the [building](/en/documentation/products/guides/build/build-an-application/) section for more details on how to build an edge application.
:::

On the **Edge Application** listing page, locate the new A/B Testing edge application and select it.
Follow the next steps to instantiate the integration.

Some solutions may have prerequisites to function. The A/B Testing solution needs three other products to be enabled to run. To enable these products, follow the steps:
1. On the upper-left corner, select **Products menu** > **Edge Application** on the **BUILD** section.
2. On the listing page of your edge applications, select the one you want to use with the integration.
3. On the application page, open the **Main Settings** tab.
4. Enable the **Edge Functions** and **Application Acceleration** switches to activate these modules.
5. Click the **Save** button.

1. Click the **Function** switch to enable functions module.
2. Click the **Application Acceleration** switch to enable the Application Acceleration module.
3. On the bottom-right corner, click the **Save** button.
A successful message appears informing that the edge application has been updated.

> A successful message appears informing that the edge application has been updated.
:::caution[Warning]
If a product is activated, it could generate usage-related costs. Check the [pricing page](https://www.azion.com/en/pricing/) for more information.
:::

---

## Adding origins

To configure the JSON file, you'll have to register the origins (the websites) you want to redirect your solution. These origins will receive a unique ID called `Origin Key`.
To configure the `JSON` file, you'll have to register the origins (websites) you want to redirect your integration. These origins will receive a unique ID called `Origin Key`.

On the homepage of the application, follow these steps:
Still on the page of the application, follow these steps:

1. Go to the **Origins** tab.
2. Click the **Add Origin** button.
Expand All @@ -65,27 +64,32 @@ On the homepage of the application, follow these steps:
8. Pass the URL you want to register for this origin.
9. Click the **Save** button.

After you save it, you'll be able to see the `Origin Key` generated by RTM for the origin you've registered. This will be used to fill the `originid` field on the Args box of the function.
After you save it, you'll be able to see the `Origin Key` generated by RTM for the origin you've registered. This will be used to fill the `originid` field on the **Arguments** box of the function.

> **Note**: you must register at least two origins.
:::note
You must register at least two origins.
:::

---

## Instantiating the A/B Testing Edge Application
## Instantiating the integration

Still on the page of the application, follow these steps:

To enable the A/B Testing function, follow these steps:
1. On the top list, select the **Functions** tab.
1. Select the **Functions** tab.
2. Click the **Add Function** button.
3. On the edge function's name text box, give an easy-to-remember name.
4. On the function dropdown menu, select the **A/B Testing [Global]** function.
3. Choose an easy to remember name for your function.
4. On the dropdown function menu, select the **A/B Testing [Global]** function.

This will load the function, showing a form with the source code of the solution and two tabs: **Code** and **Args**.
This action will load the function, showing a form with the function's code and, just above it, two tabs: **Code** and **Arguments**.

If you click the **Code** tab, you can navigate through the source code to become familiar with it, but without making changes. On the **Args** tab, you can change the configuration of your A/B Testing function.
On the **Code** tab, you’ll be able to navigate through the code, but won’t be able to change it. On the **Arguments** tab, you’ll pass the parameters.

Select the **Args** tab to open the form for the JSON **Args** where you can add the parameters to execute your application.
Select the **Arguments** tab to open the form where you can add the parameters to execute your application.

> Note that the parameters have divisions of at least three sections: `params`, `a`, `b`.
:::note
The parameters have divisions of at least three sections: `params`, `a`, and `b`.
:::

The form will load the parameters as below:

Expand Down Expand Up @@ -127,47 +131,53 @@ The form will load the parameters as below:

Where:

1. `name`: the name of the cookie you'll choose (choose a significant name that will be easy to remember).
2. `expiration`: the expiration date of this cookie.
3. `max_age`: the time (in seconds) for the lifespan of a cookie.
4. `domain`: the domain where you're running the tests.
5. `path`: the subdomain to the cookie (you can use `/` to set the subdomain to all the domains).

On the second section, called `a`, you can add the parameters to the first test:

1. `cookie_value`: a value to identify the cookie for this test variation.
2. `prob`: the probability to send this address to the user (this value should be between 0 and 1, with 0 being 0% of chance and 1 being 100% of chance).
3. `adressess_list`: the address for the a test (for example: `www.mytest_ab_of_my_site.com:443`).
4. `originid`: the identification ID for the origin (this will be automatically generated by RTM).
5. `live_ingest`: it indicates if the origin is a live streaming (a Boolean value should be used here, `true` or `false`).
6. `protocol_policy`: you can force HTTP or HTTPS, or even keep the default value by passing the preserve value.
7. `path`: it indicates the subdomain of the cookie (you can leave it blank, "", to indicate that this is valid for all domains).
8. `cache_key`: here you have to give a name to identify the cache, it should be unique and you can't repeat it elsewhere.
9. `host`: the name of the host that the requisition sends.
| Variable | Description |
|---|---|
| `name` | The name of the cookie you'll choose. Give a unique and easy-to-remember name |
| `expiration` | The expiration date of the cookie |
| `max_age` | The time, in seconds, for the lifespan of the cookie |
| `domain` | The domain where you're running the tests |
| `path` | The subdomain to the cookie. You can use `/` to set the subdomain to all the domains |

On the second section, called `a`, you can add the parameters to the first test, and then repeat it for the rest of the tests:

| Variable | Description |
|---|---|
| `cookie_value` | A value to identify the cookie for this test variation |
| `prob` | The probability to send this address to the user. This value should be between `0` and `1`, with `0` being `0%` of chance and `1` being `100%` of chance |
| `adressess_list` | The address for the `a` test. Example: `www.mytest_ab_of_my_site.com:443` |
| `originid` | The identification ID for the origin. This will be automatically generated by RTM |
| `live_ingest` | It indicates if the origin is a live streaming. A boolean value should be used here: `true` or `false` |
| `protocol_policy` | To force `HTTP` or `HTTPS`, or even keep the default value by passing the preserve value |
| `path` | It indicates the subdomain of the cookie. You can leave it blank, `""`, to indicate that it's valid for all domains |
| `cache_key` | A name to identify the cache. It should be unique and you can't repeat it elsewhere |
| `host` | The name of the host that the requisition sends |

---

## Configuring the Rules Engine

On the **Rules Engine** tab, you'll pass the *criteria* and *behavior* to run the solution.
In **Rules Engine**, you'll pass the *criteria* and *behavior* to run the integration.

Still on the page of the application:

1. Select the **Rules Engine** tab.
2. Click the **Default Rule**.
- Note that you can't change or configure the *criteria* for the Default Rule.
3. On the **Behavior** field, choose **Run Function**, and from the dropdown menu choose the **A/B Testing solution** according to the name you gave it.
- Note that you can't change or configure the *criteria* for the **Default Rule**.
3. On the **Behavior** field, choose **Run Function** and, from the dropdown menu, choose the **A/B Testing integration** according to the name you gave it.
4. Add another behavior by clicking on the **+** button right bellow the first one.
5. Pass the first behavior: **Bypass Cache**.
6. Click again on the **+** button bellow the second behavior.
7. Pass the second behavior needed: **Forward Cookies**.
8. Click the **Save** button.

Done. Now you'll have to wait for the edge application to propagate through Azion's edge nodes.

---
Done. Now you'll have to wait a few minutes for the edge application to propagate through Azion's edge nodes.

Visit the [use cases about the A/B Testing](/en/documentation/products/guides/ab-testing/) page for more information and reference.
import Button from '~/components/Button.astro';

<Button href="/en/documentation/products/guides/ab-testing/" text="go to How to configure A/B Testing reference" variant="secondary">

</Button>

---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
---
title: How to configure the Azion A/B Testing solution
description: A/B Testing is a serverless function from Azion’s Edge Computing platform for constructing A/B Tests.
title: How to configure the Azion A/B Testing integration
description: A/B Testing is a serverless function from Azion Edge Computing Platform for A/B Tests.
meta_tags: edge computing, test a/b
namespace: docs_use_case_ab_testing
permalink: /documentation/products/guides/ab-testing/
---

The edge function A/B Testing is a *serverless* solution available at Azion Marketplace.
**A/B Testing** is a *serverless* integration based on an edge function, available at [Azion Marketplace](/en/documentation/products/marketplace/).

A/B tests solution allows the distribution of different scenarios to be better controlled during the test run, and to identify the most successful variants.
This function allows the distribution of different scenarios to be better controlled during the test run, and to identify the most successful variants.

Some other benefits of A/B Testing as an edge function include:

1. Creating multiple variants in a single `JSON` file (A, B, C, and more).
2. Varying how traffic flows.
3. Combining test rules with business rules (WAF, bot protection, and more).
4. Improving the users' experience. Compared to solutions that use JavaScript to perform A/B tests, the time it takes to load a page isn't affected and is significantly faster.
4. Improving the users' experience. Compared to integrations that use JavaScript to perform A/B tests, the time it takes to load a page isn't affected and is significantly faster.

---

## How does the Azion Marketplace A/B Testing solution work?
## How does the A/B Testing integration work?

Test settings are defined in the function using `JSON` format parameters, called **Args**, which list attributes related to each version being tested, such as probability, cookie values, and others.
Test settings are defined in the edge function using `JSON` format parameters, called **Arguments**. These **Arguments** list attributes related to each version being tested, such as probability, cookie values, and others.

The function's algorithm distributes the request according to a defined probability when it arrives at one of Azion's edge nodes. Then, it sets the cookie with the expiry time and the values specified for each variable. From that point on, all traffic from the client that made the request is redirected to the selected version.

Expand All @@ -33,17 +33,19 @@ The edge node then forwards the query to the originating application, which retu

## Setting up A/B Testing

Edge Function A/B Testing is available from the Azion Marketplace and can be accessed through [Real-Time Manager (RTM)](https://manager.azion.com/) through **Products menu** > **Marketplace**.
**A/B Testing** is available at the Azion Marketplace and can be accessed through [Real-Time Manager (RTM)](https://manager.azion.com/), going to **Products menu** > **Marketplace**.

You can understand how to install and configure an A/B test solution by reading the [How to install the A/B tests solution from Azion Marketplace](/en/documentation/products/guides/ab-testing-marketplace/) guide on the documentation page.
You can understand how to install and configure an A/B test by reading the [How to install the A/B tests integration from Azion Marketplace](/en/documentation/products/guides/ab-testing-marketplace/) guide.

---

## Example of an A/B Testing JSON file configuration

Below is an example of what a `JSON` file configuration looks like for a basic **A/B Testing function**. In this particular case, the first variant is passed with a 90% (0.9) probability, and the second variant is passed with a 10% (0.1) probability.

> Don't forget that the sum of the two probabilities must always be 1.
:::note
The sum of the two probabilities must always be `1`.
:::

```json
{
Expand Down Expand Up @@ -89,11 +91,11 @@ The set of conditions that must be met for *behaviors* to be executed are determ

### Defining validation criteria

Choose the variables, comparison operators and strings to create your business rule, as in the following example:
Choose the variables, comparison operators, and strings to create your business rule, as in the following example:

- `If: ${uri} is equal /home`

> Logic: logical operator, variable, comparison operator, string.
**Logic**: logical operator, variable, comparison operator, string.

This rule is executed if the URL accessed is equal to the string `mypagetotest.com/home`.

Expand All @@ -103,13 +105,17 @@ Add the *behaviors* you want to be carried out when the rule's conditions are me

`Then`: **Run Function** **MyABTestFunction**

> Logic: logical operator, action, function.
**Logic**: logical operator, action, function.

In this example, if the conditions defined in the rules are satisfied, then the function **MyABTestFunction** will be executed.

Finally, save your edge application and the new function will be ready.

import Button from '~/components/Button.astro';

<Button href="/en/documentation/products/guides/ab-testing-marketplace/" text="go to A/B Test guide" variant="secondary">

</Button>

---

Expand Down
Loading

0 comments on commit 9d8b1de

Please sign in to comment.