GetYourGuide Widget

Adding the widget to your page

To load and display the GetYourGuide Widget your page should include two parts: an HTML element the widget will be inserted into and an HTML script element that runs the widget with your preferred configuration.

<!-- HTML element the widget will be inserted into -->
<div id="gyg-widget"></div>

<!-- HTML script element that runs the widget -->
<script async defer src="//widget.getyourguide.com/v2/core.js" onload="GYG.Widget(document.getElementById('gyg-widget'),{'q':'Paris'});"></script>

Notes:

  • The JavaScript file must always be loaded from GetYourGuide. This allows us to update the widget to fix problems and make improvements.
  • It's possible to show multiple widgets on the same page. Simply run the widget script again and load it into another HTML element.

Configuration options

The widget JavaScript uses configuration options to alter how it is displayed.

Property Description Default value Example values Required
partnerId Your partnerID none   Not required, but recommended: links will otherwise not be tracked to your account.
localeCode Describes the language and target domain using locale codes. en-US da-DK, de-DE, de-AT, de-CH, en-US, en-GB, es-ES, es-MX, fr-FR, it-IT, nl-NL, no-NO, pl-PL, pt-PT, pt-BR, fi-FI, sv-SE, tr-TR, ru-RU, ja-JP, zh-CN, zh-TW, ko-KR Not required
currency Describes the currency in which prices are displayed using a three letter ISO code. The currency of the users current location. USD, EUR, ARS, AUD, GBP, BGN, CAD, CLP, CNY, COP, HRK, CZK, DKK, EGP, HKD, HUF, INR, IDR, ILS, JPY, MYR, MXN, MAD, NZD, NOK, PHP, PLN, RON, RUB, SGD, ZAR, KRW, SEK, CHF, THB, TRY, UAH, AED, UYU, VND Not required

q A location or POI in the given language (see localeCode). none Paris, Eiffel Tower (en-US), Eiffel Turm (de-DE) Must be either q, tourIds, iata, or lat/lon.
tourIds A specific list of tour IDs. none 10589, 4059 Must be either q, tourIds, iata, or lat/lon.
iata A three letter IATA location identifier. Tours and POI in the vicinity of the location will be displayed. none TXL for Berlin Tegel airport, ZRH for Zurich airport Must be either q, tourIds, iata, or lat/lon.
lat, lon Latitude and longitude coordinates. Tours and POI in the vicinity are displayed with a maximum radius of 100km. none 52, 13 Must be either q, tourIds, iata, or lat/lon.

excludedTourIds What tours to exclude from the widget. Uses GetYourGuide tour ID numbers separated by commas. none 10589, 4059 Not required
numberOfItems How many items should be displayed. 10 1, 20 Not required

cmp The name of the campaign you are running with the widget. none blog-post – to help you identify that the widget was placed on one of your blog posts. Not required

Overview available in English only

Playground

Enter your configuration to preview the widget and its code.