Socket
Socket
Sign inDemoInstall

itunesconnectanalytics

Package Overview
Dependencies
51
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.5 to 0.2.6

2

package.json

@@ -16,3 +16,3 @@ {

],
"version": "0.2.5",
"version": "0.2.6",
"repository": "JanHalozan/iTunesConnectAnalytics",

@@ -19,0 +19,0 @@ "main": "src/analytics.js",

@@ -9,2 +9,4 @@ # iTunesConnectAnalytics

_If you're building a dashboard for yourself or your company you might be better off with checking out [Databox](https://databox.com) (where I currently work) where we provide a super easy to set up iTunesConnect integration as well as a Google Play Developer Console integration._
## Installation

@@ -112,5 +114,41 @@

The full query can pretty much pull all data that can be accessed from the metrics tab of iTunes Analytics -
```js
var query = new AnalyticsQuery.metrics(appId, {
measures: [itc.measures.impressionsUnique /* First key required, Second key is optional for comparison */ , itc.measures.pageViewUnique],
frequency: itc.frequency.months, /* Optional - default is days */
/* Grouping is optional - you can leave it out if you don't want data grouped by anything.
This is same as selecting "view by" in Analytics */
group: {
metric: itc.measures.impressionsUnique /* This is optional - it has to be one of the metric you add in
measures above, else it will error.
If you leave it blank, we'll default it to the first measures, which is normally what you need. */,
dimension: itc.dimension.territory, /* this is the main thing you need to add when grouping */
rank: "", /* Optional - not really sure how it works, but else leave it alone and we will default it to blank.
TODO: Find out what this actually does */
limit: 10 /* Optional - default is 200. TODO: Find out what this actually does */
},
/* Filtering is optional - you can leave it out if you don't want data filtered by anything. This is same as
selecting filtered by in Analytics */
/* You can choose at most 2 filters if you don't use group by, and 1 filter if you use group by */
/* NOTE: every metric cannot be grouped/filtered by every dimension/dimensionFilterKey - for e.g. for app
impressions, app version is irrelevant - using incompatible dimensions with metrics will lead to errored responses.
This is currently not checked by this module and is your responsibility. When in doubt, try out the Analytics
interface and see what is allowed and what isn't. */
dimensionFilters: [
{dimensionKey: itc.dimensionFilterKey.device, optionKeys: [itc.platform.iPad]}
]
}).date('2016-05-01', '2016-06-30'); //can be date or time like above.
```
##### Sources
Metrics query is used to retrieve data under the __Sources__ section in analytics.
Sources query is used to retrieve data under the __Sources__ section in analytics.

@@ -117,0 +155,0 @@ From sources you can retrieve top websites or top campaigns. This can be specified using the `dimension` setting in options.

@@ -189,2 +189,5 @@ 'use strict';

module.exports.dimension = query.dimension;
module.exports.dimensionFilterKey = query.dimensionFilterKey;
module.exports.platform = query.platform;
module.exports.frequency = query.frequency;
module.exports.queryType = query.queryType;

@@ -17,2 +17,3 @@ 'use strict';

activeDevices: 'activeDevices',
activeLast30days: 'rollingActiveDevices',
crashes: 'crashes',

@@ -24,10 +25,42 @@ payingUsers: 'payingUsers',

impressions: 'impressionsTotal',
impressionsUnique: 'impressionsTotalUnique'
impressionsUnique: 'impressionsTotalUnique',
pageViewUnique: 'pageViewUnique'
};
module.exports.dimension = {
appVersion: 'appVersion',
campaigns: 'campaignId',
device: 'platform',
platformVersion: 'platformVersion',
region: 'region',
territory: 'storefront',
websites: 'domainReferrer'
}
module.exports.dimensionFilterKey = {
appPurchaseWeek: 'apppurchaseWeek',
apppurchaseDay: 'apppurchaseDay',
apppurchaseMonth: 'apppurchaseMonth',
appVersion: 'appVersion',
campaigns: 'campaignId',
device: 'platform',
platformVersion: 'platformVersion',
territory: 'storefront',
region: 'region',
websites: 'domainReferrer'
}
module.exports.platform = {
iPhone: 'iPhone',
iPad: 'iPad',
iPod: 'iPod',
appleTV: 'AppleTV'
}
module.exports.frequency = {
days: 'DAY',
weeks: 'WEEK',
months: 'MONTH'
}
module.exports.queryType = {

@@ -68,2 +101,10 @@ sources : 'sources',

_.extend(this.config, config);
if (this.config.group) {
this.config.group = _.extend({
metric: this.config.measures[0],
rank: "" /* TODO: Find out what this actually does. Not adding this errors, so defaulting it to blank */,
limit: 200
}, this.config.group);
}

@@ -70,0 +111,0 @@ // Private

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc