Amplitude

How do I get started?

  1. Login to our workspace (named Sourcegraph). If you don’t have an account, post in #it-tech-ops to have it assigned in Okta.
  2. Read the Sourcegraph <> Amplitude FAQs, view team-specific spaces below, or reach out in #analytics for help if you have any questions getting started viewing dashboards.
  3. Read the Amplitude help center for building analyses and/or check out some of our tutorials. As a reminder, you can always post in #analytics-review if you have a work-in-progress analysis you want someone else’s eyes on it.
  4. Look at all the Team Spaces and join whichever ones are relevant to you. Learn more about Team Spaces here.

Go-to-market teams content

View the Sales/CE team space which contains dashboards such as the instance overview to understand event-level managed instance data.

Why are we using Amplitude?

Amplitude is a product analytics tool specializing in turning event data into actionable insights and dashboards. Amplitude lets you analyze funnels, user flows, retention and more.

Why aren’t we using Looker for this?

Looker is very flexible in that we can set it up for any purpose we’d like. The downside is that to provide a great self-service experience for questions about product usage, setting up Looker would take a lot of work. We get these capabilities out of the box with Amplitude.

What is in Looker vs. Amplitude?

Anything not based directly on analyzing event-level data is in Looker. Data in Looker includes pings from on-prem instances, anything we get from the Cloud Postgres database and any data from third-parties tools (such as Google Analytics and Salesforce).

Any analysis we conducted in Looker before we started using Amplitude we can continue doing in Looker. We’ll still maintain existing Looker dashboards and visualizations. Amplitude will help us conduct new and different analyses regarding product analytics.

Data

Pipeline

  1. Events are stored in the dotcom_events.events_usage table for managed instance, and dotcom_events.events for dotcom events.
  2. Events are formatted to fit Amplitude’s schema, enhanced with user properties (company name, company region, etc) in a scheduled query (event-usage-to-amplitude-sg-cloud for dotcom and usage-data-amplitude for managed instances), and a JSON is created in a GCS bucket (named the same as the scheduled query).
  3. Every 5 minutes Amplitude checks for new data in the GCS bucket to ingest.

Adding events to Amplitude

All new events (through eventLogger) are automatically added to Amplitude. There is a denylist, but everything beyond that is automatically accepted.

Using Amplitude FAQs

What are the differences between projects?

Managed instances contain all managed instances that have event-level telemetry turned on. This includes all self-service cloud trials, some CE-led trials and some managed instance customers.

Dotcom is all traffic to from sourcegraph.com and some of its subdomains, including (about.sourcegraph.com, signup.sourcegraph.com).

How often is Amplitude data updated?

The data lags about an hour behind real-time. The scheduled query that compiles all the data runs once an hour, and Amplitude checks every five minutes for new compiled data. So the maximum lag is 1 hour and 5 minutes.

How do I find what we call an event in the Sourcegraph code?

Most often, you can search in the ‘Select event’ dropdown, and you’ll find the event you’re looking for. If you can’t or are unsure what the Amplitude event corresponds to, keep reading!

To figure out an event’s name is in code or to confirm whether an existing event in Amplitude is the correct one, follow these steps (or watch this video) :

To find what a button, page view, or action is named

  1. Open Safari or Chrome
  2. Enable developer mode (preferences -> advanced)
  3. Go to sourcegraph.com
  4. Show the JavaScript console
  5. Enter localStorage.eventLogDebug = "true"
  6. Start using Sourcegraph and click/view the event you’re looking for!

Where should I save charts?

There are three levels to where you can save a chart:

  1. To create a private chart, uncheck ‘Make Discoverable’ in the chart’s dropdown (“More”).
  2. To create a chart that is discoverable by other teammates but not as easily accessible unless they search (or you send them a link), just create a chart. This is Amplitude’s default.
  3. Add charts to Team Spaces if you want them to be easily accessible to teammates.

What are Team Spaces?

Team Spaces are a collection of charts, dashboards and notebooks that are relevant to a specific group (Amplitude’s version of a folder system). By joining one, Amplitude will notify you of every new analysis that a teammate adds to the space (and they’ll be notified of yours, too). You can see all of our Team Spaces here.

Are there “official” or “approved” dashboards?

Yes! Select dashboards are reviewed by the Data & Analytics team and are marked as Official Content. You can view all this content by simply opening the search bar and selecting the Official Content checkbox.

How do I know whether my account’s instance data will be on Looker or Amplitude?

You can use this flowchart to determine which data tools (if any) your account will show up in.