How do I track individual widget performance in Google Analytics?

Learn how to set up custom dimensions in Google Analytics 4 to track performance metrics for each TripWorks widget on your website.

Written By Aaron Fessler (Super Administrator)

Updated at October 22nd, 2025

How do I track individual widget performance in Google Analytics?

Yes! TripWorks makes it easy to measure the performance of each booking widget individually—even when the same widget appears across multiple domains or partner websites.

 

 

Why Track Individual Widgets?

Many tour and activity operators face a common challenge: you can't tell which booking widgets are actually driving conversions.

You might have widgets embedded on:

  • Your main website homepage
  • A dedicated landing page for a specific tour
  • Partner websites (hotels, tourism boards, affiliates)
  • Blog posts and promotional pages
  • Multiple domains you operate

Without individual widget tracking, Google Analytics just shows you aggregate data—you can't answer critical questions like:

  • "Which widget placement converts best?"
  • "Is the widget on our partner's site actually generating bookings?"
  • "Should we invest more in the homepage widget or the blog widget?"
  • "Which domains are our best-performing channels?"

The Solution: Widget-Level Analytics

TripWorks automatically sends unique tracking data for every widget to your Google Analytics account. This lets you:

  • Track the same widget across multiple domains - See performance of a single widget embedded on your site, partner sites, and affiliate domains—all in one report
  • Compare different widgets - Understand which widget configurations drive more conversions
  • Measure partner performance - Know exactly how many bookings come from each partnership
  • Optimize widget placement - Make data-driven decisions about where to promote your booking flow
  • Run A/B tests - Test different widget designs and see which performs better

Every time a TripWorks widget loads, we send two custom dimensions to Google Analytics:

  • tripworks_widget_id - A unique identifier that stays consistent across all domains where the widget appears
  • tripworks_widget_name - A human-readable name you choose (like "Partner Widget - Hotel ABC" or "Homepage Hero Widget")

To start using this data, you'll need to set up custom dimensions in Google Analytics—it only takes a few minutes.

Setting it Up

Follow these steps to create custom dimensions in Google Analytics 4 (GA4):

Step 1: Access Admin Settings

  1. Log into your Google Analytics account
  2. Click Admin in the bottom left corner
  3. In the Property column (middle), click Custom definitions

Step 2: Create the Widget ID Dimension

  1. Click the Create custom dimensions button
  2. Configure the dimension:
    • Dimension name: TripWorks Widget ID
    • Scope: Event
    • Description: Unique identifier for TripWorks widgets
    • Event parameter: tripworks_widget_id
  3. Click Save

Step 3: Create the Widget Name Dimension

  1. Click Create custom dimensions again
  2. Configure the dimension:
    • Dimension name: TripWorks Widget Name
    • Scope: Event
    • Description: Human-readable name for TripWorks widgets
    • Event parameter: tripworks_widget_name
  3. Click Save

Step 4: Wait for Data Collection

After creating custom dimensions, it typically takes 24-48 hours for Google Analytics to start populating data. Historical data collected before creating the dimensions won't be retroactively included.

Step 5: Create a Custom Report

Once data is flowing, you can create reports to analyze widget performance:

  1. In Google Analytics, go to Explore in the left menu
  2. Click Blank to create a new exploration
  3. In the Dimensions section, click the + button
  4. Search for TripWorks Widget Name and select it
  5. Add metrics you want to track (e.g., Events, Conversions, Sessions)
  6. Drag TripWorks Widget Name to the Rows section
  7. Drag your chosen metrics to the Values section

Your report will now show performance data broken down by individual widget!

Real-World Use Cases

Track the Same Widget Across Multiple Domains

The Problem: You have the same widget embedded on your website (yourtours.com), a hotel partner's site (besthotel.com), and a tourism board website (visitmycity.com). Without widget tracking, you can't tell which domain is driving bookings.

The Solution: Create one widget called "Sunset Kayak Tour Widget" and embed it on all three domains. In Google Analytics, you'll see:

  • Widget Name: Sunset Kayak Tour Widget
  • Domain: yourtours.com → 45 conversions
  • Domain: besthotel.com → 12 conversions
  • Domain: visitmycity.com → 3 conversions

Now you know your hotel partnership is valuable, while the tourism board placement might need optimization or isn't worth the effort.

Compare Widget Performance Within Your Site

If you have multiple TripWorks widgets embedded across different pages of your own website, you can see which placements convert best:

  • "Homepage Hero Widget" vs "Tours Page Widget" vs "Blog Sidebar Widget"
  • Compare conversion rates between widget placements
  • Identify which pages generate the most engagement
  • Make data-driven decisions about widget placement and design

A/B Testing Widget Designs

Create two widgets with different configurations and name them accordingly:

  • "Trip Builder - Catalog View"
  • "Trip Builder - Calendar View"

Embed them on similar pages and compare performance in Google Analytics to see which design drives better results.

Track Partner and Affiliate Performance

Give each partner their own uniquely-named widget:

  • "Partner Widget - Beachfront Hotel"
  • "Partner Widget - Downtown Hotel"
  • "Affiliate Widget - Travel Blogger Sarah"

Track exactly how many bookings each partnership generates to measure ROI and negotiate better terms.

Measure Marketing Campaign Performance

Create dedicated widgets for specific campaigns:

  • "Summer 2025 Promotion Widget"
  • "Email Campaign - Newsletter Widget"
  • "Instagram Bio Widget"

See which marketing channels drive the most bookings and optimize your marketing spend accordingly.

What Events Are Tracked?

TripWorks automatically sends these events to Google Analytics with widget information:

  • tripworks_widget_load - Widget initially loads on the page
  • tripworks_view_item - User views an experience/activity
  • tripworks_add_to_cart - User adds an item to cart
  • tripworks_purchase - User completes a booking

Each of these events includes both the tripworks_widget_id and tripworks_widget_name parameters, allowing you to filter any report by widget.

Finding Your Widget ID and Name

To see which widget ID corresponds to which widget name:

  1. Log into TripWorks
  2. Go to SetupToolsWidgets
  3. Click on any widget to view its details
  4. The widget name is shown at the top of the modal in the "Widget Name" field

 

The widget ID (UUID) can be found in the embed code and looks like: afdce8d9-735c-4da4-9598-a1c6c682deca

Tip: Use descriptive widget names to make your Google Analytics reports easier to understand! Names like "Homepage Hero Widget" or "Partner - Beachfront Hotel" are much clearer than generic names like "Widget 1".

Troubleshooting

I don't see any widget data in Google Analytics

  • Wait 24-48 hours after creating custom dimensions
  • Verify the widget is actually loading on your site (check browser console for [TripWorks DataLayer] messages)
  • Ensure your Google Analytics tracking ID is correctly configured in TripWorks under SetupMarketingIntegrations
  • Check that you've spelled the event parameter names correctly (they must match exactly: tripworks_widget_id and tripworks_widget_name)

Widget name shows as "undefined"

  • Make sure you've given your widget a name in the TripWorks widget builder
  • Try re-saving the widget configuration
  • Clear your browser cache and reload the page

Need Help?

If you need assistance setting up widget tracking or interpreting your analytics data, please contact our support team at support@tripworks.com. We're here to help!


Related Articles:


Tags: google analytics, widgets, tracking, analytics, custom dimensions, reporting, ga4