Skip to content

Add UTM params to VSCE sidebar

Warren Gifford requested to merge philipp-spiess/vsce-utm-links into main

Created by: philipp-spiess

Fixes #30859 (closed)

We want to improve our funnel tracking to better understand when users started their flow in VS Code (see #30859 (closed) for more context).

  • Sidebar CTAs
  • Banner CTAs
  • CTAs from Save Search, and Create Monitor buttons
  • Create VSCE campaign events on sourcegraph.com

Open questions

  • I suppose that the banners share code with Web. I found the callsite to add the UTM params but I’m not sure which context I could access to find out wether the CTA is shown inside the browser or VS Code? I suppose window.navigator might be helpful but since I can't run the extension in dev mode yet I have to wait before I can confirm.

Test plan

  1. I tested the sidebar changes by starting the VSCE in development mode, clicking the sign-up link, and looked at the URL it generated.
  2. To validate that this logs the right parmeters I changed the hostname to my local instance: https://sourcegraph.test:3443/sign-up?editor=vscode&utm_medium=VSCIDE&utm_source=sidebar&utm_campaign=vsce-sign-up&utm_content=sign-up and verified that the events show up in the console: Screenshot 2022-02-09 at 14 19 41

Merge request reports

Loading