@tsteur opened this Pull Request on July 4th 2016 Owner

Plugins could provide custom tracker tests by creating a file 'tests/javascript/index.php' within the plugin.

Won't be a documented feature for now but could add it to dev changelog if needed.

Content within the test file could be eg

<script type="text/javascript">
test("MyPiwikTest", function() {
    expect(1);

    var tracker = Piwik.getTracker();

    equal(typeof tracker.trackGoal, 'function', 'trackGoal' );
});
</script>

ping @mattab

@mattab commented on July 8th 2016 Owner

:+1:

@mattab commented on August 3rd 2016 Owner

Won't be a documented feature for now but could add it to dev changelog if needed.

fyi: added to dev changelog in https://github.com/piwik/piwik/commit/0a0a01985ef1621357fc16cc9f42e8c1cdad0721

@tsteur commented on August 3rd 2016 Owner

Maybe we could remove it again? It's not properly tested yet and I might want to change the integration later.

@mattab commented on August 3rd 2016 Owner

Sure, removed

@tsteur commented on August 3rd 2016 Owner

Cheers, when this becomes more important we can add an example into an existing example plugin, create a generator for it and document the feature but maybe need another real use case for it that extends the Piwik JS tracker

This Pull Request was closed on July 10th 2016
Powered by GitHub Issue Mirror