Skip to content
This repository was archived by the owner on Sep 3, 2022. It is now read-only.
Merged
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
2 changes: 1 addition & 1 deletion lib/analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ Analytics.prototype._mergeInitializeAndPlanIntegrations = function(planIntegrati
// Allow the tracking plan to disable integrations that were explicitly
// enabled on initialization
if (planIntegrations.All === false) {
integrations = {};
integrations = { All: false };
}

for (integrationName in planIntegrations) {
Expand Down
3 changes: 2 additions & 1 deletion test/analytics.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1351,6 +1351,7 @@ describe('Analytics', function() {
it('should allow tracking plan to disable integrations explicitly enabled via initialize .integrations option', function() {
analytics.initialize(settings, {
integrations: {
All: false,
Test: true
},
plan: {
Expand All @@ -1370,7 +1371,7 @@ describe('Analytics', function() {

analytics.track('event2', { prop: true });
var track2 = analytics._invoke.args[1][1];
assert.deepEqual(track2.obj.integrations, { Test: false });
assert.deepEqual(track2.obj.integrations, { All: false, Test: false });
});

it('should prevent tracking plan from enabling integrations disabled via initialize .integrations option', function() {
Expand Down