Specials Widget

Accommodation: Testhotel Webseitentool HGV (hotelhgv.it) (9002)

Installation

Create a widget instance by embedding the following code within your webpage inside the <body /> tag:

<div id="Bs-SpecialsWidget"></div>
<script id="booking-suedtirol-js" src="https://widget.bookingsuedtirol.com/v2/bundle.js" defer></script>
<script>
    document
    .querySelector("#booking-suedtirol-js")
    .addEventListener("load", function() {
        BookingSüdtirol.Widgets.Specials("#Bs-SpecialsWidget", {
            accommodationId: 9002,
            lang: 'de'
        });
    });
</script>

Please note: Do not include the script in a bundle or host a copy of it yourself.


Configuration

Use BookingSüdtirol.Widgets.Specials(domElement, settings) to create new widget instances.

Method arguments

domElement: string | DOM element

The CSS selector or DOM element where your widget will be mounted.

settings: object

Initialization options. See API below. Each widget instance can have it's own settings.

URL parameters

The following list of settings can also be passed over the URL.

  • accommodationId
  • lang

Notice that URL parameters always overwrite widget instance settings.


API

accommodationId: number

ID of the accommodation

Mandatory field. The accommodation must already have been activated for the widget.

lang: string?

Language

  • de: German (default)
  • it: Italian
  • en: English
  • fr: French

layout: string?

Determines the widget layout

  • layout-1 (default)
  • layout-2
  • layout-3
  • layout-4
  • layout-5
  • layout-6

maxColumns: number?

The maximum of specials displayed in a row. If the columns don't fit in the parent container, they get automatically adjusted to a lower value. Some layouts may only support a lower number than indicated.

  • 1
  • 2
  • 3
  • 4 (Default)

displayType: string?

Choose between different display types

  • tiles (Default)
  • slides

ids: number[]?

Enables you to display and order specific specials via their ID.

ID Special name
1942598 Nicht ohne meinen besten Freund
1942603 Weiße Wochen
3125446 Weihnachtszauber in Südtirols Süden

showFromPrice: boolean?

Enables you to show or hide from prices.

  • true (Default)
  • false

themeIds: number[]?

Enables you to only display specials assigned to the specified themes (topics).

ID Theme name
1 Wandern
2 Rad & Mountainbike
3 Familie
4 Wellness / Gesundheit
5 Essen und Trinken
6 Golf
7 Kultur
8 Motorsport
9 Ohne Auto im Urlaub
10 Ski & Snowboard
11 Sommer Aktiv
12 Veranstaltungen
13 Weihnachtsmärkte
14 Winter Aktiv

source: string?

Enables the widget to be installed on portals with multiple accommodations. For this functionality, please contact support directly.

Events

As the user interacts with the widget, events are generated in the background for the following interactions:

Google Analytics 4

search

The user selects travel dates in the calendar.

Parameter Description Value
search_term Hardcoded search term Search booking availability
arrival Arrival Date 2021-02-04
departure Departure Date 2021-02-11
affiliation Widget type HGV Specials Widget

view_item

Available rooms and additional services are shown to the user.

Parameter Description Value
items.item_list_id Rateplan ID 49143
items.list_name Rateplan title Zimmer Preise
items.item_id Room ID 25723
items.item_name Room title Doppelzimmer Deluxe
items.quantity Selected items 0
affiliation Widget type HGV Specials Widget

view_items

The user views the room list of a specific offer.

Parameter Description Value
items.* See view_item event
affiliation Widget type HGV Specials Widget

select_item

The user opens a rateplan for a specific room.

Parameter Description Value
items.* See view_item event
affiliation Widget type HGV Specials Widget

add_to_cart

The user adds rooms or additional services to the cart.

Parameter Description Value
items.item_list_id Rateplan ID 49143
items.list_name Rateplan title Zimmer Preise
items.item_id Room ID 25723
items.item_name Room title Doppelzimmer Deluxe
items.quantity Selected items 1
items.adults Number of adults 2
items.children Number of children 0
items.price Price without discount 550
items.discount Discount value 170
items.currency EUR
items.category Rooms
items.item_variant Board ID 2
currency EUR
affiliation Widget type HGV Specials Widget

remove_from_cart

The user removes rooms or additional services from the cart.

Parameter Description Value
items.* See add_to_cart event
currency EUR
affiliation Widget type HGV Specials Widget

begin_checkout

The user starts to enter his personal informations.

Parameter Description Value
items.* See add_to_cart event
currency EUR
affiliation Widget type HGV Specials Widget

add_payment_info

The user adds payment informations.

Parameter Description Value
payment_type Payment method ID 2
items.* See add_to_cart event
currency EUR
affiliation Widget type HGV Specials Widget

purchase

The user completes a purchase.

Parameter Description Value
value Reservation price 380
transaction_id Unique reservation ID 1234567
coupon Coupon title WINTER_2021
items.* See add_to_cart event
currency EUR
affiliation Widget type HGV Specials Widget

generate_lead

The user completes an enquiry.

Parameter Description Value
transaction_id Unique reservation ID 1234567
affiliation Widget type HGV Specials Widget

Google Universal Analytics (deprecated)

event eventCategory eventAction eventLabel eventValue
BsWidgetEvent HGV-Specialwidget Special geöffnet Special name Special ID