项目作者: edbizarro

项目描述 :
Connect with 3rd party sources.
高级语言: PHP
项目地址: git://github.com/edbizarro/bi-connect.git
创建时间: 2018-03-23T17:26:15Z
项目社区:https://github.com/edbizarro/bi-connect

开源协议:MIT License

下载



BI - Connect



Connect with 3rd party sources to get data.

—-
Build Status
StyleCI
Latest Stable Version


License

Supported sources:

  • Google Analytics
  • Adobe Analytics (WIP)
  • Facebook Ads (WIP)
  • Instagram Ads (WIP)
  • Twitter (WIP)
  • TailTarget (WIP)

Here are a few examples on how you can use the package:

  1. use Bi\Connect\Google\GoogleConnect;
  2. use Bi\Connect\Google\Auth\CredentialsFileAuth;
  3. $googleConnect = new GoogleConnect(
  4. new CredentialsFileAuth('path/to/ga/credentials.json) // https://developers.google.com/analytics/devguides/reporting/core/v4/authorization#common_oauth_20_flows
  5. );
  6. $googleConnect->addScope('analytics');
  7. $googleConnect->setRedirectUrl('registered callback url'); // Se link above
  8. $googleConnect->getLoginUrl(); // Get google login auth url
  9. // OAuth2 flow

After the OAuth2 flow you can access GA Analytics API

  1. // Retrieve all analytics accounts
  2. $accounts = $googleConnect->analytics()->accounts();

Installation

You can install the package via composer:

  1. composer require edbizarro/bi-connect

forthebadge

FOSSA Status