focuscanada/hubspot-custom-id 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

focuscanada/hubspot-custom-id

Composer 安装命令:

composer require focuscanada/hubspot-custom-id

包简介

Sync a Custom ID property to Hubspot contacts

README 文档

README

Version License Travis Test Coverage

You find you need to do anything fancy but there is no way to uniquely identify users apart from their email address? Well here is a hokey-pokey work-around.

What this does is just base64 encodes the vid property to a custom property that we can actually use. I don't like the idea of directly exposing the vid. So this obfuscates it slightly. However, it is still easy to decode in pretty much any programming language as far as I am aware of.

One example of a use case is adding it as query string in a url from a link in an email. We can then use it to identify the user that clicked the email on the target page.

Install

Using composer:

composer require focuscanada/hubspot-custom-id

Usage

1. Create a new contact property for the custom ID

Name it something like custom_id, and make it a single line text field.

Custom property

2. Create a new smart list

You will need to create a new smart list that contains only contacts where the custom_id property is unknown. Remember the ID of that list. (It should be the number as the last component of the url when editing the list)

list url

3. Use it (example)
<?php

require __DIR__.'/vendor/autoload.php';

use Focus\HubspotId\SyncService;
use Fungku\HubSpot\HubSpotService;

$hubspot_api_key = 'demo';
$hubspot_list_id = '12345';
$hubspot_property = 'custom_id';

$hubspot = HubSpotService::make($hubspot_api_key);
$sync = new SyncService($hubspot, $hubspot_property);

$sync->syncList($hubspot_list_id);
4. Make a workflow (optional)

If you don't want it to run just as something like a cron job, or manually. Then you can deploy it to a server somewhere and create a workflow to access your script as a webhook.

Credits

统计信息

  • 总下载量: 34
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-05-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固