Skip to content

lukasfischer/openinbound-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

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);

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.

Get in touch

If you need further assistance, please contact lf@netnode.ch


# 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.

About

API Client library for OpenInbound

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages