top of page
ga4-the-super-prime.webp
London, UK · Serving UK/EU · GBP pricing

The Super Prime case study. Universal GA4 ecommerce tracking without pre-existing infrastructure.

Project overview.

The Super Prime is a luxury property platform showcasing high-end real estate listings across prime locations. The business needed comprehensive GA4 ecommerce tracking to understand user engagement with property listings and measure conversion through their enquiry funnel.

However, like most modern property websites, they faced a rather familiar problem: implementing proper analytics without extensive engineering resources, pre-existing data layers, or the luxury of pausing business operations whilst someone fiddles about with tracking codes.

Marc Alexander designed and deployed a universal GA4 ecommerce tracking layer, through Google Tag Manager, that intelligently infers product data and user intent directly from page structure and network traffic, automatically generating dataLayer events and delivering complete funnel visibility within days rather than the usual six-month saga involving three meetings nobody needed.

Client: The Super Prime (Luxury property platform)

Project Duration: 2 weeks implementation + ongoing optimisation

Marc's role: Analytics Engineer & GA4 Consultant

Scope: Full ecommerce event implementation across property listing and detail pages

Key technologies: GA4, Google Tag Manager, JavaScript DOM analysis, Network traffic monitoring

The challenge

The Super Prime needed reliable analytics to optimise their property listings and enquiry conversion, but faced significant implementation barriers typical of modern property platforms.

No existing dataLayer or tracking infrastructure

The website had precisely zero structured tracking in place. No product schemas, no ecommerce events, and no dataLayer meant starting from scratch. Traditional implementation would require extensive engineering work—mapping product data across all page templates, building dataLayer architecture pushed from the server side, coordinating releases across development sprints, and ongoing maintenance every time templates changed.

With limited development resources and aggressive growth targets, waiting months for custom backend implementation wasn't particularly viable. The business needed tracking now, not after Q3 planning cycles finished arguing about whether to put it in the sprint backlog.

Template variability creating extraction complexity

Property detail pages varied in structure. Featured properties displayed differently from grid listings. Pricing appeared in different positions depending on which developer template was being used. Some properties showed developers and brands prominently, others didn't bother. URLs sometimes contained numeric IDs, sometimes didn't.

Any tracking solution needed to handle this real-world messiness reliably rather than assuming some mythical perfect, consistent template that exists only in developer documentation.

Missing critical conversion data

The business couldn't answer fundamental questions: Which properties generated most interest? Did featured hero properties outperform grid listings? Where did users drop off in the enquiry funnel? What was the actual path from listing impression to enquiry submission?

Without view_item, view_item_list, begin_checkout, and purchase events, attribution was impossible and optimisation was essentially educated guesswork with a spreadsheet.

Action events happening after page load

Modern property websites are heavily asynchronous. Form submissions trigger network calls, not page refreshes. Traditional page-view tracking misses these critical conversion actions entirely, which is rather inconvenient when you're trying to measure actual business outcomes.

The solution needed to capture begin_checkout and purchase events from form interactions that happened dynamically after the initial page load—because apparently making things simple would be too straightforward.

Need for future-proof, maintainable solution

Whatever was implemented needed to survive template changes, site updates, and frontend modifications without constant developer intervention. The tracking layer needed to be genuinely resilient, not fragile and dependent on specific class names that get changed the moment a designer decides "btn-primary" isn't quite right anymore.

Technical approach and methodology

Universal inference generating structured dataLayer events

Rather than building site-specific tracking requiring backend engineering resources and ongoing maintenance every time someone changes a CSS class, Marc developed a universal inference engine that extracts product data intelligently from any property website's DOM structure and network traffic, then generates properly structured dataLayer events, all through Custom HTML tags within Google Tag Manager.

This approach prioritises explicit product metadata when present, falls back to DOM heuristics for pattern detection, monitors network traffic for conversion actions, and automatically populates dataLayer with GA4-compliant ecommerce events.

 

The system creates the structured data layer infrastructure that would traditionally require months of backend development—but does it entirely client-side through intelligent inference.

Layered extraction logic for reliability

The tracking layer operates with multiple fallback mechanisms ensuring data capture even when ideal conditions don't exist—which, let's be honest, is most of the time. For property names, it checks heading elements, structured data attributes, page titles, and meta tags in priority order.

For pricing, it identifies currency symbols, validates numeric patterns, checks spatial proximity to primary headings, and selects the highest value when multiple numbers appear. This layered approach handles real-world complexity rather than assuming perfect markup that only exists in wireframes.

DOM signature analysis for pattern recognition

Rather than relying on specific CSS class names that change whenever a frontend developer gets bored, the system analyses structural patterns—element types, class counts, child element counts—to identify repeating card grids.

By sampling container children and building "signatures" of common patterns, the system reliably detects product grids even when class names vary wildly. This makes the solution genuinely template-agnostic, which is a polite way of saying "it works even when your frontend is held together with hope and technical debt."

Network traffic monitoring for conversion events

For form submissions and other post-load actions, the system wraps window.fetch and XMLHttpRequest in a non-invasive way, inspecting only requests matching cart and form submission patterns.

This approach captures begin_checkout and purchase events triggered by AJAX calls without requiring custom event handlers or development work. Deduplication logic prevents multiple events from retry requests or multi-step submissions—because firing three "purchase" events for one form submission is precisely the sort of thing that makes finance teams ask awkward questions.

Deployment via Google Tag Manager

The entire solution deploys through Google Tag Manager with zero code changes to the website itself. The scripts execute client-side, extract product data from the DOM, generate structured dataLayer events, and push properly formatted GA4 ecommerce events.

 

This means immediate implementation without development sprints, instant updates when improvements are needed, no risk to site stability or performance, complete independence from website release cycles, and automatic dataLayer generation without backend engineering.

For The Super Prime, this meant going from zero tracking to full ecommerce visibility with proper dataLayer infrastructure in under two weeks, which is roughly the time it usually takes to schedule the first stakeholder meeting about maybe thinking about tracking requirements

Marc's solutions

Marc designed and implemented four core tracking capabilities covering the complete property discovery and enquiry funnel.

Property listing page tracking (view_item_list)

Listing page tracking proved particularly complex due to mixed content types—featured hero properties appearing above grids, varied card layouts within grids, and the need to avoid double-counting properties appearing in multiple contexts (because telling your boss "we got 1,000 property views!" when 500 were duplicates is a career-limiting move).

Marc implemented dual detection logic. Featured property detection searches hero sections, featured containers, and first-section elements, identifies anchor elements with /property/ URLs, validates that links contain meaningful property information not just "Learn More" or "View All" text that appears in every navigation element, extracts pricing to confirm it's genuine property content rather than a random link someone forgot to remove, and assigns position index 0 to featured properties for accurate impression tracking.

Grid detection uses DOM signature analysis. The system examines potential container elements, samples up to 18 children building structural signatures (think of it as fingerprinting the DOM without needing a warrant), identifies the dominant pattern across children, locates all cards matching that pattern, and includes "outlier" cards that contain property signals despite having different DOM structure—because apparently consistency is too much to ask from modern web development.

Each property card in both the grid and featured positions includes select_item event listeners attached to property links. When users click through from listing pages to property details, the select_item event fires capturing the specific property chosen, the list name (e.g., "Property Listing Page" or "Featured Property"), the item's position in the grid, and complete property metadata (name, brand, price, ID). This enables analysis of which listing positions drive most engagement and which properties generate clicks versus just impressions.

This approach captures up to 80 items per listing page whilst maintaining performance, intelligently merges featured properties with grid items avoiding duplication, assigns sequential position indices for accurate impression tracking, handles infinite scroll and dynamic loading scenarios without having a small breakdown, and provides complete engagement metrics through combined view_item_list and select_item events.

Deduplication logic creates content signatures from name, price, and brand, preventing the same property counting twice if it appears both featured and in grid, ensuring accurate impression counts for conversion rate calculations, and maintaining data quality for attribution modelling—because explaining to stakeholders why your conversion rate calculation is wrong is nobody's idea of a good Tuesday.

Property detail page tracking (view_item)

For individual property pages, the system extracts comprehensive product data including property name from heading elements with intelligent cleaning that removes gallery text and navigation noise ("Previous", "Next", "Image 1", "Gallery" and other UI detritus that pollutes product names), pricing information positioned near the main heading within a 700-pixel threshold to avoid accidentally capturing footer prices or header telephone numbers, currency detection supporting £, $, €, and AED with proper formatting, and stable item IDs extracted from URL patterns or generated via deterministic hashing when URLs lack explicit identifiers.

