18F / analytics-reporter

Lightweight analytics reporting and publishing tool for Digital Analytics Program's Google Analytics 360 data.

Home Page:https://analytics.usa.gov/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

petitions URL trailing text getting stripped in link on homepage

lheyman opened this issue · comments

There's is a We The People petition listed in the "Top 20 Pages" list that appears to be getting some text stripped out, causing an improper link.
This:
https://petitions.whitehouse.gov//petition/take-out-alejandro-garc%C3%ADa-padilla-governorship-puerto-rico-now/B0jgB8Sv
is being turned in to this in the top 20 list:
https://petitions.whitehouse.gov//petition/take-out-alejandro-garc%C3%ADa-padilla-governorship-puerto-rico-now/

OK OK, I'm on it! :)

Ahhh @lheyman, this is the more general problem of how the DAP lower-cases URIs:

digital-analytics-program/gov-wide-code#10

We're stripping off the text because the lower-cased URI is a 404, and this is a feasible way of making it not a 404. We can't guess what the original casing was from the lower-cased version.

This is a DAP bug, and one I'd like to see fixed ASAP too. @tdlowden can speak to a timeline on that. In the meantime, can you recommend a better strategy for us to handle this situation? Is it possible for you to make WHP URLs case-insensitive? Is it a practical issue that we're sending you URLs without the little hash on the end?

yes, that's the issue, the url without the hash is not a working page (for now), if you hit it you see the petition but can't sign it (the signature form throws an error).

That said, we're working on removing the need for the hashes, so if you think this fix will take more than a few days you can probably close this.

@lheyman ... @smarina04 and I are working on this.

I think this problem is moot now? Feel free to re-open if not.