PHPackages                             clickrain/stratus - 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. clickrain/stratus

ActiveCraft-plugin

clickrain/stratus
=================

Stratus integration for Craft CMS

1.1.4(11mo ago)043[1 issues](https://github.com/clickrain/stratus/issues)1proprietaryPHPPHP ^8.0.2

Since Jul 13Pushed 11mo ago5 watchersCompare

[ Source](https://github.com/clickrain/stratus)[ Packagist](https://packagist.org/packages/clickrain/stratus)[ RSS](/packages/clickrain-stratus/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (15)Used By (1)

Stratus Craft CMS Plugin
========================

[](#stratus-craft-cms-plugin)

> A plugin for syncing and displaying Stratus reviews and listing data on your Craft website

Prerequisites
-------------

[](#prerequisites)

### Stratus account

[](#stratus-account)

You will need an account on Stratus to use this plugin. Please [visit the Stratus help center](https://stratus.crunch.help/en/integrations/craft-cms) to get started.

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

[](#installation)

### Install the plugin on the Craft project

[](#install-the-plugin-on-the-craft-project)

#### Craft Plugin Store

[](#craft-plugin-store)

1. Navigate to the Craft CMS control panel and click on the Plugin Store tab.
2. Search for Stratus and click on the plugin.
3. Click on the Try button to install the plugin.

#### Composer

[](#composer)

1. Navigate to the project root directory and run the following command.

    ```
    composer require clickrain/stratus
    ```
2. Use the Craft CLI to install the plugin.

    ```
    ./craft plugin/install stratus
    ```

### Generate an API key and webhook secret

[](#generate-an-api-key-and-webhook-secret)

1. Navigate to the [Account Settings page](https://app.gostratus.io/account/settings) on Stratus and click on the [Integrations tab](https://app.gostratus.io/account/integrations).
2. Under Craft CMS, click on the Generate Keys button. A modal where you can optionaly provide a webhook destination URL will appear.
3. Click on the Generate button. The API key and webhook secret (if you provided a webhook destination URL) will be generated and displayed. Make sure to copy these values to a safe place before closing the modal. You will not be able to retrieve the API key after closing the modal.

### Configure the plugin

[](#configure-the-plugin)

You can configure the plugin in one of two ways. The first is to use the Craft control panel. The second is to use environment variables. The latter is recommended for production environments.

1. Add the following environment variables to the `.env` file in the project root directory. ```
    STRATUS_API_KEY=
    STRATUS_WEBHOOK_SECRET=whsec_
    ```

If you did not provide a webhook URL when generating the API key, you will need to configure the Craft project to run the job queue automatically. You may want to disable `runQueueAutomatically` by setting it to `false` in `config/general.php`.

1. Configure the Craft project to run the job queue automatically. You may want to disable `runQueueAutomatically` by setting it to `false` in `config/general.php`.
2. Add a cron job or scheduled task to run `craft stratus/default/import`

Usage
-----

[](#usage)

### Access entries or reviews globally

[](#access-entries-or-reviews-globally)

```
{# accessing a listing by its Stratus UUID #}
craft.stratus
    .listings({uuid: 'e529a4a3ee1f3a0a47292f391cdbebe74fa72ff2'})
    .one()

{# accessing a review by its Stratus UUID #}
craft.stratus
    .reviews({uuid: 'aec1873c02ecad673af91f2af0f4daaa66fa1887'})
    .one()
```

### Access reviews based on their parent listing UUID

[](#access-reviews-based-on-their-parent-listing-uuid)

```
{# by parent Stratus UUID #}
craft.stratus
    .reviews({listing: 'e529a4a3ee1f3a0a47292f391cdbebe74fa72ff2'})
    .all()
```

### Access reviews associated with an entry by a custom field

[](#access-reviews-associated-with-an-entry-by-a-custom-field)

```
{# asuming the field is named reviews #}
entry.reviews
    .all()
{# access reviews for the first connected listing to the provided entry #}
entry.listings
    .one()
    .reviews
    .all()
```

### Eager loading

[](#eager-loading)

```
{# listings eager loading their reviews #}
craft.stratus
    .listings().with('reviews').all()

{# reviews eager loading their parent listings #}
craft.stratus
    .reviews().with('listing').all()
```

### Filter reviews

[](#filter-reviews)

```
{# Get the reviews for the first listing
and eager load reviews. Also filter the
reviews to only ones that are greater
than 3 stars or recommended (facebook). #}
set reviews = entry.listings
    .with([
        ['reviews', {
            rating: [4,5],
            recommends: [true],
            content: ['not :empty:'],
        }]
    ]).one()
```

```
{# Filter reviews by platform. supported
platforms include the following

    google
    facebook
    healthgrades
    google_play_store
    apple_app_store
    yelp
    tripadvisor
    bbb
    indeed
    glassdoor
    yellow_pages
    zocdoc
    vitals
    realself
    ratemds
    webmd
    zillow

#}
craft.stratus
    .reviews({platform: 'google'})
    .all()
```

### Display information about reviews

[](#display-information-about-reviews)

```
{% set listing = entry.listings.one() %}
{% for review in listing.reviews %}

        Platform Published Date
        {{ review.platformPublishedDate|date }}
        Author
        {{ review.author }}
        Rating
        {{ review.icons.rating|raw (review.rating|default('null')) }}
        Recommends
        {{ (review.recommends|default('null')) }}
        Review Content
        {{ review.content }}
        Platform

                {{review.icons.platform|raw}}
                {{review.platformName}}
                {{ review.platform }}

        Reviewable
        {{ review.reviewableName }} ({{ review.reviewableType }})
        UUIDs

                {{ review.stratusUuid }} (review)
                {{ review.stratusParentUuid }} (parent listing)

        Parent Listing
        {{ review.listing }}

{% endfor %}
```

### Display information about listings

[](#display-information-about-listings)

```
{% set listing = entry.listings.one() %}

    Name
    {{ listing.name }}
    Address
    {{ listing.fullAddress|raw }}
    Address Parts

            {{ listing.address }}
            {{ listing.address2 }}
            {{ listing.city }}
            {{ listing.state }}
            {{ listing.zip }}

    Timezone
    {{ listing.timezone }}
    Phone Number
    {{ listing.phone }}
    Type
    {{ listing.type }}
    UUIDs

            {{ listing.stratusUuid }} (listing)

    Associated Reviews

            {% for review in listing.reviews %}
                {{review.content}} &mdash; {{ review.author }}
            {% endfor %}

    Max Rating Overall
    {{ listing.maxRating }}
    Average Rating Overall
    {{ listing.avgRating }}
    Ratings by Platform

        {% for rating in listing.getRatings %}

                Platform Name
                {{ rating.name }}
                Average for Platform
                {{ rating.avg }}
                Maximum for Platform
                {{ rating.max }}
                Individual Connection Ratings
                {{ rating.ratings|json_encode }}

        {% endfor %}

    Hours

        {% for dayOfTheWeek, hoursDetails in listing.hours %}
            {{ dayOfTheWeek }}:
            {% if hoursDetails.closed %}
                Closed
            {% endif %}
            {% if hoursDetails['24hr'] %}
                Open 24 hours
            {% endif %}
            {% for period in hoursDetails.periods %}
                {{ period.open }}
                {{ period.close }}
            {% endfor %}

        {% endfor %}

    Holiday Hours

        {% for holidayHours in listing.holidayHours %}
            {{ holidayHours.name }} ({{holidayHours.date}}):
            {% if holidayHours.closed %}
                Closed
            {% endif %}
            {% if holidayHours['24hr'] %}
                Open 24 hours
            {% endif %}
            {% for period in holidayHours.periods %}
                {{ period.open }}
                {{ period.close }}
            {% endfor %}

        {% endfor %}

```

### GraphQL

[](#graphql)

```
query {
    stratusListings {
        name
        type
        address
        address2
        city
        state
        zip
        phone
        timezone
        stratusUuid
        maxRating
        avgRating
        ratings
        reviews
        hours
        holidayHours
    }
}

query {
    stratusListing(uuid: "3cab7a2b49654df583d315b3274b646d3ccdda03") {
        name
        type
        address
        address2
        city
        state
        zip
        phone
        timezone
        stratusUuid
        maxRating
        avgRating
        ratings
        reviews
        hours
        holidayHours
    }
}

query {
    stratusReviews {
        content
        platform
        platformName
        rating
        recommends
        author
        platformPublishedDate
        reviewableType
        reviewableName
        stratusUuid
        stratusParentUuid
        listing
    }
}

query {
    stratusReviews(platform: facebook) {
        platformName
        author
        content
    }
}

query {
    stratusReviews(listing: "3cab7a2b49654df583d315b3274b646d3ccdda03") {
        platformName
        author
        content
    }
}

query {
    stratusReviews(listing: "3cab7a2b49654df583d315b3274b646d3ccdda03") {
        platformName
        author
        content
    }
}

query {
    stratusReview(uuid: "023d9f6a23685b85ad22f62c01f25c82b9d81800") {
        platformName
        author
        content
    }
}
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance50

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~53 days

Total

14

Last Release

352d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3189b43b803fa8f761c322bc3d2c912396c4f519614c7919b1a7bc70859ac643?d=identicon)[clickrain](/maintainers/clickrain)

---

Top Contributors

[![jmariklecr](https://avatars.githubusercontent.com/u/128743868?v=4)](https://github.com/jmariklecr "jmariklecr (34 commits)")

---

Tags

pluginCraftcraftcmsstratusclickrain

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/clickrain-stratus/health.svg)

```
[![Health](https://phpackages.com/badges/clickrain-stratus/health.svg)](https://phpackages.com/packages/clickrain-stratus)
```

###  Alternatives

[am-impact/amcommand

Command palette in Craft.

8674.1k3](/packages/am-impact-amcommand)[putyourlightson/craft-log-to-file

Logs messages to a specific log file for Craft CMS.

29368.0k5](/packages/putyourlightson-craft-log-to-file)[marionnewlevant/twig-perversion

Making twig do things it really shouldn't

5465.6k1](/packages/marionnewlevant-twig-perversion)[froala/craft-froala-wysiwyg

Craft 3 CMS plugin for Froala WYSIWYG HTML Rich Text Editor.

1719.0k](/packages/froala-craft-froala-wysiwyg)[weareferal/matrix-field-preview

Add screenshot previews to matrix and neo fields, helping you publish content quicker.

1717.5k](/packages/weareferal-matrix-field-preview)[topshelfcraft/walk

A Craft-aware array\_walk() method, plus some super-convenient console commands, to easily call Craft service methods on a collection of elements or values.

221.5k](/packages/topshelfcraft-walk)

PHPackages © 2026

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