PHPackages                             strego/google-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. strego/google-bundle

ActiveSymfony-bundle[API Development](/categories/api)

strego/google-bundle
====================

Bundle to use the Universal Analytics Google API

1431PHP

Since Jun 23Pushed 11y ago1 watchersCompare

[ Source](https://github.com/Strego/GoogleAnalyticsBundle)[ Packagist](https://packagist.org/packages/strego/google-bundle)[ RSS](/packages/strego-google-bundle/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Analytics GoogleBundle
======================

[](#analytics-googlebundle)

This is based on the original AntiMattr/GoogleBundle. It is solely for Analytics using the Universal Analytics API

Installation
------------

[](#installation)

### Application Kernel

[](#application-kernel)

Add GoogleBundle to the `registerBundles()` method of your application kernel:

```
public function registerBundles()
{
    return array(
        new Strego\GoogleBundle\StregoGoogleBundle(),
    );
}

```

Configuration
-------------

[](#configuration)

### Google Analytics

[](#google-analytics)

#### Application config.yml

[](#application-configyml)

Enable loading of the Google Analytics service by adding the following to the application's `config.yml` file:

```
    strego_google:
        default_tracker: default
        trackers:
            default:
                accountId: xXxxXx
                cookieDomain: .example.com

```

#### Full Configugarion Reference

[](#full-configugarion-reference)

```
    strego_google:
        default_tracker: default
        trackers:
            default:
                accountId: xXxxXx
                cookieDomain: .example.com
                allowHash: false
                allowLinker: true
                trackPageLoadTime: false

```

#### View

[](#view)

Include the Google Analytics Async template in the `head` tag or just before the `` of your layout (The template will lazy load ga).

With twig:

```
{% include "StregoGoogleBundle:Analytics:async.html.twig" %}

```

Usage
-----

[](#usage)

### Manually trigger an PageView

[](#manually-trigger-an-pageview)

Just get the analytics service in your controller via:

```
$analytics = $this->get('strego_google');

// To add just a pageview:
$analytics->addPageView('/testPage');

//To add a Pageview with a specific title
$analytics->addPageView('/testPage2', 'testPage2Title);

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/857c3179f32c4ee3b02f9291e47e75e177845279ff78fc36a4f0c001a0c3d2e8?d=identicon)[maxpowel](/maintainers/maxpowel)

---

Top Contributors

[![matthewfitz](https://avatars.githubusercontent.com/u/208401?v=4)](https://github.com/matthewfitz "matthewfitz (52 commits)")[![KeKs0r](https://avatars.githubusercontent.com/u/2970814?v=4)](https://github.com/KeKs0r "KeKs0r (40 commits)")[![pulse00](https://avatars.githubusercontent.com/u/185278?v=4)](https://github.com/pulse00 "pulse00 (7 commits)")[![micronax](https://avatars.githubusercontent.com/u/1337823?v=4)](https://github.com/micronax "micronax (2 commits)")[![kriswallsmith](https://avatars.githubusercontent.com/u/33886?v=4)](https://github.com/kriswallsmith "kriswallsmith (2 commits)")[![roverwolf](https://avatars.githubusercontent.com/u/210211?v=4)](https://github.com/roverwolf "roverwolf (1 commits)")[![jakzal](https://avatars.githubusercontent.com/u/190447?v=4)](https://github.com/jakzal "jakzal (1 commits)")[![jmikola](https://avatars.githubusercontent.com/u/244663?v=4)](https://github.com/jmikola "jmikola (1 commits)")[![EasierLikeThis](https://avatars.githubusercontent.com/u/599341?v=4)](https://github.com/EasierLikeThis "EasierLikeThis (1 commits)")

### Embed Badge

![Health badge](/badges/strego-google-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/strego-google-bundle/health.svg)](https://phpackages.com/packages/strego-google-bundle)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
