integrations icon indicating copy to clipboard operation
integrations copied to clipboard

feat: add integration to support better integration with Wistia

Open mubashirhanif opened this issue 3 months ago • 7 comments

Add new Wistia integration that injects the Wistia analytics script (https://fast.wistia.com/assets/external/E-v1.js) with cookie consent support.

  • Follows existing PostHog integration pattern
  • Respects GitBook cookie consent mechanism
  • No configuration required - simple script injection
  • Includes proper CSP for fast.wistia.com domain

mubashirhanif avatar Oct 06 '25 14:10 mubashirhanif

⚠️ No Changeset found

Latest commit: fdb1224ed01c309e17665b5c85407e4c752c7edc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Oct 06 '25 14:10 changeset-bot[bot]

Hi @mubashirhanif - thanks so much for building this integration! I’m still a little confused at how this integration works (after looking through their docs).

Can you help me understand what this integration does exactly? (and how it works)?

addisonschultz avatar Oct 10 '25 09:10 addisonschultz

Hi @addisonschultz,

This integration introduces support for collecting analytics on videos played by users. You can explore the full range of analytics offered by Wistia here.

The videos are hosted on Wistia and embedded in GitBook using the built-in video embed feature. To enable tracking of these analytics—along with relevant information from the root page—Wistia’s JavaScript libraries must be included on the root page.

This plugin facilitates that by injecting the required Wistia script into the page.

mubashirhanif avatar Oct 12 '25 18:10 mubashirhanif

Hi @mubashirhanif thank you! That’s very helpful. Do you think you could update the summary key of the configuration to reflect this better?

I.e. adding more information about the videos needing to be embedded from Wistia.

addisonschultz avatar Oct 14 '25 06:10 addisonschultz

Hi @addisonschultz Could you maybe have a look again? I updated the PR to add the requested changes!

mubashirhanif avatar Nov 10 '25 13:11 mubashirhanif

Thanks @mubashirhanif - I’ve added a few things. As a final addition, can you please also add a much higher quality image for the preview image? It’s looking quite blurry.

addisonschultz avatar Nov 11 '25 20:11 addisonschultz

Hi @mubashirhanif ! Thanks for updating the image - unfortuantely it’s still a little blurry. We have a template for creating these images, you can find more info here! https://gitbook.com/docs/developers/integrations/submit-your-app-for-review#prepare-assets

I’d like to request one more time if you could update the image to be slightly better quality 🙏

addisonschultz avatar Nov 25 '25 12:11 addisonschultz

Hi @addisonschultz I have now added a new image with much higher quality. Please have a look again

mubashirhanif avatar Dec 10 '25 11:12 mubashirhanif

Hi @mubashirhanif Thanks for putting this together.

In testing this integration, I’ve seem to have found that this integration may not be needed in order to track analytics on Wistia. When testing, it seems that embedding a video normally, still allows you to track analytics on the video without needing to inject the script.

For example, I have a test site here with only the embedded video: https://developer-relations-1.gitbook.io/wistia/

And it looks like analytics are already working in the Wistia dashboard. CleanShot 2025-12-11 at 11 38 58@2x

Please let me know if there is a different reason/need I am missing that requires this integration

addisonschultz avatar Dec 11 '25 03:12 addisonschultz

Hi @addisonschultz,

Thanks for the test and the first results. There are additional features unlocked with the script. We wanted to get analytics tied to specific users of our system, for example, by user_id.

The script will intercept some query parameters to extract the relevant information and tie the analytics to a specific user!

mubashirhanif avatar Dec 11 '25 09:12 mubashirhanif

Open in StackBlitz

bun add https://pkg.pr.new/GitbookIO/integrations/@gitbook/api@1016

commit: fdb1224

pkg-pr-new[bot] avatar Dec 12 '25 09:12 pkg-pr-new[bot]

Hi @mubashirhanif - this integration is now live and available at app.gitbook.com/integrations/wistia

Thank you so much for your contributions - I’ll work on adding this to our website over the coming days.

addisonschultz avatar Dec 15 '25 07:12 addisonschultz