Skip to content

Commit

Permalink
Merge pull request #32 from lana/temporary-analytics-staging-method
Browse files Browse the repository at this point in the history
Add temporary staging analytics event call
  • Loading branch information
jantocv authored Jul 22, 2020
2 parents 95c1b8b + 8ae3eeb commit b6bf539
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Lana B2C Microapp SDK Library Changelog

## v0.8.2
- (temporary) Added analytics.eventStaging to only trigger analytics in staging environment

## v0.8.1
- Added POC of a feature flag for AriesSDK events.

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lana/b2c-mapp-sdk",
"version": "0.8.1",
"version": "0.8.2",
"description": "Lana B2C MicroApp SDK for interacting with the Mobile Aries browser.",
"repository": {
"type": "git",
Expand Down
8 changes: 1 addition & 7 deletions src/AriesSDK.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ const publishMessageToBus = (message) => {
const unwrapResponse = ({ response = {} } = {}) => response;

const publishMessageToBusAndWaitForResponseWithMatchingId = (topic, params = {}) => new Promise((resolve, reject) => {
const { featureFlags } = window;
const topicFeatureFlag = (featureFlags && (featureFlags[topic] !== undefined)) ? featureFlags[topic] : true;
if (!topicFeatureFlag) {
resolve({});
return;
}
const payload = {
id: uuidv4(),
topic,
Expand Down Expand Up @@ -61,7 +55,7 @@ const setupAriesOrParentMessageBus = () => {
};
setupAriesOrParentMessageBus();

const analyticsEvent = (options) => publishMessageToBusAndWaitForResponseWithMatchingId('analytics.event', options);
const analyticsEvent = (options) => publishMessageToBusAndWaitForResponseWithMatchingId('analytics.eventStaging', options);

const closeWebView = () => publishMessageToBusAndWaitForResponseWithMatchingId('view.close');

Expand Down

0 comments on commit b6bf539

Please sign in to comment.