Skip to content
This repository has been archived by the owner on Sep 15, 2021. It is now read-only.

Added setAllowIDFACollection #1301

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/mocks/googleAnalytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ ngCordovaMocks.factory('$cordovaGoogleAnalytics', ['$q', function ($q) {
'trackException',
'trackTiming',
'addTransaction',
'addTransactionItem'
'addTransactionItem',
'setAllowIDFACollection'
];

methodsName.forEach(function (funcName) {
Expand Down
12 changes: 12 additions & 0 deletions src/plugins/googleAnalytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,18 @@ angular.module('ngCordova.plugins.googleAnalytics', [])
d.reject(error);
});

return d.promise;
},

setAllowIDFACollection: function(enable) {
var d = $q.defer();

$window.analytics.setAllowIDFACollection(enable, function (response) {
d.resolve(response);
}, function (error) {
d.reject(error);
});

return d.promise;
}
};
Expand Down