The system handles brand and developer attribution when present in DOM elements, but gracefully continues without it when absent—because not every property has a developer brand worth mentioning, particularly if they're the ones who built those luxury apartments in Dubai.

Price detection uses spatial analysis to identify the primary price. It locates the h1 heading, scans elements appearing below it within the 700-pixel threshold, identifies currency symbols and numeric values, and selects the highest price found—typically the asking price rather than reference numbers, postcode districts, or the year the property was built.

Homepage sponsored carousel tracking

The Super Prime features a prominent sponsored properties carousel on the homepage showcasing premium listings. Marc implemented dedicated tracking for this high-value placement using WordPress theme-specific selectors (.cs-post-carousel__wrapper .cs-post-carousel__item).

The system iterates through carousel items extracting property names and brands using intelligent splitting logic (detecting "Brand – Property Name" patterns common in luxury listings), pricing from .pro-price elements with parsePrice function selecting the highest number when multiple values appear, stable item IDs generated via consistent hashing from property URLs, and sequential index values starting after any featured properties.

​​

The homepage tracking also handles a secondary luxury properties carousel (#swiper-wrapper .cs-post-carousel__item), combining both carousel items into a single view_item_list event with continuous index numbering—sponsored carousel items get indices 1-n, luxury carousel items continue from n+1 onwards. This maintains accurate position tracking across multiple carousels on the same page.

​​​

Form submission tracking (add_to_cart, begin_checkout and purchase)

For enquiry form interactions, Marc implemented sophisticated event tracking that bridges the gap between page-level property data and user conversion actions. The Super Prime runs on WordPress with Contact Form 7, which presents its own delightful set of tracking challenges.

Add to cart & begin checkout detection

The system monitors when users first interact with enquiry forms by attaching focus event listeners to all form fields (inputs, textareas, and selects). When a user clicks or tabs into any form field for the first time, the system fires both an add_to_cart and begin_checkout event.

Crucially, the implementation includes a formFilled flag ensuring the event only fires once per page session, regardless of how many fields the user clicks into. This prevents the rather embarrassing scenario of firing 12 begin_checkout events because someone tabbed through your form deciding whether to actually fill it in.

Property context retrieval

Rather than trying to extract property data from the form itself (which rarely contains useful product information beyond "I'm interested in this property"), the system retrieves the view_item event data that was fired when the page loaded. It searches backwards through the dataLayer to find the most recent view_item event, extracts the complete items array including property name, ID, brand, and price, and formats it appropriately for the begin_checkout event.

This approach ensures begin_checkout events contain the same rich product data as view_item events, maintaining consistency across the entire funnel. The property context is already there from the page view—we're just being clever about reusing it rather than extracting everything again.

Purchase event tracking

For successful form submissions, the system hooks into Contact Form 7's wpcf7mailsent event, which fires when forms successfully submit. The purchase event uses the same property context retrieval logic as begin_checkout, searching the dataLayer for view_item data and formatting it with quantity: 1 to indicate a single property enquiry.

The implementation handles Contact Form 7's asynchronous submission behaviour gracefully, capturing successful submissions regardless of page state. It includes proper error handling for edge cases where view_item data might be unavailable, ensuring tracking degrades gracefully rather than breaking entirely.

Deduplication and data quality

Both events include once: true listeners preventing multiple firings if users click multiple fields or submit multiple times. Item data processing ensures proper field mapping—item_id falling back to item_name if explicit IDs are unavailable, quantity always set to 1 for property enquiries, and currency defaulting to AED (appropriate for The Super Prime's Middle Eastern market focus) when not explicitly set.

This approach delivers accurate conversion tracking without manual event handlers scattered throughout the codebase, reliable funnel analysis from listing impression through form submission, and proper attribution connecting property views to enquiry submissions. Most importantly, it works with WordPress and Contact Form 7's quirks rather than fighting against them.

GA4-compliant event formatting

Every event follows GA4 ecommerce standards precisely because "nearly right" payloads are silently ignored by GA4, which then leaves you wondering why your reports are empty whilst GA4 sits there smugly not telling you what went wrong.

Marc ensured proper items[] array structure with required fields, correct field naming following GA4 conventions exactly (because GA4 cares deeply about whether you wrote "item_name" or "itemName" and will absolutely punish you for getting it wrong), currency and value parameters at event level when appropriate, position and index tracking for impression analysis, and send_to configuration ready for deployment.

The payload structure includes item_id, item_name, item_brand, and price at item level, currency and value at event level, page_type and vertical_type for segmentation, and index always starting at 0 per GA4 standards—because apparently starting at 1 like normal humans would be too logical.

Results and impact

Marc's universal tracking layer delivered immediate visibility into property performance and user behaviour, with measurable business impact.

Complete funnel visibility established

The Super Prime now tracks the complete user journey from listing impression through property detail view to enquiry submission. Marketing teams can identify which properties generate most interest, understand the conversion path from discovery to enquiry, optimise featured property placement based on actual impression data rather than vibes, and calculate accurate conversion rates at each funnel stage.

Previously, these questions were essentially unanswerable. Now, the business has reliable data informing strategic decisions about property positioning, marketing spend, and website optimisation—which is considerably more useful than making decisions based on whoever shouted loudest in the meeting.

Implementation speed and zero development overhead

Full ecommerce tracking deployed in under two weeks with zero code changes to the website itself, no development sprints or release coordination, no technical debt or maintenance burden, and immediate updates when improvements are needed.

Traditional custom implementation would have required significant backend engineering work. Based on current UK contractor rates (£500-525/day for developers), a conservative estimate suggests this approach saved The Super Prime between £10,000-£15,000 in development costs alone.

Cost breakdown of traditional implementation:

Backend dataLayer architecture (5-7 days): Building server-side dataLayer infrastructure across WordPress templates, implementing product data mapping, creating consistent event schemas, and testing across all page types.

Frontend event handlers (3-4 days): Implementing form tracking, building deduplication logic, handling Contact Form 7 integration, and managing state across page interactions.

Testing and QA (2-3 days): Cross-browser testing, mobile device validation, event payload verification, and edge case handling.

Documentation and handover (1-2 days): Technical documentation for maintenance, training internal teams, and establishing governance processes.

Total estimated development time: 11-16 days at £500-525/day = £5,500-£8,400

However, this ignores the ongoing maintenance burden every time templates change, forms are added, or site updates modify DOM structure. Over a 12-month period, maintenance typically requires 5-10 additional days, bringing total first-year costs to approximately £10,000-£15,000.

The universal approach delivered the same functionality immediately, with no ongoing maintenance costs, no technical debt accumulation, and complete independence from development cycles. For a growing business, this meant analytics infrastructure that supports growth rather than constraining it.

Template-resilient tracking surviving site changes

The inference-based approach means tracking continues working reliably even when frontend templates change, new property types are added, URL structures evolve, or design updates modify DOM structure—all of which happen with alarming regularity on live websites.

This resilience saves ongoing maintenance costs and ensures measurement continuity during site evolution, which is a critical advantage over brittle tracking that breaks the moment someone renames a CSS class because they read an article about semantic HTML.

Accurate item identification and attribution

The multi-tier item_id strategy ensures every property has a stable, consistent identifier. URL extraction captures explicit numeric IDs when present, deterministic hashing generates consistent IDs from URL paths when explicit IDs don't exist (which is surprisingly often), and all IDs format as positive integers meeting GA4 requirements.

This consistency enables reliable cross-session attribution, accurate conversion tracking over time, proper deduplication across impression and interaction events, and foundation for future CRM integration connecting website behaviour to actual closed deals—because tracking form submissions is nice, but tracking revenue is considerably better.

Featured property detection eliminating tracking gaps

Many property sites show featured or hero properties above main grids. Generic tracking approaches miss these high-value impressions entirely, which is rather problematic when your featured properties are typically the most expensive ones you're trying to sell.

Marc's dedicated featured property logic captures these critical impressions, assigns proper position index 0 for impression tracking, includes pricing and full metadata for conversion analysis, and deduplicates when featured properties also appear in grids below.

This means complete, accurate impression data rather than systematically undercounting your most important listings, which would be embarrassing to explain in the quarterly review.

Foundation for optimisation and growth

With reliable tracking in place, The Super Prime can now run data-driven experiments testing featured property selection, compare grid layout variations with actual confidence rather than educated guessing, optimise enquiry form placement and design based on real user behaviour, and calculate true marketing ROI from acquisition through conversion.

The measurement infrastructure supports future enhancements like user property segmentation by price range or location, enhanced item categories and attributes, scroll depth tracking for engagement analysis, image impression tracking for media optimisation, and cross-session journey analysis for attribution modelling—all of which sound terribly sophisticated but are basically just "understanding what users actually do."

Key learnings and insights

Universal approaches scale better than custom implementations

Building a truly template-agnostic tracking layer required more upfront engineering investment than a quick site-specific implementation. However, the universal approach pays dividends—it works reliably across template variations, survives site changes without maintenance, and solves the same problem once rather than repeatedly for each client.

For businesses, this means faster deployment, lower total cost of ownership, and resilient tracking that doesn't break during routine site updates. It's the difference between building a bridge properly and just putting planks across and hoping nobody heavy walks on them.

DOM signatures outperform class-based selectors

Relying on CSS class names creates fragile tracking that breaks when designers update styles or developers refactor markup—which happens roughly every time someone deploys to production. Analysing structural patterns—element types, child counts, repeated signatures—proves far more resilient.

This approach requires more sophisticated logic but delivers tracking that genuinely survives real-world frontend evolution, which is considerably more useful than tracking that works perfectly until someone changes literally anything.

Spatial analysis solves pricing ambiguity

Property pages often show multiple numbers—reference codes, room counts, square footage, years built, postcode districts. Simple regex extraction captures all of them, creating pricing accuracy problems that make your reports look like someone's played a rather cruel joke.

Using spatial proximity to primary headings as a signal—"is this number near the h1?"—proved the most reliable method for identifying the actual asking price rather than incidental numeric content that happens to be on the page.

Network monitoring captures post-load conversions

Modern websites are asynchronous. Assuming conversion events happen on page load misses most critical actions, which is rather problematic when you're trying to track actual business outcomes rather than just pageviews.

Monitoring fetch and XMLHttpRequest traffic to detect form submissions and cart actions proved essential for accurate conversion tracking. Combined with proper deduplication, this approach captures real user actions without inflating event counts from retry logic or multi-request workflows—because explaining to finance why you recorded 47 purchases when only 12 people bought anything is a conversation nobody enjoys.

GA4 formatting precision matters more than data richness

Having comprehensive product data means precisely nothing if events don't format correctly. GA4 silently ignores malformed payloads rather than throwing helpful errors, which is GA4's particularly passive-aggressive way of telling you you've done something wrong.

Ensuring precise field naming, proper items[] structure, correct data types, and event-level parameters following GA4 conventions exactly proved critical for reliable tracking. "Nearly right" genuinely doesn't work with GA4—it's like nearly catching a train. Technically close, practically useless.

Similar challenges Marc can solve

If your organisation faces tracking challenges similar to The Super Prime's, Marc can help:

  • Ecommerce or property platforms needing GA4 tracking without extensive development resources or the patience to wait six months

  • Websites lacking data layers requiring inference-based tracking solutions that actually work

  • Multi-template or multi-brand sites needing consistent measurement across variations without manually tagging everything

  • Conversion tracking for AJAX-driven forms and post-load interactions that happen when nobody's looking

  • Template-resilient analytics surviving frontend changes without requiring a developer every time someone moves a button

  • Rapid deployment requirements where custom implementation timelines don't align with business reality

Working with Marc

Marc works with businesses throughout the UK, EU, and internationally via remote collaboration. Based in Poplar, London, he's available for on-site work across the UK whilst serving international clients remotely.

Projects typically begin with discovery to understand business context, measurement requirements, and technical landscape—basically working out what's actually broken and what you need. Marc then designs solutions, implements technical systems, validates data quality, and transfers knowledge ensuring teams can maintain analytics independently without needing to phone him every time something changes.

Engagement models include project-based work for specific implementations, ongoing retainers for continued optimisation and support, and strategic advisory for organisations building internal analytics capability. Or, in English: fixing the immediate problem, making sure it stays fixed, or teaching your team how to fix things themselves.

Ready to find out what's actually wrong with your GA4?

Whether you need GA4 implementation, analytics strategy, technical integration, or ongoing support, Marc can help transform your data into reliable business intelligence.

Schedule Your Free Consultation →

He's surprisingly friendly, even when telling you your GA4 tracking's a disaster.

See Marc's GA4 expert credentials and case studies →

Or explore Marc's specialised services:

bottom of page