Skip to content

Add import project GTM events to combined form

What does this MR do and why?

Closes gitlab-com/marketing/digital-experience/buyer-experience#481 (closed).

The combined groups/projects form is now a part of the free trial flow.

The old spec requires us to track the project import events, or at least when users click specific buttons to import from different sources.

In !81035 (merged), we also realized that this form is shown to both free trial onboarding, and regular user sign up. So we've renamed the event to be more general, and our analyst can use the free_trial_onboarding=true param in URLs to differentiate between free trial flows and normal user sign up.

This MR depends on !81035 (merged) because we had to push the feature flag to the frontend in this controller, and I want to avoid merge conflicts in ee/app/assets/javascripts/pages/registrations/groups_projects/new/index.js.

Screenshots or screen recordings

video1339569821

How to set up and validate locally

  1. Create a Google Tag Manager account and container ID. You should just need to follow the step 1 of the instructions. The GTM container can be empty - it just needs to exist.
  2. In gitlab.yml, add your GTM ID in the extra block for both the google_tag_manager_id and google_tag_manager_nonce_id values. Make sure to restart GDK (or do this step prior to starting GDK) for settings to take effect.
    extra:
     google_tag_manager_id: 'GTM-YOURIDHERE'
     google_tag_manager_nonce_id: 'GTM-YOURIDHERE'
  3. Start or restart your GDK
  4. Turn on Feature.enable(:combined_registration)
  5. Turn on Feature.enable(:gitlab_gtm_datalayer)
  6. Create a new account through localhost:3000/users/sign_up.
  7. Open the Google Tag Assistant
  8. Point the tag assistant to http://localhost:3000/users/sign_up/groups_projects/new
  9. Keep an eye on the DataLayer tab in the Tag Assistant
  10. Click on the different import sources in the import tab
  11. Check for the projectImport events with platform data that matches the button you clicked.

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 Tyler Williams

Merge request reports

Loading