1 Reply Latest reply on Apr 7, 2015 9:07 PM by Sanford Whiteman

    Tracking events using REST API

      We currently track several key milestone events for users of our platform, and now I'm working on passing this event information to Marketo. We have varying needs for different specific events, but generally they fall into one of two broader information types: either we want event date (first or most recent) or multiple recorded instances of the same event (for recurring event types, like changes to account settings).

      1. Event dates
      For a few of the events, I would like to associate a date with an existing lead when the event is triggered. I only need a date (not date+time) for these events, and I have custom fields formatted accordingly, but I was wondering if I need to format as mm/dd/yyyy or if I need to use reversed format (dd/mm/yyyy) to pass that value. 

      2. Recurring events (non-date) 
      Some events are recurring, and we will alternately want to filter leads looking for those who did a particular action in a specific time period (eg April 1 - April 15), instead of looking for the most recent instance of an event or the first instance of an event. Rather than have a date field and overwrite it when an event is recurring, I was planning on setting up several forms, each specific to a particular event, and triggering a POST to Marketo as outlined in this article, so that one example event process would look like:
      a. $user edits the proxy hosting settings for his account.
      b. Login email address of $user and a formid value specific to the "updated proxy hosting settings" are included in POST to our Marketo instance
      c. Event is recorded in $user lead history log as a "filled out form" action, allowing us to filter for one or more occurances during a specific period
      d. Other scoring and operational flows can be run based on a "filled out form" trigger as needed

      This is a solution that I've used in previous Marketo instances for similar event tracking, and it will generally meet our requirements for tracking and scoring on these types of events. However, I realize that the article linked above dates back to long before a REST API was available for Marketo, so there might be a better way to do this now. Has anyone tried to do the same using the "Request Campaign" or "Add to list" options (or some combination of these)?
       
        • Re: Tracking events using REST API
          Sanford Whiteman
          From your description, it doesn't sound like you need to use the REST API nor even server-side form posts.  You just need to use the client-side Munchkin and Forms 2.0 APIs, which are waaaay more scalable.

          I'm assuming that your "platform" is a web app and that you want to log events to Marketo synchronously just after your interesting user activity (as opposed to asynchronously and/or in response to some disconnected back-end processes).  

          If so, for [1] you can load and auto-submit a simple form, and for [2] you can fire a Munchkin `clickedLink` event to /milestone/111 or /milestone/222.