Travel Widgets for Websites

Embedding travel advisories into your travel website made easy.
Either as a simple iFrame or a JS with customization options.

Quickstart

These widgets show travel advisories and travel warnings for a specific country. These advisories contain a risk value which describes how dangerous a country is from a travellers perspective. This data is available for every country and can be embedded in your website, free of charge. Don't ask, just use the widgets as it fits. This data is as up-to-date as the data shown on this website (travel-advisory.info).

There is no JS/Pixel tracking or ads integrated into these widgets. We only have the typical simple webserver logs. These logs will be deleted at the end of each month after a simple statistical analysis for maintenance purposes.

Terms of Service

First of all, the service is free to use. The widgets described on this page are free of charge. Just go ahead and use them. But to keep it that way, please comply with the following rules.

(1) This widgets come without warranty or uptime promises. Though I try to put great care in the coding, official travel advisories could be misinterpreted and show a wrong scoring. So you should not use this widget to operate a nuclear reactor nor should you base potentially life threatening decisions on the widget data alone. Use your brain and read the official sources.

(2) This widget is designed for light traffic. If you wish to embed these widgets into your application or high volume website, please consider using our Travel Advisory API.

(3) Attribution. Please refer to the source of data when you use our data in your application/website/app. It doesn't have to be a big bright badge, but it should be noticable in context of the shown data. The examples show how you could go about this

Also: please let me know of your implementation. Always happy when somebody uses it. See imprint and privacy policy for contact details.

iFrame Country Widget Option

https://www.travel-advisory.info/widget-no-js?countrycode=ISOCODE

Using this, you recieve a full HTML widget. It comes ready to use with styles and images. It can be embedded right in your site using the classic iframe technique for example. You can resize the iframe to your needs as the content provided is fluid and responsive. It works without any javascript.

Note: As simple as it is, it has no customization options besides it's size through the parent iframe.

There is one mandatory GET parameter countrycode which takes a two letter ISO countrycode. It is case insensitive so you can use "de" or "DE" (for Germany). See Wikipedia for a comprehensive list of possible codes.

Sample Code

Examples


Parameters used:
?countrycode=NG


Parameters used:
?countrycode=CY

JS Country Widget Option

https://www.travel-advisory.info/widget.js

This JS should be placed at the bottom of your page or should be loaded after the required html element that functions as an anchor. This anchor can be any element. It must have the id 'travel-advisory-info-widget'.

The widget comes with a variety of options.

GET: countrycode (mandatory)
Iso Alpha 2 Country code (see above for reference)

GET: styles
Takes the values 0 (disable) and 1 (enable). The default is "1". Disable removes the default style declarations from the embedded html. You can use this when you have multiple widgets on a single page as the style declaration would be the same or when you want your own styles.

GET: classname
Takes as string (limited to 50 chars) that may consist of 0-9, a-z, A-Z and "-" and "_" and uses them as CSS classnames or classname prefix for elements in the embedded html. You can use this, when you want to give distinct and own css classnames.

GET: width
Takes either sizes in PX (e.g. '200px') or the value 'auto'. This value is applied to the container with the message content. When not applied, the container size is '100%'. Will not work when the parameter 'styles' is set to 0 (zero).

GET: height
Takes either sizes in PX (e.g. '200px') or the value 'auto'. This value is applied to the container with the message content. When not applied, the container size is '100%'. Will not work when the parameter 'styles' is set to 0 (zero).

GET: images
Takes the values 0 (disable) and 1 (enable). The default is "1". Disable removes the images (countryflag and info icon) from the embedded html.

Sample Code

Examples

Travel-Advisory.info

Parameters used:
?countrycode=AU

Travel-Advisory.info

Parameters used:
?countrycode=CN
&styles=0
&images=0
&classname=something-else