Hyperlink
Last updated
Was this helpful?
Last updated
Was this helpful?
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.
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
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.
Most have a .
In this example, the link with Label (Text) "Click Me" takes the to user to the specified website.
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 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.
In this example we have a variable that is an data type so we can access the downloadURL on the variable for the href and if the user clicks the link it downloads the file to the browser. Check how to create .
Extending the example above that downloads a generated file, we can also attach some to the Clicked event. In this case when the user clicks the link to download the file it will start a that will start within five days and then send an SMS asking for CSAT/feedback through a .