Tracked Custom Events

About

Custom events for use in multiple features can be created by Insightly Marketing System Administrators. This functionality is only available to Insightly Marketing Enterprise Plan customers. 

In this Article

About

How do Tracked Custom Events Work?

Tracked Custom Event Actions

Create a Tracked Custom Event

Examples of Applicable JavaScript Code

Edit a Tracked Custom Event

Delete a Tracked Custom Event

How do Tracked Custom Events Work?

Tracked custom events allows users to create a custom event (in addition to the default tracked events in Insightly Marketing) and when this custom event is triggered by Prospect action, the custom event is recorded by Insightly and displayed in the following features:

  • Prospect Timeline
    • Custom events will display in a Prospect's timeline and can be clicked to expand to display event details.
  • Prospect Scoring Models
    • Custom events can be integrated with scoring models by selecting Prospect Custom Event as the rule definition and selecting the applicable custom event.
  • Journeys 
    • When adding steps to a Journey, a Check step can be added to check if a Prospect has completed a custom event.
  • Dynamic List rules criteria 
    • When adding rules to a Dynamic List, a rule can be added to review the completion of a custom event.
  • Reporting
    • The Tracked Custom Event Report in the Visitor Reports can be utilized to review information in one location regarding custom events.

Tracked Custom Event Actions

Create a Tracked Custom Event

  1. Within Insightly Marketing, click the user profile in the upper right corner and select System Settings. Under the Feature Settings section, select Tracked Custom Events
    1. From the Tracked Custom Events page, existing custom events will display in the list view. To create a new custom event, click Add Event in the upper right corner. 
    2. The Add Custom Event screen will display where the following can be applied:

      Field

      Input

      Event Name

      Enter a unique name for the custom event.

      Category Code

      Multiple events can be created with the same Category Code as this code is used to group custom events together. 

      Action Code

      Each custom event is required to have unique combination of Category Code and Action Code. If a new event is created with a Category Code and Action Code that match an existing custom event, an error will be presented and the combination of the fields will need to be changed. 

    3. Once all fields have been addressed, Add Event can be clicked to complete the creation of the custom event. 
      1. Once a custom event has been created it will display in the list view of the Tracked Custom Events page and, it will be available for use in Prospect Scoring Models, Journeys, and Dynamic Lists
    4. In order to track a custom event, users are required to add the Javascript code for domain tracking to System Settings > Domain Management > Website Tracking Domains. If the JavaScript code is not added, custom events that are added to a webpage will not be tracked.

Examples of Applicable JavaScript Code

To add code to your website, you will need to be familiar with HTML, CSS, and JavaScript. Here are a few examples of applicable code:

 

Expected Results

HTML

JavaScript

The HTML provided creates a button on your website.

The JavaScript provided makes tracking the event possible.

<input type="button" value="Button 3rd" id="btnSE3">Button</input>

<script type="text/javascript">
const button3 = document.getElementById('btnSE3');
button3.addEventListener('click', () => {
window.trackStructured('Category Button 3','Button 3 SE Action','Button 3 SE Label');
})</script>

  

Expected Results

HTML

JavaScript

The HTML provided creates a button on your website.

The JavaScript provided adds several events to one button: mouse over, click, and mouse out.

<button id="myBtn">Try it</button>

<script>
var x = document.getElementById("myBtn");
x.addEventListener("mouseover", myFunction);
x.addEventListener("click", mySecondFunction);
x.addEventListener("mouseout", myThirdFunction);

function myFunction() {
document.getElementById("demo").innerHTML += "Moused over!<br>";

}

function mySecondFunction() {
document.getElementById("demo").innerHTML += "Clicked!<br>";
}

function myThirdFunction() {
document.getElementById("demo").innerHTML += "Moused out!<br>";
}
</script>

  

Expected Results

HTML

JavaScript

The HTML provided creates a form that requests a first name. Upon submission, the data will be sent to a file or page you specify. You will need to replace /action_page.php with the page you need the data submitted to.

The JavaScript provided will run the function and alert the user that the form was submitted.

<form action="/action_page.php" onsubmit="myFunction()">
Enter First Name: <input type="text" name="fname">
<input type="submit" value="Submit">
</form>

<script>
function myFunction() {
alert("The form was submitted");
}
</script>


Edit a Tracked Custom Event

  1. To edit a tracked custom event, click the user profile in the upper right corner and select System Settings. Under the Feature Settings section, select Tracked Custom Events
    1. From the Tracked Custom Events page, via the list view, locate the custom event that requires edits. 
    2. Click either the name of the custom event to open the record or click the three dots menu to the far right of the custom event and select Edit This Tracked Custom Event.
      1. If a category or action code is changed and there are tracked custom events on a Prospect’s timeline, these events will no longer be displayed and only new tracked events with the edited category and action codes will be displayed. 
    3. Once all applicable edits have been made, Add Event can be clicked to save the edits and apply them to the custom event. 

Delete a Tracked Custom Event

  1. To delete a tracked custom event, click the user profile in the upper right corner and select System Settings. Under the Feature Settings section, select Tracked Custom Events
    1. From the Tracked Custom Events page, via the list view, locate the custom event that requires deletion. 
    2. Click the three dots menu on the far right of the custom event and from the available options, select Delete This Tracked Custom Event.
      1. A popup will display asking for confirmation to delete the custom event. 
      2. Once a tracked custom event is deleted, it will not appear in anywhere Insightly Marketing, even as a past event on a Prospect’s timeline. 
Was this article helpful?