Skip to content

Commit

Permalink
Merge branch 'add-none-tracking'
Browse files Browse the repository at this point in the history
  • Loading branch information
dhowden committed Sep 13, 2017
2 parents 2838ff7 + 5b50493 commit fce4603
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/controllers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ export {
resultClickedAnalyticsEvent
} from "./analytics";
export { default as Values, valuesUpdatedEvent } from "./values";
export { trackingResetEvent, ClickTracking } from "./tracking";
export { trackingResetEvent, ClickTracking, NoneTracking } from "./tracking";
30 changes: 29 additions & 1 deletion src/controllers/tracking.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,32 @@ class ClickTracking extends Tracking {
}
}

export { ClickTracking };
class NoneTracking extends Tracking {
/**
* Construct a NoneTracking instance.
*/
constructor() {
super();

/** @private */
this.clientTracking = new clientTracking();
}

/**
* Reset the tracking.
* @param {Object} values Key-value pair parameters to use in the pipeline.
*/
reset(values) {
this.clientTracking.reset();
this._emitTrackingReset(values);
}

/**
* Construct a tracking session to be used in a search.
*/
tracking() {
return this.clientTracking;
}
}

export { ClickTracking, NoneTracking };

0 comments on commit fce4603

Please sign in to comment.