Enquiry 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-EnquiryWidget"></div>
<script id="booking-suedtirol-js" src="https://widget.bookingsuedtirol.com/v2/bundle.js" defer></script>
<script>
document
.querySelector("#booking-suedtirol-js")
.addEventListener("load", () => {
BookingSüdtirol.Widgets.Enquiry("#Bs-EnquiryWidget", {
accommodationId: 9002,
lang: "de",
onEnquirySuccess: (reservation) => {
// Called after successful enquiry
}
});
});
</script>
Please note: Do not include the script in a bundle or host a copy of it yourself.
Configuration
Use BookingSüdtirol.Widgets.Enquiry(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
-
arrival
-
departure
-
offerId
-
roomId
-
boardId
-
utm_medium
-
utm_source
-
utm_campaign
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
arrival
: string?
Defines the arrival date in ISO 8601 format (yyyy-MM-dd
)
2020-02-20
departure
: string?
Defines the departure date in ISO 8601 format (yyyy-MM-dd
)
2020-02-23
layout
: string?
Determines the widget layout
-
layout-1
(default) -
layout-2
-
layout-3
offerId
: number?
Enables you to preselect a specific special via its ID.
ID | Special name |
---|---|
1942598 | Nicht ohne meinen besten Freund |
1942603 | Weiße Wochen |
3125446 | Weihnachtszauber in Südtirols Süden |
roomId
: number?
Enables you to preselect a specific room via its ID. The ID can be read either via the MSS interface or the following chart.
ID | Room name |
---|---|
25722 | Einbettzimmer |
25723 | Doppelzimmer Deluxe |
25724 | Doppelzimmer |
25725 | Dreibettzimmer |
boardId
: number?
Enables you to preselect a specific board via its ID.
ID | Board name |
---|---|
0 | Beliebige Verpflegung |
1 | Nur Übernachtung |
2 | Frühstück |
3 | 3/4 Pension |
promotion
: [string | null, string | null, string | null]?
Enables you to customize the advertising fields medium (ResID_SourceContext)
, source (ResID_Source)
und campaign (ResID_Value)
and submit them to the PMS.
How exactly the fields are to be filled has been precisely defined in the AlpineBits Standard and can be read in the corresponding documentation in section 4.2.5 Implementation tips and best practice
.
['Advertising medium', 'Advertising source', 'Advertising campaign']
Default value:
[null, null, null]
The Google Analytics parameters utm_medium
, utm_source
, and utm_campaign
campaign offer the possibility to submit the fields individually.
For example, the URL https://www.URL.com/?utm_medium=metasearch&utm_source=tripadvisor.com&utm_campaign=tripadvisor_desktop
would submit ['metasearch', 'tripadvisor.com', 'tripadvisor_desktop']
to the PMS.
Please note: Using this feature will set a 30-day tracking cookie. In this case, add the cookie
bs_widget_promotion
to your Privacy Policy. If you want to prevent the cookie from being set, insert the codewindow.BookingSüdtirolTrackingConsent = false;
before the widget is loaded.
source
: string?
Enables the widget to be installed on portals with multiple accommodations. For this functionality, please contact support directly.
onEnquirySuccess
: (reservation: object)? => void?
Function called after successful enquiry.
{
arrival: string | undefined; // ISO 8601
departure: string | undefined; // ISO 8601
occupancies: {
roomId: number;
roomTitle: string;
adults: number;
children: number[];
board: 0 | 1 | 2 | 3 | 4 | 5 | 6;
}[];
gender: "" | "m" | "f" ;
firstname: string;
lastname: string;
email: string;
phone: string;
street: string;
zipcode: string;
city: string;
country: string;
note: string;
newsletter: boolean;
}
Events
As the user interacts with the widget, events are generated in the background for the following interactions:
Google Analytics 4
generate_lead
The user completes an enquiry.
Parameter | Description | Value |
---|---|---|
transaction_id | Unique reservation ID | 1234567 |
affiliation | Widget type | HGV Enquiry Widget |
Google Universal Analytics (deprecated)
event | eventCategory | eventAction | eventLabel | eventValue |
---|---|---|---|---|
BsWidgetEvent | HGV-Anfragewidget | Anfrage erfolgreich | Language ID |