Skip to content

Instantly share code, notes, and snippets.

@ksnider
Created September 7, 2014 10:38
Show Gist options
  • Save ksnider/58f9fef7504ea8f6cba9 to your computer and use it in GitHub Desktop.
Save ksnider/58f9fef7504ea8f6cba9 to your computer and use it in GitHub Desktop.
Code for tracking opens in an Infusionsoft emial
<?php
//Configure connection to Infusionsoft API
require("isdk.php");
$app = new iSDK();
$app->cfgCon("connectionName"); // Change to your connection name
// Action to perform on open
$contactId = $_REQUEST['contactId'];
$groupId = 1183; // This is a tag I am applying. Your ID will be different
$result = $app->grpAssign($contactId, $groupId);
// Renders an image server side
header("Content-type: image/png");
$im = @imagecreate(100,100)
or die("Cannot Initialize new GD image stream");
$background_color = imagecolorallocate($im, 241, 92, 37);
imagepng($im);
imagedestroy($im);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment