Add gitlab_tier cookie for marketing use
What does this MR do and why?
Adds GitLab Tiers to gitlab_tier
cookie. I am also updating the handbook with docs here: gitlab-com/content-sites/handbook!5117 (merged)
In a previous MR, we added a gitlab_user
cookie that would show true
if a user is authenticated and in SaaS. If a user isn't authenticated, the cookie will not be present.
We want to keep that existing behavior and return user-identifiable tier information onto a new cookie whether they fall into Free, Premium, or Ultimate on SaaS only. If a user is in multiple namespaces, the cookie should reflect the unique namespace tiers that they are a part of (The maximum being an array holding value ["free", "premium", "ultimate"]
)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
The gitlab_tier
cookie is set up when a user logs into .com
- Locally, authenticate to .com GitLab as the root admin user and make sure you are simulating a SaaS instance.
- Create a few groups and change their plans under the admin -> groups -> edit that group. Change the plan for a few groups. That cookie should not be present.
- Sign out of GitLab in your local dev environment. Verify that the cookie is not present.
- Log in again to that same root user. You should see the correct tiers for the group's billing that you changed. Free/Premium/Ultimate should be reflected in that cookie.
Related to gitlab-com/marketing/digital-experience/buyer-experience#2875 (closed)