SETUP > CONVERSION-TRACKING
Tracking Conversions
If you use Google Analytics to track the sources of your website traffic, you can also use it to track when users convert and make a booking. There are two avenues to do this, and which you choose depends on your goals and how much information about the booking you need.
Tracking conversions with a reference
You can track customers by feeding a custom reference to your booking page. To do this add a parameter 'reference' to your booking url or booking widget, which you fill in with whatever string reference you prefer to track the source of your traffic. This might be an id on an external system, or an advert id, or an id for a source website for the traffic.
This id will then be preserved and displayed to you with the booking within Bedful and can be used to identify the source of traffic.
book.bedful.com?reference=asdf1234
Tracking conversions with Redirects
You can track customers as they arrive at your website, and when they return after booking with Bedful (via a redirect). To do this:
- Set up your tracking as normal using GA for customers arriving from an advert or other source so that you attribute the customer properly.
- Set up a redirect back to a specific page on your website - this redirect from your bookings will have a 'booking_id' param and an 'a' param for booking amount.
- Read these params using GA or with javascript javascript and assign them to the customer who just booked, thus attributing a value to that particular source of traffic.
Here is an example of the javascript code you can use to track conversions with redirects:
// Read params on your redirect web page using jslet params = new URLSearchParams(document.location.search);let bookingId = params.get("booking_id");let bookingValue = params.get("a")/100.0;// Create GA event with these params
Or you can use GA create event without code and assign the parameters to the event that way. You can find more details about creating Key Events here.
Tracking conversions with TradeDoubler
- Integrate with TradeDoubler as normal, add their script to all pages
- Add js to redirect page to send the data to TradeDoubler
Here is an example of some javascript code you can use to send conversions to TradeDoubler (substitute in your own event code instead of 1234):
// Read the params from the redirect let params = new URLSearchParams(document.location.search); let transactionId = params.get("booking_id"); var ordervalue = params.get("a") / 100.0;
// Send to TradeDoubler var TDConversion = { transactionId: transactionId, ordervalue: ordervalue, currency: 'GBP', event: 1234 }; tdconv('track', 'sale', TDConversion);Tracking conversions with eCommerce events Pro
If you use Google Analytics to track the sources of your website traffic, you can also use it to track which users make a booking on Bedful, which units and extras they choose to book, and how much they spend. Once the integration is set up and correctly configured, Bedful will send specific events to your Google Analytics property - when someone clicks 'Go' on the calendar widget, and an eCommerce event when a customer makes a booking.
Please note, this feature is optional, and requires Bedful Pro. Google Analytics show where the customer was online prior to booking. Returning customers tend to go via Google Search for efficiency. The Google Analytics Tracking ID is used to send e-commerce events to your Google Analytics property. This action is triggered when the booking is confirmed, and details of the booking will be sent to your Google Analytics including the price paid.
Prerequisites
In order to set up conversion tracking, you must have:
- Your Google Analytics tracking code, e.g. 'G-123456-1', which can be found in the settings of your Google Analytics account. Please provide this code to your Bedful account manager, who will add it to your booking system.
- The ability to edit the HTML and JavaScript on your website. Your web developer may be able to help you with this.
Setting up Google Analytics
You should configure your Google Analytics property to have the following features switched on and settings applied:
- Ensure that you have eCommerce tracking switched on. This is required to track how many users complete the booking flow, and to record the amount they are spending.
- Add 'bedful.com' to the referral exclusion list on your property. This is required to ensure that the original source of the user is preserved (organic search, advertising campaign, social media etc.)
- Add 'Stripe.com' to the exclusion list on your property to avoid erroneously logging customers who return to your website after making a booking payment.
Setting up your website
To track conversions correctly, you should add GA tracking code to your website. If you wish to add a specific identifier for a user (to track origin/attribute), you can add this with the reference param, which will then be saved on the booking. If you have any questions about setting up the Google Analytics integration, please contact us.
Caveats
Note that Google Analytics tracking will not register any users using an ad-blocker or other method to block tracking scripts, so be careful to turn off adblockers before testing, and bear in mind that Google Analytics statistics are limited to users who choose to send google data.