Tassos Marinos Developer of Joomla Extensions

The External Link Click Trigger

Published in EngageBox
Updated 09 Aug, 2022

The "External Link Click" Trigger fires when the visitor clicks on external links within your site. Below you can find how to set up a box with "External Link Click" trigger, all supported settings for this trigger explained as well as how to trigger it with the JavaScript Events API.

To set up your box to trigger on Extenral Link Click go to your box > Trigger Tab > Trigger Section and apply the following settings:

  • Click on Trigger Point and select on External Link Click.
  • Set the Trigger Element by specifying the ID or the Class of the element(s) that should fire this trigger. You can specify multiple elements separated by comma.

engagebox trigger on external link click settings

Trigger Settings

Below you can find all settings that are configurable when you choose the "on Exit" Trigger.

Setting Value Description
Trigger Point on External Link Click Fires when the visitor clicks on specified element
Trigger Element .myElement Specify the ID or the Class of the element(s) that should fire this trigger. You can specify multiple elements separated by comma.

Example 1: .item-100, .item-101
Example 2: #logo

Keep in mind that query selectors must always begin with an underscore (_), a hyphen (-), or a letter(a–z), followed by any number of hyphens, underscores, letters, or numbers

Use Cases

Open box when user clicks on external links that appear on your page

A use case would be when you have external links on your site and you want to warn your users that they are about to leave your site and go to 3rd-party sites.

Frequently Asked Questions

How to set a button that allows users to get redirected to the external URL they clicked on

In order to let your users get redirected on the URL they clicked on, you will need to have a link on your popup that looks like this:

<a href="#" class="eb-btn-continue">Go to URL</a>

Note: the CSS Class eb-btn-continue is required for the redirection to occur.

How to Trigger using Javascript

Using the Javascript Events API v2, you can configure any box to be triggered using the "on External Link Click" Trigger. Below you can find a Javascript snippet:

EngageBox.onReady(function() {
    // Get box instance
    const box = EngageBox.getInstance(5);

    box.bindTrigger('onExternalLink', {
        selector: '.go-external'
    });
});

You can read more on the Javascript Events API documentation, on External Link Click Trigger.