Reference guide on how to track actions using Javascript
Reference for the Funnelytics script's window.funnelytics.events.trigger('event-name') function.
You are allowed to pass any event name and object properties as a javascript action into Funnelytics.
Generic Event
This is what a generic event with only an event name would look like. In this example the event name is scroll.
<script>
window.funnelytics.events.trigger("scroll")
</script>
You can include object properties to send additional properties to Funnelytics as well.
Here's another example of a scroll action with a property of the scroll % on the page.
<script>
window.funnelytics.events.trigger("scroll", {
depth: 25
})
</script>
Other Examples
These are just some quick examples, but you can add whatever values you want for the event name or object properties.
Button Click
This action could be used to track if a site visitor clicked a certain button.
<script>
window.funnelytics.events.trigger("click", {
button: "top cta",
page_path: "/optin"
})
</script>
Video View
This action could be used to track if the site visitor plays a certain video on your page.
<script>
window.funnelytics.events.trigger("video", {
video_title: "Sales Video",
video_action: "play"
})
</script>