PHPackages                             lerni/silverstripe-google-indexing - 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. lerni/silverstripe-google-indexing

ActiveSilverstripe-vendormodule[API Development](/categories/api)

lerni/silverstripe-google-indexing
==================================

Google Indexing API integration for Silverstripe CMS – for JobPosting and BroadcastEvent structured data

030PHP

Since May 25Pushed 2mo agoCompare

[ Source](https://github.com/lerni/silverstripe-google-indexing)[ Packagist](https://packagist.org/packages/lerni/silverstripe-google-indexing)[ RSS](/packages/lerni-silverstripe-google-indexing/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

silverstripe-google-indexing
============================

[](#silverstripe-google-indexing)

Google Indexing API integration for Silverstripe CMS.

> ⚠️ **The Google Indexing API is restricted to pages with [JobPosting](https://developers.google.com/search/docs/appearance/structured-data/job-posting) or [BroadcastEvent](https://developers.google.com/search/docs/appearance/structured-data/video) structured data markup. Using it for other content violates Google's Terms of Service and may result in API access revocation.**

Requirements
------------

[](#requirements)

- Silverstripe CMS ^6
- `google/auth` ^1.0

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

[](#installation)

```
composer require lerni/silverstripe-google-indexing
```

Google Cloud setup
------------------

[](#google-cloud-setup)

1. Enable the **Indexing API** in [Google Cloud Console](https://console.cloud.google.com/)
2. Create a **Service Account** and download the JSON key file
3. Add the service account email as an **owner** in [Google Search Console](https://search.google.com/search-console) for your property

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

[](#configuration)

Set the service account JSON via environment variable (recommended):

```
GOOGLE_INDEXING_SERVICE_ACCOUNT_JSON='{"type":"service_account","project_id":"…"}'
```

Usage
-----

[](#usage)

Apply `GoogleIndexingExtension` only to DataObject classes with JobPosting or BroadcastEvent schema markup:

```
# app/_config/config.yml
App\Models\JobPosting:
  extensions:
    - Kraftausdruck\GoogleIndexing\Extensions\GoogleIndexingExtension
```

The extension auto-detects the owner's versioning:

- **Versioned** (e.g. SiteTree subclass) → notifies Google on `onAfterPublish` / `onAfterUnpublish`
- **Non-versioned with UrlifyExtension** → notifies Google on `onAfterWrite` / `onBeforeDelete`

Submissions only happen in **live** environments (`Director::isLive()`). Nothing is sent in dev or test.

### Optional: `isPubliclyVisible()`

[](#optional-ispubliclyvisible)

By default, every write/publish triggers `URL_UPDATED`. If your DataObject has additional visibility conditions beyond its published state (e.g. an `Active` flag or a `ValidThrough` expiry date), implement `isPubliclyVisible(): bool`:

```
public function isPubliclyVisible(): bool
{
    return (bool) $this->Active && (bool) $this->ValidThrough >= date('Y-m-d');
}
```

When this method exists, the extension sends `URL_DELETED` instead of `URL_UPDATED` whenever it returns `false` — correctly signalling to Google that the URL is no longer publicly accessible.

Timeout
-------

[](#timeout)

Default HTTP timeout is 10 seconds. Override via config:

```
Kraftausdruck\GoogleIndexing\Extensions\GoogleIndexingExtension:
  timeout: 15
```

License
-------

[](#license)

BSD-3-Clause © Lukas Erni

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance58

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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/e68b89567976eada21fddc5e776f4adcbe15ad846150cbcde6eb24bc185a8e5f?d=identicon)[lerni](/maintainers/lerni)

---

Top Contributors

[![lerni](https://avatars.githubusercontent.com/u/472115?v=4)](https://github.com/lerni "lerni (1 commits)")

### Embed Badge

![Health badge](/badges/lerni-silverstripe-google-indexing/health.svg)

```
[![Health](https://phpackages.com/badges/lerni-silverstripe-google-indexing/health.svg)](https://phpackages.com/packages/lerni-silverstripe-google-indexing)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k18](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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