# Action Button Widget

The Action button widget is part of the **Promotional Content** widget category. For more information on the widgets, please refer to [Widgets configuration in the visual editor](/web-experimentation-and-personalization/editors-and-widget/list-of-widgets/widgets-configuration-in-the-visual-editor.md).

## Introduction <a href="#h_01j67f6enzrn1f06vp6y93sfhp" id="h_01j67f6enzrn1f06vp6y93sfhp"></a>

The Action button widget allows you to incorporate a dynamic element into your variations that executes when the button is clicked.

Those elements are:

* A link to a page or a URL
* JavaScript code to execute
* Triggering another widget

## Configuration <a href="#h_01j67fd49hptjg97kreq83nca1" id="h_01j67fd49hptjg97kreq83nca1"></a>

### Layout tab <a href="#h_01j67fe73r16jdpgnyb4e12d8f" id="h_01j67fe73r16jdpgnyb4e12d8f"></a>

<img src="/files/ESlWoWJo6tEBgjFFsBNB" alt="" width="258">

The action button appears as a tab, referred to as a **Sticky Button**. It will appear to one edge of the screen, presenting a headline, and optionally an icon, to invite visitors to click on it. The widget will be placed at the left edge of the screen by default.

<img src="/files/GUwnpLAlWKDjhKA45NEm" alt="" width="95">

When the **Free placement** is selected via the layout tab, the sticky button will be replaced by a **standard button**. The user can then define where the button must be placed.

<img src="/files/NU5i05zQaLGai1QFjy4r" alt="" width="375">

### Content tab <a href="#h_01j1552ybcrad6mx4zh63sjkpx" id="h_01j1552ybcrad6mx4zh63sjkpx"></a>

#### Adding a link <a href="#h_01j1552ybcyzpbwzvqndny3cq3" id="h_01j1552ybcyzpbwzvqndny3cq3"></a>

To add a link to the action button, select the **Link** option and enter the URL you want to link to.

<img src="/files/HJINgvWrgMBhKGBrDNMu" alt="" width="328">

#### Adding JavaScript code <a href="#h_01j1552ybczx57pg80tst1xqt6" id="h_01j1552ybczx57pg80tst1xqt6"></a>

To add JavaScript code to the action button, select the **JavaScript** option and enter the code you want to execute.

<img src="/files/DCAQRyWTG36VUHId3n09" alt="" width="324">

#### Triggering another widget <a href="#h_01j1552ybcm1rbknz3ed8sfy74" id="h_01j1552ybcm1rbknz3ed8sfy74"></a>

#### Configure the action button <a href="#h_01j1552ybcjq9s1jh43dr95jpf" id="h_01j1552ybcjq9s1jh43dr95jpf"></a>

1. To trigger another widget when the action button is clicked, select the **Trigger another widget** option and select the widget you want to trigger.

#### Configure the widget to trigger <a href="#h_01j1552ybcr9319h5jfk56bbee" id="h_01j1552ybcr9319h5jfk56bbee"></a>

1. Add another widget to your variation that you want to trigger when the action button is clicked.
2. In the widget you want to trigger, Go to the **Conditions** tab and in the **Triggering** section, choose **At click on an element** in the Display widget selection.
3. Select the element that will trigger the widget by clicking on the **Select element** button and choose the action button.

In the case below, we have configured an **Image Pop-in** widget to be triggered when the action button is clicked.

<img src="/files/kAComuyIN98ur200ymhd" alt="" width="332">

#### Style tab <a href="#h_01j1552ybczrjh3s30vhw9m1jp" id="h_01j1552ybczrjh3s30vhw9m1jp"></a>

The action button also has a specific hovering style customization.

To customize the button, go to the **Style** tab and go to the **Button’s hover** section. You will then be able to change the hovering style of the button.

<img src="/files/dwpD8zQ7NtvylEhnD9N1" alt="" width="248">

### Conditions tab <a href="#h_01j67g29b9vsc9tahne44yrvy8" id="h_01j67g29b9vsc9tahne44yrvy8"></a>

Select the Triggering and Recurrence options you want to apply to the Action Button widget.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.abtasty.com/web-experimentation-and-personalization/editors-and-widget/list-of-widgets/ab-tasty-prebuilt-widgets/action-button-widget.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
