-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit copies the content of the integration repo into the "integrations" folder. Original repo: https://github.com/segment-integrations/analytics.js-integration-satismeter Readme: https://github.com/segment-integrations/analytics.js-integration-satismeter/blob/master/README.md
- Loading branch information
1 parent
821fc5d
commit 1f4045b
Showing
6 changed files
with
481 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
2.0.1 / 2017-04-11 | ||
================== | ||
|
||
* Send all user traits inside "traits" key | ||
|
||
2.0.0 / 2016-06-21 | ||
================== | ||
|
||
* Remove Duo compatibility | ||
* Add CI setup (coverage, linting, cross-browser compatibility, etc.) | ||
* Update eslint configuration | ||
|
||
1.0.5 / 2016-06-15 | ||
================== | ||
|
||
* support apiKey as a new name for token option | ||
|
||
1.0.4 / 2016-05-07 | ||
================== | ||
|
||
* Bump Analytics.js core, tester, integration to use Facade 2.x | ||
|
||
1.0.3 / 2016-04-26 | ||
================== | ||
|
||
* support page calls | ||
|
||
1.0.2 / 2015-06-30 | ||
================== | ||
|
||
* Replace analytics.js dependency with analytics.js-core | ||
|
||
1.0.1 / 2015-06-24 | ||
================== | ||
|
||
* Bump analytics.js-integration version | ||
|
||
1.0.0 / 2015-06-09 | ||
================== | ||
|
||
* Initial commit :sparkles: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# analytics.js-integration-satismeter [![Build Status][ci-badge]][ci-link] | ||
|
||
Satismeter integration for [Analytics.js][]. | ||
|
||
## License | ||
|
||
Released under the [MIT license](LICENSE). | ||
|
||
|
||
[Analytics.js]: https://segment.com/docs/libraries/analytics.js/ | ||
[ci-link]: https://circleci.com/gh/segment-integrations/analytics.js-integration-satismeter | ||
[ci-badge]: https://circleci.com/gh/segment-integrations/analytics.js-integration-satismeter.svg?style=svg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
'use strict'; | ||
|
||
/** | ||
* Module dependencies. | ||
*/ | ||
|
||
var integration = require('@segment/analytics.js-integration'); | ||
var when = require('do-when'); | ||
|
||
/** | ||
* Expose `SatisMeter` integration. | ||
*/ | ||
|
||
var SatisMeter = module.exports = integration('SatisMeter') | ||
.global('satismeter') | ||
.option('token', '') | ||
.option('apiKey', '') | ||
.tag('<script src="https://app.satismeter.com/satismeter.js">'); | ||
|
||
/** | ||
* Initialize. | ||
* | ||
* @api public | ||
*/ | ||
|
||
SatisMeter.prototype.initialize = function() { | ||
var self = this; | ||
this.load(function() { | ||
when(function() { return self.loaded(); }, self.ready); | ||
}); | ||
}; | ||
|
||
/** | ||
* Loaded? | ||
* | ||
* @api private | ||
* @return {boolean} | ||
*/ | ||
|
||
SatisMeter.prototype.loaded = function() { | ||
return !!window.satismeter; | ||
}; | ||
|
||
/** | ||
* Identify. | ||
* | ||
* @api public | ||
* @param {Identify} identify | ||
*/ | ||
|
||
SatisMeter.prototype.identify = function(identify) { | ||
window.satismeter({ | ||
writeKey: this.options.apiKey || this.options.token, | ||
userId: identify.userId(), | ||
traits: this.analytics.user().traits(), | ||
type: 'identify' | ||
}); | ||
}; | ||
|
||
/** | ||
* Page. | ||
* | ||
* @api public | ||
* @param {Page} page | ||
*/ | ||
|
||
SatisMeter.prototype.page = function() { | ||
window.satismeter({ | ||
writeKey: this.options.apiKey || this.options.token, | ||
userId: this.analytics.user().id(), | ||
type: 'page' | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"name": "@segment/analytics.js-integration-satismeter", | ||
"description": "The Satismeter analytics.js integration.", | ||
"version": "2.0.1", | ||
"keywords": [ | ||
"analytics.js", | ||
"analytics.js-integration", | ||
"segment", | ||
"satismeter" | ||
], | ||
"main": "lib/index.js", | ||
"scripts": { | ||
"test": "make test" | ||
}, | ||
"author": "Segment \u003cfriends@segment.com\u003e", | ||
"license": "SEE LICENSE IN LICENSE", | ||
"homepage": "https://github.com/segmentio/analytics.js-integrations/blob/master/integrations/satismeter#readme", | ||
"bugs": { | ||
"url": "https://github.com/segmentio/analytics.js-integrations/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/segmentio/analytics.js-integrations.git" | ||
}, | ||
"dependencies": { | ||
"@segment/analytics.js-integration": "^2.1.0", | ||
"do-when": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"@segment/analytics.js-core": "^3.0.0", | ||
"@segment/analytics.js-integration-tester": "^3.1.0", | ||
"@segment/clear-env": "^2.0.0", | ||
"@segment/eslint-config": "^3.1.1", | ||
"browserify": "^13.0.0", | ||
"browserify-istanbul": "^2.0.0", | ||
"eslint": "^2.9.0", | ||
"eslint-plugin-mocha": "^2.2.0", | ||
"eslint-plugin-require-path-exists": "^1.1.5", | ||
"istanbul": "^0.4.3", | ||
"karma": "1.3.0", | ||
"karma-browserify": "^5.0.4", | ||
"karma-chrome-launcher": "^1.0.1", | ||
"karma-coverage": "^1.0.0", | ||
"karma-junit-reporter": "^1.0.0", | ||
"karma-mocha": "1.0.1", | ||
"karma-phantomjs-launcher": "^1.0.0", | ||
"karma-sauce-launcher": "^1.0.0", | ||
"karma-spec-reporter": "0.0.26", | ||
"mocha": "^2.2.5", | ||
"npm-check": "^5.2.1", | ||
"phantomjs-prebuilt": "^2.1.7", | ||
"watchify": "^3.7.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "@segment/eslint-config/mocha" | ||
} |
Oops, something went wrong.