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
How to set up and validate locally
- 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.
- In
gitlab.yml
, add your GTM ID in theextra
block for both thegoogle_tag_manager_id
andgoogle_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'
- Start or restart your GDK
- Turn on
Feature.enable(:combined_registration)
- Turn on
Feature.enable(:gitlab_gtm_datalayer)
- Create a new account through
localhost:3000/users/sign_up
. - Open the Google Tag Assistant
- Point the tag assistant to
http://localhost:3000/users/sign_up/groups_projects/new
- Keep an eye on the DataLayer tab in the Tag Assistant
- Click on the different import sources in the import tab
- Check for the
projectImport
events withplatform
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.
-
I have evaluated the MR acceptance checklist for this MR.