Bugs

VS Code Extension Tracking Returns 401 Unauthorized

Anonymous
9mo agoClosed

Cannot track events from VS Code extension.

I'm coming form Plausible and want to swap out analytics for my vs code extension. The script get's loaded correctly, but then tracking events does not work. The POST request to `https://api.openpanel.dev/track` returns 401 Unauthorized and this error message:

Ingestion: Invalid cors or secret

Here's the request payload

``` {"type":"track","payload":{"name":"screen_view","properties":{"__referrer":"","__path":"vscode-webview://1k1...=vscode-resource.vscode-cdn.net&parentOrigin=vscode-file%3A%2F%2Fvscode-app","__title":"xx"}}} ```

2 comments

  1. Carl-Gerhard Lindesvärd marked this as Closed9mo ago
  2. Anonymous9mo ago

    It was due to the missing clientSecret - now it's working

  3. Anonymous9mo ago

    When I setup the project, I choose App (Track events and conversion for your app)

    Shall I switch to website? and then allow the `vscode-webview://*` as CORS maybe? Because the vscode extension uses a webview with a svelte application where the OpenPanel script get's loaded.