tune-reporting

1.0.11 • Public • Published

tune-reporting

TUNE Reporting SDK for Node

Incorporate TUNE Reporting services.

Update: $Date: 2015-08-26 17:15:38 $

Version: 1.0.11

Table of Contents

Return to Top

Overview

The TUNE Reporting SDKs addressed in this posting are for creating hosted applications which require handling requests to TUNE Advertiser Report services with utility focus is upon Advertiser Reporting endpoints.

Even though the the breadth of the Service goes beyond just reports, it is these reporting endpoints that our customers primarily access.

The second goal of the SDKs is to assure that our customers’ developers are using best practices in gathering reports in the most optimal way.

Available TUNE Reporting SDKs

Supported programming languages for TUNE Reporting SDKs are:

TUNE SDKs for Mobile Apps

The TUNE Reporting SDKs should absolutely not be included within Mobile Apps.

All information pertaining to TUNE SDKs for Mobile Apps are found here.

Developers Community

Developers Community Site for MobileAppTracking™ (MAT), the industry leader in mobile advertising attribution and analytics, provides TUNE Reporting API documentation to best practices and everything you need to be successful with MAT.

This site contains complete information about TUNE Reporting API, and references to all available TUNE Reporting SDKs with sample code.

Return to Top

SDK Installation

This section detail what is required to use this SDK and how to install it for usage.

Installation Prerequisites

Environment

These are the basic requirements to use this SDK:

* node >= 0.10.*
* npm >= 1.4.*

Generate API Key

To use SDK to access Advertiser Reporting endpoints of TUNE Advertiser Report, it requires a MobileAppTracking API Key: Generate API Key.

Installation Choices

You can install tune-reporting-node via npm or by downloading the source from github.

Via npm:

It is available on npm: tune-reporting

Install as follows

    $ npm install tune-reporting

Via ZIP file:

Click here to download the source code (.zip) for tune-reporting.

    $ git clone git@github.com:MobileAppTracking/tune-reporting-node
    $ cd tune-reporting-node
    $ npm install .

TUNE Reporting SDK Configuration

SDK Configuration file

The TUNE Reporting SDK configuration is set within file ./config.js.

And the appropriate environment settings:

config
├── development.json
├── production.json
└── test.json

With generated API_KEY from TUNE MobileAppTracking Platform account, replace UNDEFINED.

; TUNE MobileAppTracking Platform generated API Key. Replace UNDEFINED.
tune.reporting.auth_key=UNDEFINED
; TUNE Reporting Authentication Type: api_key OR session_token.
tune.reporting.auth_type=api_key
; Validate use TUNE Service fields used within action parameters.
tune.reporting.verify_fields_boolean=false
; TUNE reporting export status sleep (seconds).
tune.reporting.status.sleep=10
; TUNE reporting export fetch timeout (seconds).
tune.reporting.status.timeout=240
; TUNE reporting export fetch verbose output.
tune.reporting.status.verbose=false
SDK Configuration module

The TUNE Reporting SDK reads configuration through module ./config.js with the current environment SDK configuration file.

  var
    authKey = config.get('tune.reporting.auth_key'),
    authType = config.get('tune.reporting.auth_type');

By default, configuration is assumed using api_key authentication type.

To override 'api_key' authentication type:

    config.set('tune.reporting.auth_key', apiKey);
    config.set('tune.reporting.auth_type', 'api_key');

To override authentication type using session_token:

    config.set('tune.reporting.auth_key', sessionToken);
    config.set('tune.reporting.auth_type', 'session_token');

If you wish to generate your own session_token, class SessionAuthentication is provided:

  var
    apiKey = config.get('tune.reporting.auth_key'),
    sessionAuthenticate = new SessionAuthenticate();
 
    sessionAuthenticate.getSessionToken(apiKey, function (error, response) {
      if (error) {
        return next(error);
      }
 
      console.log(' Status: "success"');
      sessionToken = response.getData();
      console.log(' session_token:');
      console.log(sessionToken);
      return next();
    });

and you're good to go!

Return to Top

SDK Generated Documentation

SDK code is well commented and to see full documentation of its source using the provided Makefile commands that initiate code documentation generators.

Node.jsdoc

The following will generate YUIdoc from Node.js codebase:

This code documentation generation may require npm installation of YUIdoc.

    $ make docs-yuidoc

TUNE Reporting SDK YuiDoc Generated

TUNE Reporting SDK YuiDoc Generated

 

### Advertiser Reporting Overview

The utility focus of the SDKs is upon the Advertiser Reporting API endpoints. Even though the the breadth of the Management API goes beyond just reports, it is these endpoints that our customers primarily access. The second goal of the SDKs is to assure that our customers' developers are using best practices in gathering reports in the most optimal way.

TUNE Reporting SDK ClassesTUNE Reporting SDK Classes

The endpoints interfaced by TUNE API SDKs provide access in gathering four types of reports:

Log Reports
Log reports provide measurement records for each Click, Install, Event, Event Item and Postback. Instead of being aggregated, the data is on a per transaction / request basis. MobileAppTracking™ (MAT) uses these logs to generate the aggregated data for the Actuals and Cohort reports. Note that we don’t provide Log reports for Impressions and Opens currently.

Advertiser Reporting classes that perform Log Reports are:

Actuals Report
The Actuals report gives you quick insight into the performance of your apps and advertising partners (publishers). Use this report for reconciliation, testing, debugging, and ensuring that all measurement and attribution continues to operate smoothly. MAT generates this report by aggregating all the logs of each request (MAT updates the report every 5 minutes).

Actuals report endpoint include: /advertiser/stats/: Reports' class AdvertiserReportActuals

Advertiser Reporting class that perform Actuals Reports is:

Cohort Report
The Cohort report analyzes user behavior back to click date time (Cohort by Click) or to install date time (Cohort by Install). Depending on whether you view the results based on click or install, the data in the report is vastly different.

Advertiser Reporting class that perform Cohort Reports is:

Retention Report
The Retention report shows you how many of your installed users open or engage with your app over time (how users continue to get value from the app). AdvertiserReportCohortRetention reports are particularly good for evaluating the quality of users as opposed to the quantity of users (as in the case of user acquisition campaigns). For more information about retention reports, please visit Running AdvertiserReportCohortRetention Reports.

Advertiser Reporting class that perform Retention Reports are:

TUNE Reporting API Endpoints

TUNE Reporting API Endpoints

Return to Top

Exporting Advertiser Reports

Currently, there are two different ways of handling advertiser report exports. Both approaches require (A) an action to request that a report be exported and (B) another action to request the report status (if ready to be exported), and if ready, then provide a URL to download the completed report.

Logs and Actuals reports all request an export using action find_export_queue.json, which returns a job_id. You then pass the job_id onto another endpoint Export::download.json, which performs the status checking and report URL retrieval.

Cohort and AdvertiserReportCohortRetention reports all request an export using action export.json, which also returns a job_id. You then pass the job_id onto another action status.json, which performs the status checking and report URL retrieval.

Return to Top

License

MIT License

Reporting Issues

Report issues using the Github Issue Tracker or Email sdk@tune.com.

Package Sidebar

Install

npm i tune-reporting

Weekly Downloads

14

Version

1.0.11

License

MIT

Last publish

Collaborators

  • jefftune