Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for embedding of analytics pixels on package pages #1042

Merged
merged 1 commit into from
May 14, 2022

Conversation

alexbiehl
Copy link
Member

Summary

This PR adds support for package maintainers to attach analytics pixels to one or more of their packages in order to better understand the web traffic to their package pages on Hackage. Specifying an analytics pixel URL will result in Hackage automatically embedding the provided URL in an image tag on the main package page.

Context

This PR comes from a previous discussion that @aviaviavi, @gbaz, and the hackage-admin email group. The original suggestion for the direction in this PR came @davean, in discussion with the Haskell Foundation regarding approaches for introducing more analytical tools for maintainers within Hackage.

What not in this PR

Support for analytics pixels to be embedded in generated Haddock documentation is a natural next step and can be included in a future PR.

Copy link
Member

@andreasabel andreasabel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Building with GHC 9.x needs code rearrangements (due to TH).

@alexbiehl alexbiehl force-pushed the scarf-analytics-pixel branch 2 times, most recently from 9ac62d3 to 4c083dd Compare April 12, 2022 07:53
@alexbiehl
Copy link
Member Author

@andreasabel Any chance you can have another look?

@alexbiehl alexbiehl force-pushed the scarf-analytics-pixel branch 2 times, most recently from 4c083dd to a1b3f12 Compare April 28, 2022 12:43
@alexbiehl
Copy link
Member Author

alexbiehl commented May 10, 2022

Any chance for another round of reviews, @gbaz?

@gbaz
Copy link
Contributor

gbaz commented May 10, 2022

It looks good. I plan to give it a final review and merge before the next redeploy. Just been a bit slammed by other responsibilities!

@gbaz gbaz merged commit 0ba623b into haskell:master May 14, 2022
@gbaz
Copy link
Contributor

gbaz commented May 14, 2022

I merged in preperation for a redeploy, but noticed in testing that the list of pixels already created did not show up properly in the package page. (It does show up in the page that lists all pixels for all packages for a user). So I'm going to comment out links to this functionality for now in the release. A patch fixing that up would be welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants