Hyperlink
Overview
The hyperlink control allows links to be added to a webpage to navigate a user outside of Airkit to and external URL in a new tab or to download a file.
Control Details
Control Properties
HREF
This property specifies the URL to direct the user to when the link is clicked.
Text
The label that the user will see for the hyperlink
Actions
Clicked
This event is fired when a user clicks the hyperlink. Please note that the user will navigate to the hyperlink regardless of what happens within this event, this event is designed to allow for additional actions and analytic tracking with Airkit's journey if desired.
Styling
Most Web Controls have a common set of styling properties.
Examples
Example 1: Linking to an External URL
In this example, the link with Label (Text) "Click Me" takes the to user to the specified website.
Example 2: Linking to a dynamic URL
In this example, we're using a variable productId in order to create a dynamic link based on the current value. In the example above we are changing the URL using the {{ }} syntax to insert a variable directly into a string. This could also be used inside of a List Control template if you had multiple records (products in this example) that you wanted to link to each respectively. Check [Lists with arrays] (working-with-data-overview.md) for more info.
Example 3: Downloading a generated file
Example 4: Running an Action after a Click
Extending the example above that downloads a generated file, we can also attach some Actions to the Clicked event. In this case when the user clicks the link to download the file it will start a Timer Action that will start within five days and then send an SMS asking for CSAT/feedback through a Chat Bot Action.
Last updated