2017 © Pedro Peláez
 

library openinbound-api

API for the OpenInbound analytics server

image

openinbound/openinbound-api

API for the OpenInbound analytics server

  • Friday, May 19, 2017
  • by lukasfischer
  • Repository
  • 1 Watchers
  • 1 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

openinbound-api

Usage

$oi = new OI('YOUR_TRACKING_ID', 'YOUR_API_KEY');

Note: You'll find your tracking id and API on the settings page on app.openinbound.com., (*1)

Examples

Update an existing contact

    $data['email'] = 'email'
    $data['first_name'] = 'Joe';
    $data['last_name'] = 'Long';
    $data['company_name'] = 'Company LCC';
    $data['phone'] = '041 450 10 66';
    $oi = new OI('YOUR_TRACKING_ID', 'YOUR_API_KEY');
    $oi->updateContact($_COOKIE['_oi_contact_id'], $data);

, (*2)

Log a custom event to the OpenInbound backend

    $data['title'] = 'This title will be sent in the OpenInbound event list';
    $data['event_type'] = 'raw';
    $data['raw'] = 'Whatever data you want to send.';
    $oi = new OI('YOUR_TRACKING_ID', 'YOUR_API_KEY');
    $oi->addEvent($_COOKIE['_oi_contact_id'], $data);

Note: The $_COOKIE['_oi_contact_id'] will be automatically set by the OpenInbound tracking script., (*3)

Get in touch

If you need further assistance, please contact lf@netnode.ch, (*4)


API Reference

Contact Entity

Properties

email Contacts email address
first_name First name of contact
last_name Last name of contact
company_name Company name of contact
phone Phone number of contact

Event Entity

Properties

contact_id Contact id
event_type Event type (pageview, lifecycle_stage_changed, submission, raw)
title The "title" of the event.
raw Any data you want to save.

The Versions

19/05 2017

dev-master

9999999-dev

API for the OpenInbound analytics server

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Lukas Fischer