Skip to content

Instantly share code, notes, and snippets.

View raujohn's full-sized avatar

John Rau raujohn

  • Tiny
  • Palo Alto, CA
View GitHub Profile
// SEND DATA TO HUBSPOT
// Hubspot form endpoint
var endpoint = "https://forms.hubspot.com/uploads/form/v2/547412/c939999e-fbf7-47e9-a7a0-69506320dcde";
// Get Hubspot tracking id from cookie
var hutk = Cookies.get('hubspotutk');
// Get Page URL and Title
var pageUrl = $(location).attr('href');
<?php
/*
Plugin Name: PMPro Check Levels
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-check-levels/
Description: A collection of customizations useful when allowing users to pay by check for Paid Memberships Pro levels.
Version: .2
Author: Stranger Studios
Author URI: http://www.strangerstudios.com
*/
<script>
function ssCallBack( resp ) {
// Check if this visitor exists in SharpSpring as a contact
if ( typeof resp.contact != 'undefined' ) {
// Contact exists
// Get industry
if ( resp.contact['IndustrySelect'] ) {
var industry = resp.contact['IndustrySelect'];
}
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Dynamic CTAs Demo</title>b
<link href="//cdn.muicss.com/mui-0.2.10/css/mui.min.css" rel="stylesheet" type="text/css" />
<?php
$leadID = $_GET[ 'leadID' ];
// Set some basic parameters
$limit = 500;
$offset = 0;
$accountID = '********************************'; // Your keys here
$secretKey = '********************************';
$queryString = http_build_query(array('accountID' => $accountID, 'secretKey' => $secretKey));
@raujohn
raujohn / index.php
Last active January 19, 2016 20:40
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Dynamic CTAs Demo</title>b
<link href="//cdn.muicss.com/mui-0.2.10/css/mui.min.css" rel="stylesheet" type="text/css" />
<?php
// This PHP file would be called by a page via AJAX.
// The AJAX data would include:
// - trackingId
// - Data about the lead (email, name, etc)
// - lead id if _setResponseCallback shows a lead is already being tracked
// - something telling the script to do a createLead or an updateLead
// SharpSpring API keys
$accountID = 'xxx';