Download the PHP package revstrat/bloganalytics without Composer

On this page you can find all versions of the php package revstrat/bloganalytics. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package bloganalytics

SilverStripe Site Analytics

Pull data out of Google Analytics for pages and blog tags

Requirements

Documentation

The SilverStripe BlogAnalytics module uses a Google Service Account to interact with Google Analytics.

  1. Set up a service account here. You will receive a configuration such as this:
    {
    "type": "service_account",
    "project_id": "YOUR GOOGLE API PROJET ID",
    "private_key_id": "YOUR PRIVATE KEY ID",
    "private_key": "YOUR PRIVATE KEY",
    "client_email": "EMAIL ADDRESS FOR THE SERVICE ACCOUNT",
    "client_id": "CLIENT ID",
    "auth_uri": "AUTH URI",
    "token_uri": "TOKEN URI",
    "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
    "client_x509_cert_url": "CERT URL"
    }
    
  2. Add the email address for the account to Google Analytics
  3. Get a View ID for the Analytics view you wish to pull from
  4. base64 encode the configuration
  5. Add configuration to your environment:
    GASERVICE="BASE64 ENCODED JSON CONFIGURATION FILE CONTENTS (to avoid escaping values in the private key)"
    GAVIEW="VIEW ID"
    GASTART="7daysago"
    GAEND="today"
    GAMINCUTOFF="100" # Don't track pages with fewer views than this
    
  6. Install with composer require revstrat\bloganalytics
  7. Run /dev/build?flush=all.
  8. Create a queued job of type RevStrat\BlogAnalytics\UpdateTrafficData and run it. The task will schedule itself on completion for 3 hours in the future

Template Usage

Examples:

TopTags, TopSiteTree, TopBlogPosts each return a list, with the target object itself under "Item", and the traffic count under "Traffic".

Each can take an argument to override the default result count limit.


All versions of bloganalytics with dependencies

PHP Build Version
Package Version
Requires silverstripe/cms Version ^4
silverstripe/framework Version ^4
silverstripe/blog Version ^3.2
symbiote/silverstripe-queuedjobs Version ^4.2
google/apiclient Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package revstrat/bloganalytics contains the following files

Loading the files please wait ....