How to use Intercom.Net

on your MVC View (.cshtml) add the following line near the top

@using Intercom.Net

if this is a partial view then it can accept a Model of type

@model Intercom.Net.TrackingData

Otherwise, the Model of this page can have a property of type Intercom.Net.TrackingData

Rendering on the page can be achieved by passing the proper Model as follows

@Html.IntercomTracking(Model)

The Controller will pass the TrackingData object which is created as follows

new TrackingData()
{
IntercomAppId = "YOUR INTERCOM APP ID",
IntercomSecretKey = "YOUR SECRET KEY FOR THE APP",
EmailAddress = "EMAIL ADDRESS OF CUSTOMER BEING TRACKED",
UserId = "UNIQUE USERID OF CUSTOMER BEING TRACKED",
CustomerName = "CUSTOMER NAME",
SignupDate = UNIXTIMESTAMP,
CustomData = IEnumerable<KeyValuePair<string,string> of any custom data you track
}

Last edited Oct 19, 2012 at 6:20 PM by qudoos, version 3

Comments

No comments yet.