Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Commit

Permalink
Pass ammit allocations with the event context
Browse files Browse the repository at this point in the history
 🐿 v2.7.0
  • Loading branch information
tom-parker committed Feb 7, 2018
1 parent 9a167b6 commit 4af431e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions components/n-ui/tracking/ft/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,16 @@ const oTrackingWrapper = {
}
}

const abState = getRootData('ab-state');
if (abState && abState !== '-') {
const ammitAllocations = {};
abState.split(',').map(flag => {
const [name, value] = flag.split(':');
ammitAllocations[name] = value;
});
context['active_ammit_flags'] = ammitAllocations;
}

oTracking.init({
server: 'https://spoor-api.ft.com/ingest',
context: context,
Expand Down

0 comments on commit 4af431e

Please sign in to comment.