-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Intent to implement: Client identifiers in AMP #961
Comments
Implemented all except bullet 3. |
The Google doc says:
What follows, however, doesn't include any discussion of "sessions" (nor could I find any other mention of "sessions" in any of the docs). Are sessions something the publishers/analytics providers will need to infer based on timestamps, or are there plans to support a session identifier as well? |
@bmuller The way I've usually seen sessions defined is by looking at timestamps and choosing some period of time to elapse before a new session is established. Do you have some specific definition or instrumentation you're interested in to either directly define a session or to be able to do so on the data processing side? |
@rudygalfi it would be useful if there was some way to get an identifier for the client session (for instance, browser session based on a session cookie, or some concept of app session if in a viewer). |
There is a related bug on low entropy page view ids. This together with a
|
@cramforce What would be nice is an understanding of session based on the context of the app displaying the AMP content. Simply using time between interactions is a poor way to understand a user's activities when the underlying application knows about it's own use (so why not expose that?). Delegating to the "analytics provider" layer means a less accurate understanding than is possible to provide. Session information is something we get on the web (with session cookies), and it would be nice to get that for AMP pages as well. |
Did you check out the page view id? Sorry, on phone. Don't have a link
|
@cramforce is indicating #969 |
Thanks @cramforce / @rudygalfi - but (as far as I can tell) I don't think a page view id would help in understanding what constitutes a session. I think there's a misunderstanding of what I'm asking for so here's an example: On the web, when a user opens their browser and clicks a link to one of our sites, a session cookie is set (which goes away when the browser is closed). If the user comes back later for a second view in the same browser session (i.e., the browser has stayed open between views), we know that the browser has been continuously open for both the initial view and the second view based on the value of that cookie. These two views could occur seconds or hours apart - so merely looking at time doesn't help - but the presence and value of the session cookie can tell us that it was the same browser session. We'd like the same thing for AMP pages (but instead of just the case of a browser, we could be talking about a mobile app that is capable of displaying AMP pages, etc). We'd like to know if two views occur in the same app session (where, say, backgrounding the app would count as a new session, for instance). This isn't something that can be determined based solely on time (again, the views could occur minutes or hours apart) and it's not something (as far as I can tell) that we could glean from page view ids. I hope this is more clear - please let me know if there's anything else I can provide to help. |
We could in theory provide a low entropy id with the lifetime of a session
|
I don't think session cookies would work very well in the webview case. I think we still need to consider doing this via local storage, but perhaps enable viewer to consult us on what is the session. |
The concept asked for here is not known by the viewer. Still like to
|
…them to `amp-analytics`. Also makes the following changes - Switches `amp-analytics` to use layoutCallback instead of `buildCallback`. Closes ampproject#1141 and makes the tests more straight forward since they are now async. - Support for promised based URL replacement - Support for (right now only one) arguments to URL replacement functions. Related to ampproject#961 ampproject#871 Fixes ampproject#1124
Related to ampproject#961. Only missing item it that the viewer needs to actually respond. Wraps localStorage access in try-blocks, because it may fail. Fixes ampproject#1148
Is there anything else that needs to be resolved from this or can it be closed? |
We need to finish a few optional user-notification connections. CC @erwinmombay |
@cramforce , I have two questions to ask:
|
@wupengFEX When a user is logged in, you never need to use the client id (can always just use a cookie). If a user deletes localStorage, there won't be a way to match it back. That is working as intended, as the user chose to delete it. |
@cramforce Thanks very much for your reply, i know login state, But If amp can't match it back, then it can't associate the old records to the new value, How to inform the publisher to delete the data which marked with previous clientId in the database, such as pingback data. |
The following doc proposes a concrete mechanism for producing "client identifiers" for AMP documents which can be used by AMP Analytics (See #871) for use cases such as distinguishing users.
The proposed mechanism provides a unified solution for the following 3 scenarios:
It does not, however, treat users that are active across these as the same.
For details see
https://docs.google.com/document/d/1f7z3X2GM_ASb3ZCI_7tngglxwS6WoWi1EB3aKzdf6vo/edit
The text was updated successfully, but these errors were encountered: