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

Feature request: Extend fathom integration to track external links #450

Open
KevinRohn opened this issue Apr 16, 2024 · 4 comments
Open
Labels
integration-fathom Issues around the Fathom integration

Comments

@KevinRohn
Copy link
Contributor

Description

We use the Fathom integration for analytics on our GitBook pages. Currently, the functionality is limited to tracking only internal site links. However, Fathom also offers an "events" feature, which could be useful for tracking external link clicks.

I attempted to create an integration myself, but it requires script injection. Unfortunately, this functionality is not supported for private integrations.

It would be beneficial to support tracking events for external links. For more information, see Fathom's documentation on events.

Thank you in advance

@KevinRohn KevinRohn changed the title Feat: Extend Fathom integration to track external links Feat: Extend fathom integration to track external links Apr 16, 2024
@KevinRohn KevinRohn changed the title Feat: Extend fathom integration to track external links Feature request: Extend fathom integration to track external links Apr 16, 2024
@addisonschultz
Copy link
Collaborator

Hi @KevinRohn! Great feature request, and even nicer that you've already tried to build an integration for this. You are right in that we don't allow the script injection scope to be published, but if you would be interested in opening up a PR in this repo that would update the current Fathom integration, I'd be happy to review and test, and update the current integration if it's working well.

Let me know if that sounds interesting to you, and we can work on it!t

@addisonschultz addisonschultz added the integration-fathom Issues around the Fathom integration label Apr 16, 2024
@KevinRohn
Copy link
Contributor Author

KevinRohn commented Apr 17, 2024

Hi @addisonschultz, I would like to do this, but how can I test it before if I can not inject a script?

Should it work with the execution of the cmd gitbook dev <spaceID> ?

@addisonschultz
Copy link
Collaborator

I will need to grant access - but before that, I am able to test if you are able to submit a PR!

@KevinRohn
Copy link
Contributor Author

Hi @addisonschultz,

sorry, rather later than never :) . I opened an PR #534

addisonschultz pushed a commit that referenced this issue Sep 24, 2024
* #450 add external link tracking to fathom integration

* changed comment description

* Remove extra quotes causing SyntaxError in Fathom script

* Make replacement more readable

* Removed space configuration

* Track full url instead of domain name only

* Improve external link tracking for dynamic content

* changeset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration-fathom Issues around the Fathom integration
Projects
None yet
Development

No branches or pull requests

2 participants