edbizarro/bi-connect

Connect with 3rd party sources.


README

BI - Connect

Connect with 3rd party sources to get data.

Build Status StyleCI Latest Stable Version 68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f64646633306663363037616135386561323332662f6d61696e7461696e6162696c697479 68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f6337396332303836653136313435343762666139373963303030346136333537 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:

use Bi\Connect\Google\GoogleConnect;
use Bi\Connect\Google\Auth\CredentialsFileAuth;

$googleConnect = new GoogleConnect(
    new CredentialsFileAuth('path/to/ga/credentials.json) // https://developers.google.com/analytics/devguides/reporting/core/v4/authorization#common_oauth_20_flows
);

$googleConnect->addScope('analytics');
$googleConnect->setRedirectUrl('registered callback url'); // Se link above
$googleConnect->getLoginUrl(); // Get google login auth url

// OAuth2 flow

After the OAuth2 flow you can access GA Analytics API

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

Installation

You can install the package via composer:

composer require edbizarro/bi-connect

forthebadge

FOSSA Status