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

fix(segment): proxySrc, fileName for proxying #277

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

georgekarapi
Copy link

@georgekarapi georgekarapi commented Sep 25, 2024

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Segment can be blocked through AdBlockers. One way to tackle it is using Self-hosted custom proxies (as mentioned here).

This PR introduces 2 options in Segment's config schema.

Copy link

vercel bot commented Sep 25, 2024

@georgekarapi is attempting to deploy a commit to the Nuxt Team on Vercel.

A member of the Team first needs to authorize it.

@harlan-zw harlan-zw changed the title feat: added proxySrc, fileName for segment proxy fix(segment): proxySrc, fileName for proxying Sep 27, 2024
@harlan-zw
Copy link
Collaborator

I don't think this quite makes sense as these aren't official Segment options, but maybe you can confirm with me.

As far as I know, there's already two workarounds available for this issue:

  1. Use bundle: true, this will offload the script to be served by your Nuxt app, see (https://scripts.nuxt.com/docs/guides/bundling). This is by far the easiest option.
  2. Set your own src using useScriptSegment({ scriptInput: { src: 'https://cdn.segment-proxy.com/analytics.js' } })

I'm not too sure where the proxy API tracking calls stubbing comes in as this seems embedded in the script itself.

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.

2 participants