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

Access vars in analytics #1748

Merged
merged 1 commit into from
Feb 15, 2016
Merged

Access vars in analytics #1748

merged 1 commit into from
Feb 15, 2016

Conversation

dvoytenko
Copy link
Contributor

Closes #1556.
Closes #1747.

@dvoytenko dvoytenko force-pushed the access27 branch 4 times, most recently from 0216cb7 to de7116d Compare February 2, 2016 21:53
@avimehta
Copy link
Contributor

avimehta commented Feb 2, 2016

The spec in #1556

I'll try to do a detailed review tomorrow but the commit looks good overall.

Sample analytics config [...]

It might be better use an example with custom config. With respect to GA, is subscriber id something that google can associate with a user? If not, you can send the value as custom dimensions in GA. If subscriber id is pii to google, GA can't accept it. Some kind of protection there would be nice. Maybe have a field in analytics config to say allowSensitive: true/false and then pass that into url-replacements?

Support of additional event types [...]

This is excellent! Thank you! I could not have thought of this and I have been trying to find out how to do this. Again, I'll look at the full code tomorrow but the overall design looks great.

One quick question: How do you ensure that when an extension is dependent on another one, everything loads up correctly?

@dvoytenko
Copy link
Contributor Author

@avimehta

One quick question: How do you ensure that when an extension is dependent on another one, everything loads up correctly?

We have an getElementService function that resolves and awaits dependencies.

@dvoytenko
Copy link
Contributor Author

If subscriber id is pii to google, GA can't accept it

@avimehta @rudygalfi This, today, is a responsibility of the author, however, isn't it? I'm wondering if we just need to say "Use each analytics package as defined in the respective EULA" and that would be sufficient?

@rudygalfi
Copy link
Contributor

@dvoytenko Yes, I think what you said is true.

@avimehta
Copy link
Contributor

avimehta commented Feb 3, 2016

yes, that would work.

@dvoytenko dvoytenko force-pushed the access27 branch 2 times, most recently from ddd3416 to f814a8e Compare February 10, 2016 00:32
@dvoytenko dvoytenko force-pushed the access27 branch 9 times, most recently from 462bb1b to 19fc34c Compare February 13, 2016 04:53
@dvoytenko dvoytenko changed the title [WIP] Analytics in access Access vars in analytics Feb 13, 2016
@dvoytenko dvoytenko assigned cramforce and unassigned avimehta Feb 13, 2016
@dvoytenko
Copy link
Contributor Author

@cramforce @avimehta @rudygalfi This is now ready for review. PTAL.

* @return {*|null}
*/
getAccessValue_(getter, expr) {
return accessServiceFor(this.win_).then(accessService => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead make accessServiceForOrNull?

Cid has the same

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@cramforce
Copy link
Member

LGTM with a few comments

@@ -76,6 +76,28 @@ For instance:
```
may make a request to something like `https://foo.com/pixel?href=https%3A%2F%2Fpinterest.com%2F`.

### SOURCE_URL

Use the special string `SOURCE_URL` to add the source URL of the current document to the URL
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Period at end of sentence.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

dvoytenko added a commit that referenced this pull request Feb 15, 2016
@dvoytenko dvoytenko merged commit dc54118 into ampproject:master Feb 15, 2016
@dvoytenko dvoytenko deleted the access27 branch February 15, 2016 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants