Skip to content

Feature Request: Allow bundling of analytics scripts #163

@jawnsy-humane

Description

@jawnsy-humane

For production builds, this library loads an additional analytics script from /_vercel/insights/script.js on the current domain. For development builds, this library loads an analytics script from https://va.vercel-scripts.com/v1/script.debug.js.

export const DEV_SCRIPT_URL =
'https://va.vercel-scripts.com/v1/script.debug.js';
export const PROD_SCRIPT_URL = '/_vercel/insights/script.js';

This has a few implications:

  • The latter URL (on va.vercel-scripts.com) needs to be added to the content security policy, but only applies in development mode
  • The analytics script can be updated at any time without changes to the application

It would be nice if the scripts themselves could be bundled in the npm package, so that everything is upgraded reproducibly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions