exhibits icon indicating copy to clipboard operation
exhibits copied to clipboard

Maps 101 exhibit displaying analytics for a different exhibit

Open caaster opened this issue 3 years ago • 7 comments

The Maps 101 exhibit is displaying analytics for a different exhibit, possibly Maps of Africa, or?

caaster avatar Apr 05 '21 18:04 caaster

FWIW, after the Maps 101 exhibit stub was created, it was initially populated with a JSON import from this exhibit: https://exhibits.stanford.edu/nhdmaps.

caaster avatar Apr 05 '21 21:04 caaster

I think we'd found that the cause of this was probably that the slug for the exhibit is maps, which meant that it would also match maps-of-africa or anything else that started with maps.

I think they may have republished the Maps 101 exhibit with a different slug (maps101).

Are there any remaining concerns here?

anarchivist avatar Apr 13 '21 18:04 anarchivist

Yes, here's the scoop:

  • I checked with Andrea & found she had not yet disseminated the link to the Maps 101 exhibit to various constituencies, although she is planning on doing so very soon. Good timing! So, I exported & imported the exhibit into a new exhibit stub with a new slug (now /maps101), Andrea double checked it, and now /maps101 is the published exhibit.
  • It would really be helpful to get to the bottom of the GA config issue, and fix it in a future exhibits work cycle if possible.
  • In the interim, I need a list of all exhibit slugs from the Access Team, and I will check it each time someone requests a new exhibit. If they are requesting a slug which will cause an analytics problem/conflict, I will recommend a different slug(s) for them to choose from instead. Is there a way I can generate the slug list myself, as this will of course change each time a new exhibit is created?

caaster avatar Apr 13 '21 18:04 caaster

Can we split your last bullet out into a separate ticket since it's a nearer term request?

anarchivist avatar Apr 14 '21 15:04 anarchivist

Created #2076

caaster avatar Apr 14 '21 15:04 caaster

@corylown, I think I need your help with this. Given the above discussion, in particular that, "the cause of this was probably that the slug for the exhibit is maps, which meant that it would also match maps-of-africa or anything else that started with maps. I think they may have republished the Maps 101 exhibit with a different slug (maps101)."

If the above is true, when we re-enable Google analytics in Exhibits, can we write the code in such a way so that it does not do this -- and instead, requires an exact match for each exhibit slug?

caaster avatar Jul 08 '24 20:07 caaster

@caaster yes, I think the code could be improved so that it checks for an exact slug (for developer reference, that happens here in Spotlight: https://github.com/projectblacklight/spotlight/blob/9ed6da6934beb012e9783c4c155e835a4dbb6ef9/app/models/spotlight/analytics/ga_model.rb#L26).

It looks like most of the analytics code lives in Spotlight core and work may be required there to support pulling in analytics data from Google Analytics 4 properties (in addition to us sorting out the Google Cloud API access that is required on our side). I've created https://github.com/projectblacklight/spotlight/issues/3050 for us to look at the GA4 support in Spotlight.

corylown avatar Jul 08 '24 20:07 corylown