- Issue created by @bluegeek9
- πΉπThailand AlfTheCat
This would be really great to have, I have a site that would really benefit from the ability to show users the views of all their entities (products and taxonomy terms). Right now, if reporting only node views, the stats would be greatly under reported.
If we could include a pseudo field to a view mode or views display it would be fantastic.
- π©πͺGermany kreatIL
I maintain a Drupal site with around 30,000 media entities, which constitute approximately 95% of our content. The Visitors module would be incredibly useful for us to track and analyze user interactions with this content.
I appreciate the discussion here about extending entity types, and I want to echo the value of this enhancement. Supporting media entities would allow us to gain detailed insights into user engagement across all content types, making Visitors a powerful tool for a wider range of Drupal sites.
- πΊπΈUnited States bluegeek9
Hi,
The code already supports recording additional entity types. The issue I ran into was how to display the view count. Nodes have a links region. Links is where the Statistics project displays the view count. Other entity types do not necessarily have links. I try a pseudo field but it did not look good.
How would you want to show the view count for a Media entity?
You might be able to accomplish some of what you need with the views plugins introduced in 8.x-2.20.
- πΉπThailand AlfTheCat
If we could leverage views it would already be great because the https://www.drupal.org/project/viewfield β module could then allow it to be added to any view mode of any entity.
- πΊπΈUnited States bluegeek9
@alfthecat,
The code supports views.
Suppose you edit visitors.config and add the entity types to counter.entity_types, it will count the visits and you will be able to access the count in views. There is not an option in the settings to add the entity types. You well need to do it manually.
- πΉπThailand AlfTheCat
Hi @bluegeek, thanks for clarifying that.
One additional thought I had based on this conversation, is that in some cases (like my marketplace), it would be very valuable if we could track impressions by viewmode or a view.
If we could then build reporting views and display statistics by view mode, it would open up the possibility of offering the boosting of posts, user profiles, and other forms of content promotion to the site's users. If the site sells ad space, this would be vital.
Just a thought, not sure if a psuedo field would be the way to go but I imagine adding it to a view mode to initiate tracking might be handy and intuitive for site builers.
- πΊπΈUnited States bluegeek9
@alfthecat,
Does the view mode correspond to a URL?
Display views, or Form Views, or both?
Are the ads in Blocks?
- πΉπThailand AlfTheCat
Hi @bluegeek,
The example I'm thinking of, and the kind of site I'm referring to, is like one of those food delivery platforms (it can apply to any kind of directory and marketplace). Let's say each restaurant has a page and they add their menu items as commerce products. Both the restaurant nodes and the commerce products leverage view modes. The restaurant nodes would have a viewmode for "full view" and "ad". The products would have a "full view" and "catalog" viewmode, the latter styled for display in a typical catalog grid.
To restaurant owners, it would be useful to see how often their dishes were shown to users on the site, which would be the "catalog" view mode. Also, restaurant owners might want to boost their page at a fee, so then it would be necessary to report how often their restaurant node's "ad" viewmode was served to users of the site.
Adding a psuedo-field to the entity, maybe one for each viewmode, would be an easy way to add a segmented "counter" to entities and views for site builders. Maybe there's a better approach, but I think this kind of reporting would be very valuable for this kind of platform.
I currently display a footnote under the user's visitor count stating it doesn't include product views or views in recommender views distributed across the site and am not able to provide a "boosting" feature because there would be no way of reporting the results.
- πΊπΈUnited States bluegeek9
alfthecat,
Tracking impressions might be something that can be done with 'Visitors Actions'.
β¨ Visitor Actions Active