PHPackages                             steve-erdelyi/hubspot-user-php - 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. steve-erdelyi/hubspot-user-php

ActiveLibrary[API Development](/categories/api)

steve-erdelyi/hubspot-user-php
==============================

Access Hubspot user data from PHP and JS seamlessly

v1.0.3(2y ago)09MITPHP

Since Jul 28Pushed 2y ago1 watchersCompare

[ Source](https://github.com/steveerdelyi/hubspot-user-php)[ Packagist](https://packagist.org/packages/steve-erdelyi/hubspot-user-php)[ RSS](/packages/steve-erdelyi-hubspot-user-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

hubspot-user-php
================

[](#hubspot-user-php)

This package allows you to seamlessly integrate with user data stored in Hubspot CRM. You can easily access user data via PHP or JavaScript with some minor additional setup.

Before You Get Started
----------------------

[](#before-you-get-started)

You will need a Hubspot API key in order to use this package. If you don't already have an API key, you can learn how to generate one [here](https://knowledge.hubspot.com/integrations/how-do-i-get-my-hubspot-api-key).

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

[](#installation)

This package can be installed using composer: `composer require steve-erdelyi/hubspot-user-php`

Quick Start
-----------

[](#quick-start)

To use this package, the first thing you need to do is ensure you have already required the autoload file in your PHP template file: `require 'PATH_TO_YOUR_INSTALLATION/vendor/autoload.php';`

Next, tell PHP to use the class namespace: `use HubspotUser/HubspotUser;`

And finally, initialize the HubspotUser class and access a variable: `$hubspot_user = new HubspotUser('YOUR_HUBSPOT_API_KEY');``$first_name = $hubspot_user->name->first;``$last_name = $hubspot_user->name->last;``$full_name = $hubspot_user->name->full;``$email = $hubspot_user->email;`

Use User Variables via JavaScript
---------------------------------

[](#use-user-variables-via-javascript)

You might want to access these variables from JavaScript so you can easily perform client-side personalizations. In order to use variables via JavaScript, you must output the HubspotUser data to the page by adding the following line somewhere inside your page's `` tag: ``

After adding the output function inside your `` tag, you can simply call the variables globally via JavaScript: `let first_name = hubspot_user.name.first;``let last_name = hubspot_user.name.last;``let full_name = hubspot_user.name.full;``let email = hubspot_user.email;`

Changing Your Hubspot UTK Cookie Name
-------------------------------------

[](#changing-your-hubspot-utk-cookie-name)

By default, this package relies on the standard Hubspot UTK cookie name `hubspotutk`. If you need to override the cookie name used to find your Hubpot UTK, you can simply pass a string variable containing your custom name as the second parameter when initializing your class: `$hubspot_user = new HubspotUser('YOUR_HUBSPOT_API_KEY', 'YOUR_CUSTOM_UTK_COOKIE_NAME');`

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

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

Total

4

Last Release

1019d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/aa76d8ef0f8438875ba5c77c16db604c9725c3250fe2a27d20f7f052c67c35e4?d=identicon)[steveerdelyi](/maintainers/steveerdelyi)

---

Top Contributors

[![steveerdelyi](https://avatars.githubusercontent.com/u/67121169?v=4)](https://github.com/steveerdelyi "steveerdelyi (9 commits)")

### Embed Badge

![Health badge](/badges/steve-erdelyi-hubspot-user-php/health.svg)

```
[![Health](https://phpackages.com/badges/steve-erdelyi-hubspot-user-php/health.svg)](https://phpackages.com/packages/steve-erdelyi-hubspot-user-php)
```

###  Alternatives

[allyans3/steam-market-api-v2

Steam Market API v2

1937.3k](/packages/allyans3-steam-market-api-v2)[chapter-three/apple-news-api

Push content to Apple News.

38307.5k3](/packages/chapter-three-apple-news-api)[saleh7/proxmox-ve_php_api

ProxmoxVE PHP API

11718.7k](/packages/saleh7-proxmox-ve-php-api)[yunchuang/appstore-connect-api

sdk for appstore connect api

3865.3k](/packages/yunchuang-appstore-connect-api)[infifni/fan-courier-api-client

Fan Courier API Client

1332.6k](/packages/infifni-fan-courier-api-client)

PHPackages © 2026

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