OceanParcels / oceanparcels_website

Repository for the oceanparcels.org website
7 stars 7 forks source link

[BUG] Broken linking of tutorial notebooks #72

Closed VeckoTheGecko closed 1 year ago

VeckoTheGecko commented 1 year ago

Recreation

Initial thoughts Clicking a link such as: https://github.com/OceanParcels/oceanparcels_website/blob/c237308277613ebbf40c68f14ac67833f6439fbf/index.html#L649

uses the captureTutorialLink callback: https://github.com/OceanParcels/oceanparcels_website/blob/c237308277613ebbf40c68f14ac67833f6439fbf/index.html#L40-L52

I think the fix is just removing 'hitCallback': function(){document.location = url;}.


Happy to work on this in the coming week or two when I have time. Feel free to claim if someone else wants to patch this beforehand.

erikvansebille commented 1 year ago

I think that @reint-fischer added this functionality to better track - using Google Analytics - which tutorials were being opened (since they are hosted on a different website). Not sure if that functionality would still work if we remove the hitCallback call, because I don't know exactly what it does?

VeckoTheGecko commented 1 year ago

Looking deeper into this, I think you're right (removing the hitCallback call can result in a redirect before the query is hit, hence defeating the purpose). I'm not sure the fix is simple

VeckoTheGecko commented 1 year ago

No longer relevant