Skip to main content

Overview

When Planpoint is embedded via iframe, the parent page cannot directly access what happens inside. PostMessage Tracking solves this by broadcasting events from the iframe to your page, allowing you to capture and forward them to any analytics tool.

Setup

1. Enable in Dashboard

  1. Go to Sales & Marketing → Event Tracking
  2. Toggle PostMessage Analytics on
  3. Select the events you want to track
  4. Click Select All for comprehensive tracking

2. Copy Embed Code

Go to Settings → Embed Code and click “Copy”. The generated code automatically includes the analytics listener script when PostMessage Analytics is enabled.

3. Uncomment Your Analytics Platform

The embed code includes commented-out lines for common platforms. Uncomment the one you use:
  • Using GA4 with gtag.js? → Uncomment the gtag line
  • Using Google Tag Manager? → Uncomment the dataLayer line
  • Using something else? → Add your own handler (see examples below)

Available Events


Integration Examples

Google Analytics 4 (gtag.js)

Google Tag Manager

Custom Handler


Event Data Structure

All events follow this format:

Sample Event Payloads

Unit Viewed:
Contact Form Submitted:
Favorite Added:

Best Practices

  1. Select only needed events — Reduces noise in your analytics
  2. Test in browser console first — Events log to console by default
  3. Use GTM for flexibility — Easier to modify tracking without code changes
  4. Set up GA4 custom dimensions — Map projectName, unitName for better reporting

Troubleshooting

Events not firing?

  • Verify PostMessage Analytics is enabled in dashboard
  • Check that specific events are selected
  • Regenerate and update your embed code after changing settings

Events firing but not in GA4?

  • Confirm gtag is loaded before the listener
  • Check GA4 DebugView for incoming events
  • Verify your GA4 measurement ID is correct

Migration from GTM Code Injection

If you were using the legacy GTM Code Injection feature: For embedded usage, PostMessage Analytics is recommended.