Case Study -

Google Analytics 4 | Google Tag Manager | Looker Studio

About Client

Owned by the Duke and Duchess of Devonshire, Devonshire Hotels and Restaurants offers an array of luxury hotels, restaurants, holiday cottages, and spas, in the English countryside style.
They offer a range of holiday services, including outdoor activities such as fishing and cycling, as well as the comfort of a luxury stay.


The immediate solution that the client was seeking involved the correct setting up of Google Analytics 4, in order to understand which channels and campaigns were bringing in the most valuable customers. They also sought advice on specific practices – for instance, if they should use Google Tag Manager. Similarly, the client wanted to track the conversion funnels of the following: 

  1. Hotel bookings
  2. Bolthole bookings
  3. Restaurant bookings

Lastly, they wanted to remodel their dashboard so that customers could view each service more clearly. 

Challenges faced

While working on the website, we encountered a lot of problems that needed to be corrected.For instance, tracking funnel steps for Restaurant Booking needed to be done correctly since it was not working because the Residiary booking widget was opening in an iframe.

The hotel name also needed to be fixed, since it was inconsistent in some events, due to extra space, leading to duplicate data being generated. Campaign and source attribution was also not being tracked correctly for conversions due to the complexities of cross-domain tracking.

Lastly, we needed to track funnel steps on Bolthole booking happening on ‘Anytime Bookings’ domain, where no event data was being pushed to dataLayer.


Our team got to work at once. It was necessary to correctly track all events happening in the iframe on Restaurant Booking, for which we used JavaScript’s postMessage function.

To fix the hotel name duplication happening due to an extra space being added to the name string, we used the Trim function to script out all unwanted spaces.

Moreover, we applied HTML DOM manipulation via JavaScript to track funnel steps on Anytime booking where no dataLayer push was available.

To correct the source, medium, and campaign attribution, we had to analyze the UTM on referring domains, fix unwanted referring domains, and more. This was the most difficult and critical one to solve. 


In the end, almost all of the conversions for all kinds of booking were being attributed correctly to their source, medium, and campaign.

There was a 2-3% discrepancy but that was due to AdBlockers and old browser versions. Now, the Restaurant Bookings that were happening in an Iframe were correctly tracked and attributed, and the hotel name duplication was fixed.

Lastly, conversion funnel steps were getting tracked correctly for Bolthole bookings on the Anytime platform.


The project was a success for both the parties involved since all conversions (2%-3% discrepancy) were now being tracked correctly.

Now, the client’s marketing team could identify at which step the majority of users are dropping off and optimize it accordingly. Therefore, this correct Google Analytics implementation enabled our client to take a step forward toward its business goals.

Need help with your Google Analytics 4 implementation?