Using Google Analytics on your Workflows

Setup

For more advanced reporting, you can tie a Google Analytics account to all the workflows in your organization.

  1. Go to Organization and choose the Google Analytics section.
  2. Enter the account number, under the Google Analytics section.

Each time a node is viewed, Google Analytics will track it.  Inside Google Analytics, instead of URLs, a “page view” appears with the workflow ID and node number, like “123456789-1” for workflow ID 123456789, node #1. Note that Google Analytics typically takes 24 hours to produce results.

Events

Two different events are fired when a workflow is rendered and Google Analytics is enabled in Zingtree.

page_view

A page_view event is fired on each node that is loaded on a workflow. The payload for the event is:

{
page_title: `${trees[this_tree_id].name}: ${trees[this_tree_id].nodes[show].page_title_plain}`,
page_location: `${this_tree_id}-${show}`,
userId: source
}

The page_title is a concatenated string of the workflow name and the node name. page_location is a concatenated string of the Workflow ID and the ID of the button that was pressed to get to the node.

resolution_state

A resolution_state event is fired when a node is encountered with its Final Node Session Result set.

The payload of this event is:

{result: 'Success'}

or

{result: 'Failure'}

depending on the Session Result that was set.

 

Was this article helpful?

1 out of 3 found this helpful

Have more questions? Submit a request

Didn't find what you need?

Our friendly customer support team is here to help

Submit a Request

Looking for help or advice?

Reach out to our knowledgeable community of users.

Zingtree Community