{
  "key": "ga4_admin_access",
  "title": "Grant GA4 admin access to {{who_needs_access}}",
  "variables": {
    "who_needs_access": {
      "type": "email_list",
      "label": "Emails to add as GA4 admins",
      "required": true
    }
  },
  "start": "grant_admins",
  "steps": [
    {
      "id": "grant_admins",
      "owner": "client",
      "instruction": "Certain team members need access to your Google Analytics. In [analytics.google.com](https://analytics.google.com): Admin (gear) > Account access management > + > Add users, with the Administrator role.",
      "tutorial": {
        "title": "Adding admins in Google Analytics",
        "intro": "About two minutes. You need to be signed in with the Google account that set up your Analytics.",
        "steps": [
          {
            "text": "Go to [analytics.google.com](https://analytics.google.com) and sign in.",
            "note": "If you're signed into more than one Google account, check the avatar in the top-right — it's easy to land in the wrong one.",
            "image": "asset://ga4-01-signin.png"
          },
          {
            "text": "Bottom-left, click the **gear icon** labelled **Admin**.",
            "image": "asset://ga4-02-admin-gear.png"
          },
          {
            "text": "You'll see columns — **Account** on the left, **Property** in the middle. In the **Account** column, click **Account access management**.",
            "note": "No 'Account access management' in that column? That's the common case where you're an admin of the property but not the account. Close this guide and choose \"I don't have an option to add admins\" — we'll take you down the property route instead."
          },
          {
            "text": "Top-right of the list, click the blue **+** button, then **Add users**.",
            "image": "asset://ga4-03-add-users.png"
          },
          {
            "text": "Enter {{who_needs_access}} — you can paste all of them into the email box at once.",
            "note": "Leave \"Notify new users by email\" ticked so we know it landed."
          },
          {
            "text": "Under **Direct roles and data restrictions**, choose **Administrator**, then click **Add** in the top-right.",
            "note": "Administrator matters — Editor can't connect the property to Ads or Merchant Center, which is most of why we need it.",
            "image": "asset://ga4-04-role-admin.png"
          },
          {
            "text": "That's it — come back and press **Granted**."
          }
        ]
      },
      "targets": "who_needs_access",
      "primary": {
        "label": "Granted",
        "to": "team_verify"
      },
      "alternatives": [
        {
          "key": "later",
          "label": "I'll do it later",
          "kind": "flag",
          "tone": "ack"
        },
        {
          "key": "trouble",
          "label": "Having trouble",
          "kind": "flag",
          "tone": "attention"
        },
        {
          "key": "no_admin_option",
          "label": "I don't have an option to add admins",
          "kind": "jump",
          "to": "check_property_access"
        }
      ]
    },
    {
      "id": "check_property_access",
      "owner": "client",
      "instruction": "A common setup: no admin rights on the GA4 account, but admin on the property. In Admin, look at the Property column (middle) for its own \"Property access management\". If it's there, you can add people at that level instead.",
      "tutorial": {
        "title": "Finding property-level access",
        "intro": "A very common setup: you're an admin of the *property* but not of the *account* above it. That works for us too.",
        "steps": [
          {
            "text": "In [analytics.google.com](https://analytics.google.com), click the **gear icon (Admin)** at the bottom-left again."
          },
          {
            "text": "Look at the **middle column**, headed **Property**.",
            "image": "asset://ga4-05-property-column.png"
          },
          {
            "text": "Scan that column for **Property access management** — the same wording as before, but in the property column rather than the account one.",
            "note": "If it's there, you're set — press \"Found property access\". If it isn't there either, press \"I can't add people there either\" and we'll sort it out with you."
          }
        ]
      },
      "primary": {
        "label": "Found property access",
        "to": "grant_property_admins"
      },
      "alternatives": [
        {
          "key": "no_access_anywhere",
          "label": "I can't add people there either",
          "kind": "flag",
          "tone": "attention"
        }
      ]
    },
    {
      "id": "grant_property_admins",
      "owner": "client",
      "instruction": "In Admin > Property access management > +, add each address with the Administrator role.",
      "targets": "who_needs_access",
      "primary": {
        "label": "Added at the property level",
        "to": "team_verify"
      },
      "alternatives": [
        {
          "key": "trouble",
          "label": "Having trouble",
          "kind": "flag",
          "tone": "attention"
        }
      ],
      "tutorial": {
        "title": "Adding admins at the property level",
        "steps": [
          {
            "text": "**Admin** (gear, bottom-left) > **Property** column > **Property access management**."
          },
          {
            "text": "Click the blue **+** at the top-right, then **Add users**."
          },
          {
            "text": "Enter {{who_needs_access}}, choose the **Administrator** role, then click **Add**.",
            "note": "Administrator at the property level is enough for everything we need to do."
          }
        ]
      }
    },
    {
      "id": "team_verify",
      "owner": "team",
      "instruction": "Check each of {{who_needs_access}} can open the GA4 property with admin rights.",
      "primary": {
        "label": "All verified",
        "to": "$done"
      },
      "alternatives": [
        {
          "key": "missing_account",
          "label": "Someone's missing — back to account-level",
          "kind": "jump",
          "to": "grant_admins"
        },
        {
          "key": "missing_property",
          "label": "Someone's missing — back to property-level",
          "kind": "jump",
          "to": "grant_property_admins"
        }
      ]
    }
  ]
}
