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

Extension analytics to load immediately #8759

Merged
merged 3 commits into from Apr 14, 2017

Conversation

dvoytenko
Copy link
Contributor

@dvoytenko dvoytenko commented Apr 14, 2017

Closes #8752.

TODO:

  • Tests

@zhouyx
Copy link
Contributor

zhouyx commented Apr 14, 2017

Looks good! Is the trigger:immediate temporary? my concern is trigger: immediate may result in the ensureInitialized_ be called too early.
I think viewer.whenFirstVisible() ensure that it won't be too early, but still analytics has priority 1, with trigger:immediate its layout priority can't be applied then.

@dvoytenko
Copy link
Contributor Author

@zhouyx Yes. Temporary. This is not a user-exposed attribute. The judgement for now goes as this: the parent element already follows system priority and, essentially, the same priority is applied to analytics. That does mean that ideally we'd not call insertAnalyticsElement from buildCallback. Hopefully by then we'll address the priority scheduling better.

@dvoytenko
Copy link
Contributor Author

@zhouyx Tests are ready. PTAL.

@dvoytenko
Copy link
Contributor Author

/cc @keithwrightbos @tdrl

@dvoytenko dvoytenko merged commit e7adb5e into ampproject:master Apr 14, 2017
@dvoytenko dvoytenko deleted the analytics3-clean branch April 14, 2017 03:17
@tdrl
Copy link

tdrl commented Apr 14, 2017

Excellent! Thank you! So if I understand this PR, we don't need to change our code, correct? (E.g., don't need to insert a trigger: 'immediate', because insertAnalyticsElement has already covered that for us?)

@amphtml-team
Copy link

amphtml-team commented Apr 14, 2017 via email

DarXector pushed a commit to DarXector/amphtml that referenced this pull request Apr 25, 2017
* Extension analytics to load immediately

* fix types

* tests
mrjoro pushed a commit to mrjoro/amphtml that referenced this pull request Apr 28, 2017
* Extension analytics to load immediately

* fix types

* tests
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.

None yet

5 participants