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 Amplitude Page Tracking to Prefect Docs #129

Closed
dylanbhughes opened this issue May 18, 2023 · 5 comments
Closed

Add Amplitude Page Tracking to Prefect Docs #129

dylanbhughes opened this issue May 18, 2023 · 5 comments
Assignees

Comments

@dylanbhughes
Copy link

As a business, we'd like to understand how folks come to find and use Prefect. As part of understanding that journey, we'd like to add some tracking to our documentation. We invest a lot into writing the best docs we can and it's important to give ourselves tools to make them better.

Describe the proposed change

We'd like to add the Amplitude tracking code to Prefect docs. This would involve adding a bit of tracking js to the mkdocs theme via the customization options normally. But, we're looking to see if we can keep the changes separate from the public repository.

Adding the change here is an appealing option because it separates out “operational stuff that we’re going to do around this web property” and “documentation for how to use our product, with a minimum of controversy".

So, I'm going to explore making changes here to see if we can keep this happy separation.

@dylanbhughes dylanbhughes self-assigned this May 18, 2023
@dylanbhughes
Copy link
Author

dylanbhughes commented May 22, 2023

I've found that there's a pretty convenient way for us to add analytics to our theme in this repo (docs: https://squidfunk.github.io/mkdocs-material/setup/setting-up-site-analytics/#custom-site-analytics)

If we set up a proxy just like we did for segment, we can install amplitude via the CDN as an override. I think this is the best way to proceed.

@jawnsy mentioned that we may eventually open-source this repo (issue: #109). Even if this is the case, I still think this is a better place for us to manage analytics on docs.prefect.io.

Any final thoughts before I start implementing @abrookins @ sarahmk125?

@sarahmk125
Copy link

Seems reasonable to me. Criteria from my end:

  • We can send staging docs events to a different Amplitude project from the prod docs events
  • We can configure Amplitude with the same settings as on website (ie enabling referrer, gclid / utms in URL, passing Amplitude device ID in URL on links to prefect cloud/prefect.io for identity resolution - will have to test that last one for a path like docs to website to cloud signup)
  • We can still easily configure button clicks in the future in addition to page views (this seems separate and not really influenced by your proposal, but mentioning just in case)

@abrookins
Copy link
Contributor

This looks good to me @dylanbhughes!

@dylanbhughes
Copy link
Author

Looks like we'll need to change the mkdocs configuration & we previously had the tracking in the open source. I'm going to fall back to PRing this to the Prefect repo

@jawnsy
Copy link
Contributor

jawnsy commented Jun 5, 2023

Closing this as complete as @sarahmk125 moved this to Done

@jawnsy jawnsy closed this as completed Jun 5, 2023
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 a pull request may close this issue.

4 participants