Embed Analytics in Your Google Analytics
With the script embed, what a visitor does inside the embed reaches your page's
own Google Tag Manager or Google Analytics 4 as a vibemap_ event: a card click
arrives as vibemap_event_selected, a ticket link as vibemap_event_link_clicked.
You can report on the embed next to the rest of your site, with no Vibemap login.
What you need
- The script embed (
load.js). A bare<iframe>can't pass events to your page: nothing on your page listens for them. - Google Tag Manager or gtag.js on the page that loads the script.
Inline render mode (data-render-mode="inline") runs the embed in your page
instead of a frame. Its events reach your analytics the same way, under the same
rules, with surface inline and embed_type inline-list or inline-single.
Where the events land
The script picks one destination per event:
| Your page runs | The script sends |
|---|---|
| Google Tag Manager | dataLayer.push({ event: "vibemap_<name>", vibemap: { ...parameters } }) |
| gtag.js, without Tag Manager | gtag("event", "vibemap_<name>", { ...parameters }): straight to every GA4 property your gtag configures |
Only a window.dataLayer (Tag Manager not loaded yet) | The same dataLayer.push, which Tag Manager reads when it loads |
| Neither | Nothing |
The script recognizes Tag Manager by its container snippet (the gtm.start
push) or a loaded GTM- container. A page with Tag Manager gets the data layer
push only, even if it also defines gtag, so no event counts twice. Vibemap's
own container, which the WordPress plugin loads, does not count as yours: beside
gtag.js the events still go to gtag.
Before each data layer push the script sends { vibemap: null }. Tag Manager merges every
push into its data model, so without the reset an event would carry an earlier
event's vibemap.item_id.
Send the events to GA4 through Tag Manager
- In Tag Manager, open Variables. Under User-Defined Variables, click
New, choose Data Layer Variable, and set Data Layer Variable Name
to
vibemap.item_name. Save it asDLV - vibemap.item_name. Repeat for each parameter you want in reports, such asvibemap.item_id,vibemap.listandvibemap.embed_type. - Open Triggers, click New, and choose Custom Event. Set Event
name to
vibemap_.*and tick Use regex matching. - Open Tags, click New, and choose Google Analytics: GA4 Event.
Enter your Measurement ID, set Event Name to
{{Event}}, and under Event Parameters add one row per variable, for exampleitem_name={{DLV - vibemap.item_name}}. Set Triggering to the trigger from step 2. - Click Submit to publish the container.
With gtag.js only, skip these steps: the events reach GA4 with their parameters already attached.
To see a parameter in GA4 reports, register it: in GA4 open Admin, then
Custom definitions, click Create custom dimension, keep the scope
Event, and enter the parameter name (item_name, list, embed_type...).
Reports show a dimension only for events collected after you create it.
To check the setup, open your page in Tag Manager's Preview mode and click a
card in the embed: vibemap_event_selected appears in the event list. Without
Tag Manager, open GA4's Realtime report or run this in the browser console:
dataLayer.filter((e) => /^vibemap_/.test(e.event))
Turn it off
Add data-analytics="off" to the script tag, or analytics=off to the embed URL.
Either one stops the events, the corrected page view below, and the embed's own
Vibemap analytics. false, 0 and no work too.
<div id="vibemap-embed"></div>
<script
src="https://web.vibemap.com/load.js"
data-iframe-el="vibemap-embed"
data-url="https://web.vibemap.com/embed/grid?list=downtown-events"
data-analytics="off"
></script>
Parameters on every event
| Parameter | Value |
|---|---|
partner | Your organization's slug, or the theme slug when the embed URL names no organization |
theme | The embed's theme slug |
list | The list's slug or ID, for a list embed |
embed_type | grid, map-grid, carousel, single, calendar (a grid that opens on its calendar view), a form such as add-event, or inline-list and inline-single in inline mode |
surface | embed, or inline in inline mode |
host | Your page's hostname |
client_version | The embed build that sent the event |
A parameter the embed doesn't know is left out, not sent empty.
Events
Each event below arrives with the vibemap_ prefix, so event_selected arrives
as vibemap_event_selected. Parameters are listed without the common ones above.
| Event | Sent when the visitor | Parameters |
|---|---|---|
event_selected | Opens an event from a card, map pin, list row, carousel slide or calendar | item_id, item_name, source, position_in_list |
place_selected | Opens a place from a card, map pin, list row or carousel slide | item_id, item_name, source, position_in_list |
item_impressions | Sees cards: each counts once per page view, after a second at least half on screen | source, item_type, item_ids, positions, item_count |
load_more | Loads more cards, with Load More or by scrolling your page | source, items_shown, items_total, trigger |
event_viewed | Sees an event's details | item_id, item_name, item_category |
place_viewed | Sees a place's details | item_id, item_name, item_category |
event_link_clicked | Follows a ticket or event link, the embed's main conversion | item_id, item_name, item_type, outbound_host, link_type |
website_clicked | Follows a place's or event's website link | item_id, item_type, item_name, url, outbound_host |
social_link_clicked | Follows a Facebook, Instagram or X (twitter) link | item_id, item_type, platform |
directions_clicked | Asks for directions | item_id, item_type, item_name |
call_clicked | Clicks the phone number | item_id, item_type, item_name |
share_clicked | Shares an item | item_id, item_type, share_method |
save_to_calendar | Adds an event to a calendar | item_id, item_name, provider |
bookmark_added | Saves an item | item_id, item_type, item_name |
bookmark_removed | Removes a saved item | item_id, item_type |
recurring_view_all | Expands all dates of a recurring event | item_id, action |
section_toggled | Opens or closes a details section | item_id, section, expanded |
vibes_toggled | Shows or hides an item's vibes | item_id, expanded |
vibe_clicked | Clicks a vibe tag | item_id, vibe_name |
category_clicked | Clicks a category | item_id, category_name, category_url |
learn_more_clicked | Clicks Learn more | item_id, item_type |
image_gallery_viewed | Opens the photo gallery | item_id, image_index |
image_gallery_navigated | Moves through the gallery | item_id, direction |
panel_closed | Closes the details panel | item_id, item_type |
tab_changed | Switches tabs | tab_name, previous_tab |
filter_applied | Applies a filter | filter_type, filter_value |
filter_cleared | Clears the filters | previous_filters_count |
date_range_changed | Picks a date range | start_date |
view_search_results | Searches | results_count |
map_zoomed | Zooms the map | zoom_level, zoom_direction |
cluster_clicked | Clicks a cluster of map markers | cluster_count, zoom_level |
group_expanded | Expands markers stacked at one spot | group_count, expansion_mode |
ad_clicked | Clicks a banner ad | ad_slot, ad_image, ad_link |
form_started | Starts a form, such as Add an event | form_type |
form_submitted | Submits a form | form_type, success |
business_claimed | Claims a business | business_id, success |
New events and parameters can appear as the embed grows; an existing name changes only with a changelog entry.
Which card, and where
source says where the visitor found the item, so a click on a map pin and a
click on a card are told apart:
source | Where |
|---|---|
card | A card in a grid |
marker | A pin on the map |
list | A row in the list view, or the cards beside the map |
carousel | A carousel slide, or the swipe cards over the map on a phone |
calendar | An event in the calendar |
position_in_list counts from 1 in the order the visitor sees: the second card
in the grid is 2. A map pin carries one only when it shows a number.
Counting cards seen
Cards seen arrive in batches: one item_impressions event lists up to 20 cards
from one list in item_ids, and item_count says how many. Count cards seen
by adding up item_count, not by counting the events. In GA4, register
item_count as a custom metric (Admin, Custom definitions, Custom
metrics). The click-through rate of the grid is then the event_selected and
place_selected events with source card, divided by the sum of item_count
for source card. item_ids arrives comma-joined with as many whole ids as
fit in GA4's 100 characters, and positions lists the places of those ids only,
so use item_count for totals.
Ticket clicks
event_link_clicked names where the visitor went in outbound_host (for
example eventbrite.com) and which link in link_type: primary for the
event's own button (Get Tickets, More Info), else the link's type, such
as tickets. It never sends the link itself, whose address can carry personal
details. To count ticket clicks as conversions in GA4, mark
vibemap_event_link_clicked as a key event.
The corrected page view
A single event or place embed also sends one page view titled with the item's
name, so the hit doesn't carry your template's generic title. It goes to
Universal Analytics (ga) or gtag as a standard page_view. A page with Tag
Manager and neither ga nor gtag gets it as vibemap_page_view, with page_title, page_location
and page_path at the top level of the push. The embed's own page views inside
the frame are never forwarded, so a visit counts once.
What is never sent
The script checks every event before it reaches your analytics, so a visitor's details stay out of your GA4 property whatever the embed sends:
- No personal data or typed text. Email addresses, phone numbers, people's names, street addresses, search terms, messages and descriptions are dropped. A value that looks like an email address is dropped wherever it appears.
- No coordinates. Latitude and longitude are dropped, since they can be the visitor's own location.
- No query strings. A link keeps only its address up to the
?. - Nothing that rewrites your hit.
page_location,page_title,page_referrer,send_to,user_id,client_idandsession_idare dropped, so an event always counts for your page and your property. - GA4's limits are kept. Values are strings of up to 100 characters, numbers or booleans; a list arrives comma-joined, whole elements only. An event carries at most 25 parameters, and an embed sends at most 500 events per page load.
The script accepts events only from its own embed frame, and only while that frame shows a Vibemap page. If the visitor follows a link inside the frame to another site, that site can't send events into your analytics. Two embeds on one page never forward each other's events.