Using Google Analytics on your Trees

  • Updated


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

  1. Go to My Account > Organizations and Billing.
  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 tree ID and node number, like “123456789-1” for tree ID 123456789, node #1. Note that Google Analytics typically takes 24 hours to produce results.


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


A page_view event is fired on each node that is loaded on a tree. 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 tree name and the node name. page_location is a concatenated string of the Tree ID and the ID of the button that was pressed to get to the node.


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'}


{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 Ticket

Looking for help or advice?

Reach out to our knowledgeable community of users.

Zingtree Community