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

Add possibility to retry _paq plugin method calls at a later point #10502

Merged
merged 6 commits into from Sep 19, 2016

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Sep 14, 2016

This might be easiest to explain by looking at the test in https://github.com/piwik/piwik/pull/10502/files#diff-61dc9c2c1c7174d2576a20aa38f753b9R620

There might be plugin calls like

_paq.push(['MyCustomPlugin::myCustomStaticMethod']);
_paq.push(['MyCustomPlugin::myCustomStaticMethod2']);
_paq.push(['MyCustomPlugin.myCustomMethod']);

and it would not execute these calls if it first loads piwik.js and then later the tracker plugin (only if piwik.js is not writable and the plugin tracker was loaded separately).

To make sure those methods get still executed a tracker plugin can call Piwik.retryMissedPluginCalls(); as soon as it is loaded so these methods will be actually executed and not "missed". If there's a better name for that method let me know. I was thinking about Piwik.setPluginLoaded or something like this but not sure about that as it's not always needed to retry in all cases and as long as it's not official API I rather have a concrete method name for that so it is clear what it does

@tsteur tsteur added Pull Request WIP Indicates the current pull request is still work in progress and not ready yet for a review. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. labels Sep 14, 2016
@tsteur tsteur added this to the 2.16.3 milestone Sep 14, 2016
@tsteur tsteur added Needs Review PRs that need a code review and removed Pull Request WIP Indicates the current pull request is still work in progress and not ready yet for a review. labels Sep 14, 2016
@tsteur tsteur merged commit 0b74871 into 2.x-dev Sep 19, 2016
@tsteur tsteur deleted the delayedplugincalls branch September 19, 2016 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant