Events API: Add click tracking to generate stats of meetup interest #531
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds anonymous click-tracking to the events api output.
The URLs are passed through an intermediatory URL as such
which stores the number of redirect-requests against the event in the database.
Additionally, some basic stats (type and country) is stored in another anonymous dataset.
This allows us to see how much event reach we're getting through our dashboard widget, and potentially feedback on which topics are more interesting to local communities.
To allow for edge-cases, the URL is included in the tracked url, which if the hostname matches a safe-list will allow a redirect to that location even if our DBs are offline or the table is empty. (This would allow redirection of non-chapter meetup groups as a result, but I don't see a meetup.com redirect as unsafe)
The main downside to this is that the URL seen in the WordPress dashboard will be the click-tracked url, and it's not a pretty-url :) I don't personally see this as a problem, but some might.