Your GA4 property, read-only
Journey, attribution, and a small digital twin. With Google sign-in they run on a property you pick. The access token stays in an encrypted cookie for about an hour. A refresh token is not stored, and nothing is written to the database.
Connect a Google account with the read-only analytics scope. Until you do, the tables below are example data.
Sign-in is in limited preview. Google's consent screen is in testing, so only approved test users can connect.
Journey
Example data. Not your property.
Pages with the most sessions. This is not a path through one visit.
| Path | Sessions |
|---|---|
| /example/home | 200 |
| /example/pricing | 80 |
| /example/docs | 40 |
Attribution
Example data. Not your property.
Last click is the session default channel. First click is the first-user default channel. The metric is sessions.
| Channel | Last click | First click |
|---|---|---|
| Organic Search | 140 | 160 |
| Direct | 90 | 70 |
| Referral | 30 | 0 |
| 0 | 20 |
Digital twin
Example data. Not your property.
A small model of the property from this report. It is not a forecast.
- Organic Search140
- Direct90
- Referral30
- Device: mobile180
- Device: desktop120
- Device: tablet20
Setup
Google treats analytics.readonly as a sensitive scope. The consent screen is in testing, so only approved test users can connect. The authorize request uses this redirect URI, access_type=online, a state value, and PKCE. The access token stays in an encrypted cookie for about an hour. A refresh token is not stored. Revoke clears the cookie and calls Google's revoke endpoint.
- GOOGLE_OAUTH_CLIENT_ID
- GOOGLE_OAUTH_CLIENT_SECRET
- https://www.blackboxpersonalization.com/api/your-data/callback
- https://www.googleapis.com/auth/analytics.readonly
Understanding the labHow to use it and why you'd want to
Why you'd want to
You want the journey and the channel credit from your own property. Sign-in is a limited preview, the tables stay an example until you connect, and the list stores an email only if you check the box.
How to use it
- Connect Google, or read the example tables.
- Pick a property and run the three views.
- Revoke clears the cookie. The email box is opt-in.
- Sign-in is a limited preview. The list is for everyone else.
WalkthroughHow we built itShowHide
Example vendor setup is marked below. eVar and event numbers are examples. This lab does not call Adobe.
The your-data lab runs journey, attribution, and a small twin on a GA4 property the visitor picks, or on labeled example rows when sign-in is off. The token stays in a cookie. This page does not call Adobe.
Label the example
Until sign-in is configured, the three views use example paths and channels. The banner says they are not a property.
Keep the token in the cookie
A connected session is encrypted in a cookie. It is not written to the database. Revoke clears it.
Run the three views
Journey is pages by sessions. Attribution compares last click and first click. The twin is channels and devices, not a forecast.
Store an email only if asked
The waitlist writes an email after the box is checked. A missing check stores nothing.
From the code
The three notes. The twin says it is not a forecast.
const JOURNEY_NOTE = "Pages with the most sessions. This is not a path through one visit."
const ATTRIBUTION_NOTE = "Last click is the session default channel. First click is the first-user default channel. The metric is sessions."
const TWIN_NOTE = "A small model of the property from this report. It is not a forecast."A page path drops the query string and refuses a non-path.
export function pageLabel(value: string) {
const path = value.split("?")[0]?.split("#")[0]?.trim() ?? ""
if (!path.startsWith("/") || path.startsWith("//") || path.includes(" ") || path.includes("..") || path.length > 180) return null
return pathGoogle and Adobe
This lab does not queue its own event. The Google block shows an example of how you would track the interaction. Adobe is an example too.
This lab does not queue an analytics event of its own. After Accept, the site still queues virtual_page_view for the page, with page_path and page_title. Clicks inside a data-track-ignore region are not recorded. The push below is an example, not a call this page makes. This site does not call gtag('set') or Adobe.
Example only. This page does not push this object.
// Example only. This lab does not queue this event.
dataLayer.push({
event: "your_data_example",
label: "example",
})Example implementation. This site does not call Adobe. eVar126, prop126, and event126 are example variable numbers. In Launch, a data element reads the value and a rule sends it when the value changes. In the report suite, enable eVar126 with Most Recent allocation and expire it on the hit. A processing rule is unnecessary if the data element maps straight to that eVar.
Example alloy payload. _example is a placeholder schema, not a real tenant.
alloy("sendEvent", {
xdm: {
eventType: "web.webinteraction.linkClicks",
_example: {
yourData: "example",
},
},
})Example hit. eVar126 is hit-scoped in this example. prop126 dies at the same hit.
s.eVar126 = "example"
s.prop126 = "example"
s.events = "event126"
s.linkTrackVars = "eVar126,prop126,events"
s.linkTrackEvents = "event126"
s.tl(true, "o", "your_data_example")Translation
Each lab field, the GA4 name, and the example Adobe variable. Scope is the part that usually gets lost in the translation.
Sessions
GA4. Not sent. The number stays on the page.
Adobe. Example event126. This site does not call Adobe.
Scope. Shown in the table.
Channel
GA4. Not sent.
Adobe. Example eVar126. This site does not call Adobe.
Scope. Shown next to the session count.
Email
GA4. Not sent. The waitlist stores it only after the box is checked.
Adobe. Do not put the email in a prop. Not sent.
Scope. A list row, not a hit.
Consent
GA4. Not a parameter. The page view still waits for Accept.
Adobe. Example: do not add a hit for the property.
Scope. A gate on the page view.
Recommended next
Why these picksReading path transitions…