Skip to content
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

piano analytics support #2624

Merged

Conversation

nathangoulding
Copy link
Contributor

Fixes issue #1769.

@dvoytenko
Copy link
Contributor

/to @avimehta

avimehta added a commit that referenced this pull request Mar 19, 2016
@avimehta avimehta merged commit 82ac213 into ampproject:master Mar 19, 2016
@avimehta
Copy link
Contributor

avimehta commented Apr 4, 2016

@nathangoulding While looking at examples today, I realized that your config does not contain a client id scope. Can you Send out a PR to add the scope/cookie name? Without that, the client id value will be empty.

'amp_client_id=${clientId}&aid=${aid}',

@nathangoulding
Copy link
Contributor Author

Ahh yeah, will do.

@avimehta
Copy link
Contributor

avimehta commented Apr 6, 2016

Thanks, Please cc me on the pull request.

@nathangoulding
Copy link
Contributor Author

@avimehta Looking over the documentation for this now. It sounds like the clientId is tied to a logged-in user - is that correct? I thought the clientId was generated by the AMP viewer and was always populated, effectively a unique viewerId (equivalent of a browserId for mobile browsers). I'm not sure I understand the significance of the clientId.

Is there a way to get an automatically generated viewerId? There's also mention of reading a fallback cookie, but it's unclear how a 3rd-party analytics provider could set a first-party cookie that could get read by AMP.

Could you point me to the documentation on this?

@rudygalfi
Copy link
Contributor

@nathangoulding clientId is not tied to authenticated data. Here's the design doc from the ITI (#961): https://docs.google.com/document/d/1f7z3X2GM_ASb3ZCI_7tngglxwS6WoWi1EB3aKzdf6vo/edit

@avimehta
Copy link
Contributor

@nathangoulding Someone recently asked about the client id setup for piano analytics configuration. The way it is setup currently, the value of amp_client_id is always ''. Using client id without a parameter also results in an error getting logged in console. Can you find out what the right thing for you here would be?

  • You can pass in a cookie name like: ${clientId(cookieName)} and the viewer will generate an id for you that is persisted per browser.
  • You can remove the ${clientId} from your configuration completely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants