Download the PHP package zfhassaan/genlytics without Composer

On this page you can find all versions of the php package zfhassaan/genlytics. 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 genlytics

Latest Version on Packagist Total Downloads Hits

Disclaimer

The google UA Property is going away from July 2023. Google is implementing the Google Analytics V4. Universal Analytics will no longer process new data in standard properties beginning on 1 July 2023. Prepare now by setting up and switching over to a Google Analytics 4 property. LearnMore

The Google Analytics data will only be available through the GCP API

Pending Tasks

About

Genlytics is a powerful Google Analytics package for Laravel, designed to help businesses and developers easily track and analyze website traffic and user behavior. Our package integrates seamlessly with your Laravel application, allowing you to access all of the features and functionality of Google Analytics without the need for any additional code. With Genlytics, you can easily track page views, user sessions, and conversion rates, as well as gain valuable insights into your audience and website performance. Whether you're a small business looking to improve your online presence, or a developer looking to add analytics functionality to your Laravel app, Genlytics has everything you need to succeed. The package was created to fetch Google Analytics data in a laravel dashboard

Intended Audience

This document is for developers who want to fetch Google Analytics Data into their Laravel website and show the content on a dashboard.

Query

With Genlytics, you can easily access and query your Google Analytics data using the GA4 property. You can check your website traffic, user behavior, and conversion rates using the GA4 query explorer at https://ga-dev-tools.web.app/ga4/query-explorer/. This powerful tool allows you to create custom queries and gain valuable insights into your website performance. Whether you're looking to track specific metrics or analyze user behavior, the GA4 query explorer provides the flexibility and functionality you need to make data-driven decisions for your business.

Prerequisites

Before integrating Genlytics, a powerful Google Analytics package for Laravel, into your application, it's essential to have a property created on Google Analytics v4 and data stream set up. This will ensure that all of your website's data is being properly collected and tracked by Google Analytics. Once the property and data stream are in place, you can easily integrate Genlytics with your Laravel application, providing you with valuable insights into your website traffic, user behavior, and conversion rates. With the ability to access all of the features and functionality of Google Analytics, Genlytics makes it simple for businesses and developers to understand their audience and improve their online performance.

Enable API and Create Service Account

To get started using Analytics Reporting API v4, you need to first use the setup tool, which guides you through creating a project in the Google API Console, enabling the API, and creating credentials.

Create credentials

Note: When prompted click Furnish a new private key and for the Key type select JSON, and save the generated key as client_secrets.json; you will need it later in the tutorial.
  1. Open the Service accounts page. If prompted, select a project.
  2. Click + Create Service Account, enter a name and description for the service account. You can use the default service account ID, or choose a different, unique one. When done click Create.
  3. The Service account permissions (optional) section that follows is not required. Click Continue.
  4. On the Grant users access to this service account screen, scroll down to the Create key section. Click add Create key.
  5. In the side panel that appears, select the format for your key: JSON is recommended.
  6. Click Create. Your new public/private key pair is generated and downloaded to your machine; it serves as the only copy of this key. For information on how to store it securely, see Managing service account keys.
  7. Click Close on the Private key saved to your computer dialog, then click Done to return to the table of your service accounts.
Add service account to the Google Analytics account

The newly created service account will have an email address that looks similar to:

Use this email address to add a user to the Google Analytics view you want to access via the API. For this package only Read & Analyze permissions are needed.

Installation

You can install the package via composer

Enviornment Variables

Easily integrate Google Analytics tracking with your Laravel application using Genlytics and its environment variables. To set up Genlytics, simply add your Google Analytics property ID and service account credentials as environment variables in your .env file. The GENLYTICS_PROPERTY_ID variable is used to specify your specific GA property and the GENLYTICS_CREDENTIALS variable is used to specify the location of your service-account.json file. With these environment variables in place, you can start tracking website traffic, user behavior, and conversion rates using the power of Google Analytics and Genlytics package for Laravel, making it easy for businesses and developers to understand their audience and improve their online performance.

Configurations

In your config/app.php file, add the following line to the providers array:

In the aliases array of the same file, add the following line:

Publish the package assets by running the following command:

and publish the zfhassaan\genlytics\provider\AnalyticsServiceProvider resources to the laravel app.

Usage

Genlytics is a powerful Google Analytics package for Laravel that allows you to easily track and analyze website traffic and user behavior. To start using Genlytics, you can create an instance of the package by initializing it like this:

You can then use the package's methods to run various reports. For example, you can run a report for active users within a specific date range by calling the runReports method like this:

In addition to running reports, Genlytics also provides a method to fetch real-time analytics data using runRealTime function. For example:

Genlytics also provides a method RunDimensionReport to fetch the dimension, for example:

These methods allows to easily access the data we need to make data-driven decisions for business.


All versions of genlytics with dependencies

PHP Build Version
Package Version
Requires google/apiclient Version ^2.12
php Version ^8.1
google/analytics-data Version ^0.9.0
google/gax Version ^1.18
google/common-protos Version ^1.3.1||^2.0||^3.0
google/longrunning Version ^0.2
grpc/grpc Version ^1.13
google/protobuf Version ^3.21
google/cloud-core Version ^v1.48.1
google/grpc-gcp Version ^0.2.1
google/auth Version ^v1.24.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 zfhassaan/genlytics contains the following files

Loading the files please wait ....