Skip to content

Update Product Analytics setup route to view instrumentation details

Dennis Tang requested to merge dennis-update-product-analytics-setup-route into master

What does this MR do and why?

Update Product Analytics setup route to view instrumentation details

Previously, we had instrumentation details available at namespace/-/product_analytics/dashboards/setup, but it's now namespace/-/analytics/dashboards/setup, which is too generic in a shared dashboard listing.

This renames the route to be more specific to Product Analytics

Changelog: changed

How to set up and validate locally

Note: This feature has a lot of setup steps. If you need help please ask me or I can step through these during a call with you.

  1. Follow these instructions to setup Product Analytics in GDK.
  2. Create a new project.
  3. In the new project, view the Analytics > Dashboards at http://localhost:3000/gitlab-org/[PROJECT]/-/analytics/dashboards/.
  4. Click on the Product Analytics Set up button.
  5. Validate that you can go through the Project Analytics onboarding process.
  6. To generate events, add and modify the script below using a user script manager (like tapermonkey) or in your browser console.
Click to expand
(function() {
  'use strict';

  var jsSDK = document.createElement('script');
  jsSDK.setAttribute('src','https://unpkg.com/@gitlab/application-sdk-js@0.0.5/dist/gl-sdk.min.js');

  // Injected JS to track events from GDK
  jsSDK.onload = function() {
    window.glClient = window.glSDK.glClientSDK({
      applicationId: 'YOUR_APPLICATION_ID', // Replace with your new App ID
      host: 'YOUR_COLLECTOR_HOST' // Replace with your devkit collector host
    });

    window.glClient.page();
  }

  document.head.appendChild(jsSDK);
})();

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Dennis Tang

Merge request reports