Closed cbowskill closed 1 year ago
Gareth's comment on https://github.com/wellcomecollection/wellcomecollection.org/pull/7630 made me wonder; I went to run James's slice analysis tool, and here's the first thing it shows you:
Slice count [
[ 'instagramEmbed', 0 ],
[ 'twitterEmbed', 0 ],
[ 'vimeoVideoEmbed', 1 ],
[ 'table', 1 ],
[ 'searchResults', 1 ],
[ 'mediaObjectList', 1 ],
[ 'map', 2 ],
[ 'titledTextList', 2 ],
[ 'iframe', 4 ],
[ 'soundcloudEmbed', 4 ],
[ 'collectionVenue', 5 ],
[ 'tagList', 11 ],
[ 'imageList', 15 ],
[ 'youtubeVideoEmbed', 22 ],
[ 'contentList', 31 ],
[ 'discussion', 39 ],
[ 'infoBlock', 56 ],
[ 'gifVideo', 58 ],
[ 'contact', 59 ],
[ 'quote', 137 ],
[ 'embed', 187 ],
[ 'quoteV2', 428 ],
[ 'editorialImageGallery', 531 ],
[ 'standfirst', 672 ],
[ 'editorialImage', 1947 ],
[ 'text', 7288 ]
]
If we never use them, I wonder if it's worth removing the Twitter/Instagram embed code entirely, and moving the one Vimeo video over to YouTube?
It's possible that there are more Vimeo videos, as they can be added with the embed slice. So we'd need to check the pages that include embeds.
Ah sorry, I should have clarified – that was looking for the embed slice. Is there another way they can be included?
ts-node sliceAnalysis --type embed
So the output above, is a summary of all slice types, and happens regardless of which slice you are actually looking for. Below that you get you get a list of prismic ids etc. for the specific slice you're interested in.
The output above says we have 1 vimeoVideoEmbed, which is what I thought you were referring to when you said, "moving the one Vimeo video over to YouTube?", but this is misleading. This slice is deprecated and now we use the embed slice to include Vimeo videos. So any of the 187 embeds could be a Vimeo embed (or youtube or soundcloud).
in the content app we don't actually do anything with a 'vimeoVideoEmbed' slice. We only deal with 'embed' slices and check if the provider name is Vimeo (or Youtube or Soundcloud).
It looks like there is some tidying up to do in Prismic. Looking at this page, which is the one responsible for [ 'vimeoVideoEmbed', 1 ],
in the slice count. It actually includes the vimeoVideoEmbed slice (which we don't render and can be deleted) and another embed slice with the same video, which is the one we show.
This could also be true of the 22 youtubeVideoEmbed slices showing up in the slice count, but I haven't looked.
Ah, I get what you mean now – thanks for explaining. Sorry for muddying the waters!
I've just run a script over all the pages with embeds and https://wellcomecollection.org/articles/WeSrDCQAAGrtKEo2 does seem to be the only place we have an embed of a Vimeo video. If we can move this to youtube (and get rid of the vimeo code) then that's probably worth doing.
Just noting here that it looks like the vimeo embed on that page has indeed been removed: https://wellcomecollection.org/articles/WeSrDCQAAGrtKEo2
Closing this as there is no further action at this time. Moved all this info to a document https://docs.google.com/document/d/1LhPHsK7RXJKSDn6FcjZnnMsIHnRX1aAyKMwh6LHekyA/edit?usp=sharing
Set by Wellcome Collection
toggle_{id}
WC_globalAlert
WC_{id}
WC_cookiesAccepted
wecoIdentitySession_v1
isPreview
* 'Essential' for content editors who need to view preview content. Not essential for general users (but also won't be dropped in the browser for general users)
dlcs-token-2
Third party
did_compat
auth0_compat
auth0
did
__cf_bm
Auth0 cookie policy details list lots more cookies that may be set when using their services. However, the list above is all I can see being set.
_hjSessionUser_{id}
_hjSession_{id}
_hjIncludedInSessionSample
_hjAbsoluteSessionInProgress
_hjFirstSeen
_hjIncludedInPageviewSample
_gid
_gat
_ga
_ga_#
VISITOR_INFO1_LIVE
YSC
CONSENT
We embed videos from YouTube using privacy-enhanced mode. This mode may set further Cookies on your computer, once you click on the YouTube video player, which measure how you view YouTube videos on our websites. YouTube will not store personally-identifiable Cookie information for playbacks of embedded videos using the privacy-enhanced mode.
ajs_anonymous_id
seg_first_utm
seg_first_url
optimizelyEndUserId
prismic-auth
io.prismic.preview
SESSION
is-logged-in
X_XSRF
intercom-id-{id}
intercom-session-{id}
mp_{id}_mixpanel
_hjSessionUser_{id}
_hjSession_{id}
_hjid
_hjAbsoluteSessionInProgress
_hjIncludedInPageviewSample
__stripe_sid
__stripe_mid
Types
Other services checked
Note
The iframe slice in Prismic has the potential to be a source of 3rd party cookies. It is currently only used to include the pano2vr player, such as on this page, which we actually host all the code for and don't set cookies. However, it could be used for other things that might. We should ask the content editors for a heads up, if they intend to use it for anything else.
To do
Unknown
Where are the boundaries of what we need to list or not?