Comment on page
CodeLink Integration
The CodeLink system has been designed to allow flexibility in the integration with regards to how the process displays to your users. You can keep the default settings or you can modify in part or in full as follows :
If you choose to include the Default Display HTML, then the CodeLink javascript code will attempt to display a solid white overlay with black text. You can change :
Verification Text
In your CodeLink Code settings, you can modify the text that is displayed on the white overlay while the check is taking place. This field allows the
<br>
HTML line break for a little additional formatting. Verification Text Pause
This allows you to lengthen the time the Verification Text message is displayed.
You can make changes to the Default Display HTML by adding your own CSS styles. The Default Display HTML consists of two DIV elements. An outer element that is displayed as the overlay with an ID of
#ixtb-overlay
and an inner DIV which displays the text with an ID of #ixtb-txt
. You may need to add
!important
to any CSS to ensure that it overwrites the Default Display HTML. You can replace the Default Display HTML completely. Change the settings for your CodeLink Code so that 'Default Display HTML' is not included.
You can now add your own code to provide the user experience that you prefer. In many cases you can provide the same overlay DIV but by coding this HTML yourself you can set it immediately to overlay your page - preventing any slight flicker as the page loads.
The CodeLink javascript will set the #ixtb-overlay to hidden when the check is complete and will also update the #ixtb-text with the relevant text.
If you have set the CodeLink Fail URL, then the CodeLink javascript will still redirect.
The CodeLink javascript will also call a function during the process - on error and on pass. You can create your own javascript function to handle the display and user experience.
The function call is made to :
codelinkConf({data});
Where
{data}
is a javascript object containing the status. For most implementations not using NFT+, this will be similar to : {
status:"key_pass"
}
Note that no function call is made during the script load, only on the responses.
Depending on your configuration, CodeLink will send Fail/Pass codes either
- As a message directly to the user (Default HTML with no Fail URL) or
- Included in the Fail URL redirect (if you have selected 'Add Error Codes' in your settings) or
- As a parameter in the function call (if you are handling the display yourself).
These codes are :
Display Message | URL Code / Function | Function |
---|---|---|
No CodeLink Key | no_key | When no key is in the URL |
CodeLink Key Fail | key_error | When the key is in the incorrect format |
CodeLink Key Expired, Please Scan Again | expired_key | When a key is re-used within a short period after issue. |
CodeLink Key Not Found, Please Scan Again | key_not_found | When a valid format key is passed but it's either never been valid or so old that it's been removed. |
- | key_pass | When the key has been passed as valid. |
If you have an error with your CodeLink javascript integration then we will display messages as alerts - ie, pop-ups onto your screen. These errors can be caused by :
- Not incuding your Tracebook Code in the javascript URL src
- Not using a valid Code in the javascript URL src
- Using a deleted Code
These alerts will only happen if there is a error with the CodeLink javascript line added to your page. Once set, your users would never see an alert.
It is also possible to set the Authentication Text directly into the javascript embed. We don't recommend doing this under normal use as it's easier to manage via the Console. However, if you need to display different messages, then this is an option.
Use
data-text
in the script source code. For example :
<script defer data-text="Your Auth in Progress<br>Message" src="https://t.ixkio.com/s/traceback.js?code=<yourcode>">
This will overrule any settings made in your CodeLink Code console configuration.
Last modified 1mo ago