On this page, you can check out a demo of the standard Alert Bar template provided by Sitecore Personalize.
Sample - Alert Bar
Settings
Display Position
The Alert Bar can be displayed at the top or bottom of the page. The setting item is General - Position.


Text
You can change the text used in the Alert Bar. The setting item is Title - Title Text.
Button
You can change the button used in the Alert Bar. The setting item is Button - Button Text for the display text, and Button Link for the link destination.
Code Review
The variables included in the HTML are as follows:
Variable | Format | Description |
---|---|---|
Title Text | string | Alert message |
Button Link | string | URL |
Button Text | string | Button label |
HTML Code
The HTML for the Alert Bar is set as follows.
AlertBar.html
JavaScript Code
The JavaScript for the Alert Bar is set as follows.
AlertBar.js