GTM & GA4 implementation for Walnut Barn Estate

Walnut Barn Estate provides exquisite accommodations in the scenic Mendip Hills. Their compact website showcases their listed properties, allowing visitors to either book their stay via booking forms or reach out to the company through a dedicated contact form.

The site is built on WordPress, with booking forms powered by SuperControl and integrated via iFrame. The contact form is powered by Contact Form 7.

Objectives

The client wanted to have proper conversion tracking implemented before launching Meta Ads. After my initial audit, I identified the primary conversion actions to track:

  • booking completion,
  • contact form submission,
  • newsletter signup,
  • email link click,
  • telephone link click.

Additionally, the client sought micro-conversion tracking for use in Meta Ads. This included tracking:

  • the “Book Now” button click, redirecting users to the accommodation catalog,
  • booking start.

My audit also revealed that Google Analytics implementation wasn’t flawless. First and foremost, several events were firing multiple times, skewing report data. Moreover, several conversions were either untracked or improperly configured. For example, the form submit event fired once the submit button was clicked, which isn’t a good practice.

Solution

I first tackled the duplicated events, caused by these settings in GA4:

In a nutshell, each of those 4 events fired a second time after the initial event fired. Such a configuration has no sense, so I removed it to fix the issue.

Next, I revamped the existing tags and introduced a uniform naming convention for tags and triggers. This is quite useful when working with multiple platforms inside GTM.

To properly track form submissions I used a custom form listener, which fires an event only after the form data is validated and sent. To optimize page load times, the listener is active only on the “Contact Us” page.

The click-based events are quite straightforward: clicking links starting with “mailto:” / “tel:” triggers the corresponding event tags. The “Book Now” button click event operates in a similar manner:

The main challenge was to track booking form interactions. I mentioned earlier that alongside the booking completion tracking the client wanted to track booking steps.

As it often is, the booking forms are placed via iframe, usually complicating conversion tracking. Thankfully, the booking form provider cared to support GTM’s dataLayer. SuperControl don’t have comprehensive documentation on the supported GTM events, however, they do have a fully configured downloadable JSON container. The main drawback is that it’s too bulky and contains a lot of redundant tags and triggers. I prefer to keep GTM clean and use only things I need so I simply recreated the necessary tags and triggers from the SuperControl’s JSON file, rather than importing it wholesale.

Results

As a result, I have configured tracking of all meaningful actions:

  • booking start, which is represented as the “add_to_cart” event;
  • booking completion, which is represented as the “begin_checkout” event;
  • booking payment, which is represented as the “purchase” event and captures the monetary value of a booking;
  • contact form submission, as “generate_lead” in GA4 and “Lead” in Meta;
  • newsletter signup, as a custom event (there is no recommended event name in both GA4 and Meta);
  • email and telephone link click, as well as the “Book Now” button click.

Though the project has nothing to do with ecommerce, leveraging the ecommerce event schema enhances the data captured by Google Analytics and Meta Pixel.

Conclusion

Walnut Barn Estate now have robust conversion tracking on both the Meta platform and Google Analytics. With everything configured in GTM, if the client decides to launch marketing campaigns on a new platform in the future, scaling their conversion tracking setup will be seamless, ensuring a consistent tracking strategy.