Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-1160 update metric pings #88

Merged
merged 1 commit into from Jun 5, 2018
Merged
Changes from all commits
Commits
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

@@ -70,7 +70,7 @@ class OfferCard extends Component {
text: t('rewards_learn_more'),
callback: () => {
this.sendSignal('offer_first_learn');
sendMessage('ping', 'rewards_learn');
sendMessage('ping', 'rewards_first_learn_more');
},
},
closeCallback: (option) => { this.handlePrompt(1, option); },
@@ -17,10 +17,7 @@ import ClassNames from 'classnames';
import DetailMenu from './DetailMenu';
import Summary from '../containers/SummaryContainer';
import Blocking from '../containers/BlockingContainer';
import History from './History';
import Performance from './Performance';
import Rewards from '../containers/RewardsContainer';
import Premium from './Premium';
/**
* @class Implement wrapper of the detailed (expert) mode view.
* @memberOf PanelClasses
@@ -41,10 +38,7 @@ class Detail extends React.Component {
}

BlockingComponent = () => (<Blocking />);
HistoryComponent = () => (<History />);
PerformanceComponent = () => (<Performance />);
RewardsComponent = () => (<Rewards />);
PremiumComponent = () => (<Premium />);

/**
* Click "expertTab" to enable detailed (expert) mode. Trigger action.
@@ -70,10 +64,7 @@ class Detail extends React.Component {
<div id="content-detail" className={(this.props.is_expanded ? 'expanded' : '')}>
<div className={condensedToggleClassNames} onClick={this.toggleExpanded} />
<Route path="/detail/blocking" render={this.BlockingComponent} />
<Route path="/detail/history" render={this.HistoryComponent} />
<Route path="/detail/performance" render={this.PerformanceComponent} />
<Route path="/detail/rewards" render={this.RewardsComponent} />
<Route path="/detail/premium" render={this.PremiumComponent} />
<DetailMenu hasReward={enable_offers && unread_offer_ids.length > 0} />
</div>
</div>

This file was deleted.

This file was deleted.

This file was deleted.

@@ -27,7 +27,7 @@ const FREQUENCIES = { // in milliseconds
};
const CRITICAL_METRICS = ['install', 'install_complete', 'upgrade', 'active', 'engaged', 'uninstall'];
const CAMPAIGN_METRICS = ['install', 'active', 'uninstall'];
const FIRST_REWARD_METRICS = ['rewards_first_accept', 'rewards_first_reject', 'rewards_first_reject_optin', 'rewards_first_reject_optout', 'rewards_learn'];
const FIRST_REWARD_METRICS = ['rewards_first_accept', 'rewards_first_reject', 'rewards_first_reject_optin', 'rewards_first_reject_optout', 'rewards_first_learn_more'];
const { METRICS_SUB_DOMAIN, EXTENSION_VERSION, BROWSER_INFO } = globals;
const IS_EDGE = (BROWSER_INFO.name === 'edge');
const MAX_DELAYED_PINGS = 100;
@@ -141,30 +141,17 @@ class Metrics {
this._sendReq(type, ['all', 'daily', 'weekly']);
break;

// New
// New to Ghostery 8
case 'adblock_off':
case 'adblock_on':
case 'antitrack_off':
case 'antitrack_on':
case 'create_account_extension':
case 'create_account_setup':
case 'engaged_offer':
case 'history_dash':
case 'history_learn':
case 'list_dash':
case 'pause_snooze':
case 'performance_dash':
case 'performance_learn':
case 'premium_dash':
case 'premium_learn':
case 'rewards_dash':
case 'rewards_first_accept':
case 'rewards_first_reject':
case 'rewards_first_reject_optin':
case 'rewards_first_reject_optout':
case 'rewards_learn':
case 'rewards_off':
case 'rewards_on':
case 'pause_snooze':
case 'smartblock_off':
case 'smartblock_on':
case 'viewchange_from_detailed':
@@ -173,7 +160,23 @@ class Metrics {
this._sendReq(type, ['all', 'daily', 'weekly', 'monthly']);
break;

// uncaught ping type
// Rewards Pings
case 'engaged_offer':
this._sendReq('engaged', ['daily', 'weekly', 'monthly']);
break;
case 'rewards_off':
case 'rewards_on':
this._sendReq(type, ['all', 'daily']);
break;
case 'rewards_first_learn_more':
case 'rewards_first_accept':
case 'rewards_first_reject':
case 'rewards_first_reject_optin':
case 'rewards_first_reject_optout':
this._sendReq(type, ['all']);
break;

// Uncaught Pings
default:
log(`metrics ping() error: ping name ${type} not found`);
break;
ProTip! Use n and p to navigate between commits in a pull request.