Code Monkey home page Code Monkey logo

gpes-in-hubspot-api's Introduction

IMPORTANT: This repository is deprecated and should be replaced by this one.

Hubspot info for our form pages

API to improve our forms and Wordpress pages.

This API allows you to check:

  • If an email is in Hubspot
  • The lifecycle, to confirm that's an active donor
  • If the user has the phone number in Hubspot / Salesforce
  • If the user has opted out
  • The Salesforce campaigns the user is in

It can be used to:

  • Improve web analytics, including Google Analytics, Google Adwords Facebook Ads and others
  • Create content in the thank you page that depends on the user
  • Have better privacy management
  • Progressive forms
  • Click-to-go petitions

Install the script

Create an Hubspot private App

You’ll need an Hubspot private app with the access token, the scope crm.objects.contacts.read

Upload this script to a server

  1. Create a subdomain on your server for the script. If you use php-fpm with Nginx you should also create and a Linux user for your script and make php-fpm run on that user. Don't forget to enable https in your subdomain.
  2. Rename includes/config.php.dist to includes/config.php. and protect it from being read by other system users chmod 700 includes/config.php.
  3. Edit this file add access to Hubspot with your private app access token. Finally update the list of domains that will use this script.
  4. If you are using Nginx, protect the config folder inside your path by adding this code to your subdomain conf file:
location ^~ /path-to-your-api/includes/ {
    deny all;
}

Use

To get the data from a user visit the url:

https://your-sub.domain.org/route/[email protected]

gpes-in-hubspot-api's People

Contributors

osvik avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

dexit

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.