Out of the box, Flowpoint captures general events like page loads, clicks, and scrolls. But you can also use Flowpoint to track custom events, too.
With custom event tracking, you can register specific interaction on your website or web app with Flowpoint. This is helpful for getting granular insight into how people are interacting with your website and enables you to precisely monitor conversion between user journey steps.
Once you start tracking custom events, you'll be able to reference them in the Flow Builder, in the Session Log, and in Page Exploration. Custom events can also be exported from your account.
Tracking Custom Events
Data Layer Script
To track custom events, you first need to add the Data Layer Script to the <head>
section of your website. This script enables you to send custom events from your website to the Flowpoint data layer.
Add the following script to the <head>
section of your website. Place it directly below the Flowpoint tracking script.
Event Tracking Function
Once you've implemented the Data Layer Script, you can add the Event Tracking Function to any interaction on your website. Here's the script:
When you use the code above, replace My custom event with the reference you want to track in Flowpoint. Make sure you maintain the single quotes surrounding the reference.
Example Events
In the code example below, you can see some of the use cases for custom event tracking.
Including Additional Parameters
For more advanced custom event use cases, you can include additional parameters in the Event Tracking Function code. This is useful for tracking interactions like purchases where you want to include details like the product price, modifiers, or the SKU.
Below is an example of a custom event that includes additional parameters. You can include virtually any type of data as log as it's formatted as a key-value pair.
In the following example, you can see how you might dynamically add values based on data from another source on your website or web app.
Additional E-Commerce Examples
Track many types of e-commerce-specific events:
Purchases
Product views
Add-to-cart
Remove-from-cart
Cart view
Add to wishlist/favorite
Purchase Event Example
Testing & Troubleshooting
To confirm your custom events are being tracked in Flowpoint, first fire the event by triggering the associated interaction on your website. Then, view the Sessions Log for your project and select your session. If your custom event was successfully tracked, you'll see it referenced in the session details.
If you don't see your custom events in the Session Log, check your browser's console when triggering an interaction on your website that fires a custom event — there may be errors you need to resolve.
Tip: It's often best to start with a simple, straightforward implementation of the custom event tracking. Once you understand the basics, you can proceed with a more-involved implementation. To help you get started, we've put together a simple demo on CodePen that you can reference and copy.