PHPackages                             vickychhetri/seo-helper - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. vickychhetri/seo-helper

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

vickychhetri/seo-helper
=======================

A Laravel package to manage SEO optimizations.

v1.1.0(2y ago)017MITPHPPHP &gt;=8.0

Since Jun 24Pushed 2y ago1 watchersCompare

[ Source](https://github.com/vickychhetri/seo-helper)[ Packagist](https://packagist.org/packages/vickychhetri/seo-helper)[ RSS](/packages/vickychhetri-seo-helper/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependencies (3)Versions (3)Used By (0)

SEO Helper for Laravel
======================

[](#seo-helper-for-laravel)

SEO Helper is a Laravel package designed to streamline SEO optimizations within Laravel applications. It provides utilities to manage SEO settings efficiently.

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

[](#installation)

You can install this package via Composer. Run the following command in your terminal:

composer require vickychhetri/seo-helper

Usage
-----

[](#usage)

### Publish Configuration

[](#publish-configuration)

To publish the configuration file, use the `vendor:publish` Artisan command with the `--tag=config` option:

php artisan vendor --tag=config

This command will copy the configuration file (`seo_helper.php`) to your Laravel project's `config` directory, allowing you to customize SEO settings.

### Publish Views

[](#publish-views)

php artisan vendor --tag=views If your package includes views that users might want to customize, you can publish them using the `--tag=views` option:

This will copy the views to your Laravel project's `resources/views/vendor/seo_helper` directory, where you can modify them as needed.

Features
--------

[](#features)

- **SEO Configuration:** Customize SEO-related settings easily.
- **Customizable Views:** Modify SEO-related views to fit your application's design.
- **Ease of Use:** Integrate SEO enhancements seamlessly into your Laravel project.

Usage
-----

[](#usage-1)

Initializing SEOHelper To start using SEO Helper, you need to initialize the SEOHelper class:

`use Vickychhetri\SEOHelper\Helpers\SEOHelper;`

`SEOHelper $seoHelper = new SEOHelper();`

Setting Meta Tags

You can set meta tags for title, description, and keywords using the setMeta() method:

`$seoHelper->setMeta('Page Title', 'Page Description', 'keyword1, keyword2'); `Setting Open Graph Tags

Set Open Graph tags such as title, description, URL, type, and image with the setOpenGraph() method:

`$seoHelper->setOpenGraph('Open Graph Title', 'Open Graph Description', 'https://example.com', 'article', 'https://example.com/image.jpg'); `

Setting Twitter Card Tags

For Twitter Cards, set title, description, and image using the setTwitterCard() method:

`$seoHelper->setTwitterCard('Twitter Card Title', 'Twitter Card Description', 'https://example.com/image.jpg'); `

Generating HTML Meta Tags

Once you've set your SEO attributes, generate the HTML meta tags using the generate() method:

`$seoHtml = $seoHelper->generate(); `

Outputting HTML in Views

In your Blade views, output the generated HTML using {!! !!} to render HTML content:

`{!! $seoHtml !!} `

config seo\_helper
------------------

[](#config-seo_helper)

`[ 'key-path' => 'path/to/projectvicky-0ef21a587443.json', 'property' => '2866XXXX', ];`

Instantiate the SeoAnalytics object
-----------------------------------

[](#instantiate-the-seoanalytics-object)

`$seoAnalytics = new SeoAnalytics();`

**Call the activeUserSessionCountyWise method:**Once you have instantiated the object, you can call the method activeUserSessionCountyWise with the appropriate arguments ($start\_date and $endDate):

`$start_date = '2024-01-01';``$endDate = '2024-06-30';`

`$seoAnalytics->activeUserSessionCountyWise($start_date, $endDate);`

Methods Available
-----------------

[](#methods-available)

- `activeUserSessionCountyWise($start_date, $end_date)`: Retrieves active user session data county-wise.
- `activeUserSessionCityWise($start_date, $end_date)`: Retrieves active user session data city-wise.
- `activeUserSessionBrowserWise($start_date, $end_date)`: Retrieves active user session data browser-wise.
- `activeUserSessionDeviceWise($start_date, $end_date)`: Retrieves active user session data device-wise.
- `screenPageViews($start_date, $end_date)`: Retrieves screen page views data. - `topEvents($start_date, $end_date)`: Retrieves top events data.
- `userTrending($start_date, $end_date)`: Retrieves trending user data.
- `newUserCountry($start_date, $end_date)`: Retrieves new user data by country.
- `sessionsCampaign($start_date, $end_date)`: Retrieves session data by campaign.
- `userSessionRevenueCountry($start_date, $end_date)`: Retrieves user session revenue data by country.

Additional Methods
------------------

[](#additional-methods)

Individual Attribute Setters You can also set individual SEO attributes directly using these methods:

- setTitle(string $title): Set the page title.
- setDescription(string $description): Set the page description.
- setKeywords(string $keywords): Set the page keywords.

Open Graph and Twitter Card Specific Setters

- setUrl(string $url): Set the URL for Open Graph.
- setType(string $type): Set the type for Open Graph (e.g., article, website).
- setImage(string $image): Set the image URL for Open Graph and Twitter Card.

Canonical URLs
==============

[](#canonical-urls)

Define a default canonical URL or leave it as null for dynamic setting

Schema.org Markup
=================

[](#schemaorg-markup)

An empty array initializes for dynamic addition of schema.org markup

` { "@context": "https://schema.org", "@type": "Article", "headline": "", "image": "",   "author": { "@type": "", "name": "" },   "publisher": { "@type": "Organization", "name": "", "logo": { "@type": "ImageObject", "url": "" } }, "datePublished": "" } `

Customization
-------------

[](#customization)

Customize default SEO settings by editing the seo\_helper.php configuration file in your Laravel project.

Contributing
------------

[](#contributing)

Contributions are welcome! Fork the repository, make your changes, and submit a pull request.

Issues
------

[](#issues)

If you encounter any problems or have suggestions, please open an issue on the [Issues](https://github.com/vickychhetri/seo-helper/issues) page.

License
-------

[](#license)

This package is open-source software licensed under the [MIT license](LICENSE).

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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 ~2 days

Total

2

Last Release

736d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/82648574?v=4)[Vicky Chhetri](/maintainers/vickychhetri)[@vickychhetri](https://github.com/vickychhetri)

---

Top Contributors

[![vickychhetri](https://avatars.githubusercontent.com/u/82648574?v=4)](https://github.com/vickychhetri "vickychhetri (29 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vickychhetri-seo-helper/health.svg)

```
[![Health](https://phpackages.com/badges/vickychhetri-seo-helper/health.svg)](https://phpackages.com/packages/vickychhetri-seo-helper)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[illuminate/pagination

The Illuminate Pagination package.

12234.1M1.0k](/packages/illuminate-pagination)[illuminate/pipeline

The Illuminate Pipeline package.

9349.2M282](/packages/illuminate-pipeline)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1235.9k20](/packages/fleetbase-core-api)

PHPackages © 2026

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