Skip to content

Amplitude Init failing in Chrome Extension V3. #448

@abhishekops

Description

@abhishekops

Summary

I'm trying to integrate Amplitude into background scripts of Chrome Extension manifest V3. Amplitude Init fails with the following trace, upon digging into it, its the following error.

This is expected to fail as the manifest V3 version of Chrome Extension background scripts don't have access to DOM, and they are run as service workers, which explains the issue. I would like to know if there is a way to integrate Amplitude where window/document objects aren't present. Its really critical for us to integrate Amplitude into the background scripts, as most of the important action happens there. The recommendation in the error message to use @amplitude/node wouldn't work in our case too, as its not a node environment. Kindly assist if there is a solution or any workarounds for the problem. Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions