I modify the angulartics.js to accept array and modify registerPageTrack and registerPageEvent. Sample modified registerPageTrack function. This is not the final code as i am working on it.
var registerPageTrack = function (fn, provider) {
//api.pageTrack = fn;
if (provider == 'splunk') {
api[0].pageTrack = fn
}
else {
api[1].pageTrack = fn
}
angular.forEach(api, function (p,i) {
angular.forEach(cache.pageviews, function (path, index) {
setTimeout( function () {
api[i].pageTrack(path);
}, index * settings.pageTracking.bufferFlushDelay);
});
});
// angular.forEach(cache.pageviews, function (path, index) {
// setTimeout( function () {
// api.pageTrack(path);
// }, index * settings.pageTracking.bufferFlushDelay);
// });
};