Segmenting a visitor map to only a single page

Some context: I’m working on a project that uses Drupal as a digital archive for storing all kinds of assets like images, videos, datasets, etc. where each asset has a URL that includes a unique identifier. I’m working on building some blocks that would display on an asset’s page and show usage data for that asset, and I’ve already got some basic stuff working like pageviews and downloads for the associated files that work by getting the URL of the current page and then querying Matomo for data associated with that URL.

I’d like to make use of Matomo’s “Visitor Map” widget, which by default shows the location of visitors to your site in general, but I would like to modify it to show a map of visitors to a specific URL so that we can visualize where people are viewing a particular asset from.

My current thinking is that I should do this through the ‘segment’ GET parameter, but I nothing I try is working, I just keep getting “There is no data for this report.” for URLs that I can see visitor data from in the admin UI.

The API call I’m using to get the map, which I copied from the “Widgetize reports” section of the settings UI for “Visitors - Locations > Visitor Map”, is

http://localhost:8000/matomo/index.php?module=Widgetize&action=iframe&widget=1&moduleToWidgetize=UserCountryMap&actionToWidgetize=visitorMap&idSite=1&period=day&date=today&disableLink=1&widget=1

as I’m working in a virtual machine. http://localhost:8000 is the Drupal site sending the tracking info, and http://localhost:8000/matomo is the Matomo server.

Say for instance that I wanted to display a visitor map of all users that accessed http://localhost:8000/images/12345, how should I put that into the API call to get what I want? I’ve tried adding

&segment=pageUrl==http%3A%2F%2Flocalhost%3A8000%2Fimages%2F12345;

and

&segment=actionType==pageviews;actionUrl==http%3A%2F%2Flocalhost%3A8000%2Fimages%2F12345;

to the end of the original query and had no luck, I just keep getting “There is no data for this report.” even though I can see visits to http://localhost:8000/images/12345 getting tracked in the admin UI.