Setting up and using Google Analytics for the Web Widget (Classic)

<div class="article-banners">
<div id="docs-wmp-link"><a href="https://support.zendesk.com/hc/en-us/articles/5411234991258-plan" rel="noopener" target="_blank">What's my plan?</a></div>
<div class="article-banner" id="suite_all">
<table>
<tbody>
<tr>
<td>
<strong>All Suites</strong>
</td>
<td>Team, Growth, Professional, Enterprise, or Enterprise Plus</td>
</tr>
</tbody>
</table>
</div>
<div class="article-banner" id="support_all">
<table>
<tbody>
<tr>
<td>
<strong>Support</strong>
</td>
<td>Team, Professional, or Enterprise</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="body">
<p class="p" dir="ltr"><a class="xref" href="http://www.google.com/analytics/" target="_blank">Google
Analytics</a> is an analytics tool that helps you understand and analyze your web
traffic. The Web Widget (Classic) supports reporting of widget events and channel events
in Google Analytics. This provides insights into how your users are interacting with the
widget.</p>
<p class="p" dir="ltr">This article describes the events tracked in the widget, setting up event
reporting, and viewing event reports in Google Analytics.</p>
<div class="p" dir="ltr">This article includes the following topics:<ul class="ul" id="topic_td2_wvk_nlb__ul_hs1_h1l_nlb">
<li class="li"><a class="xref" href="#topic_fcm_jwk_nlb">Enabling Web Widget (Classic) event reporting for Google Analytics</a></li>
<li class="li"><a class="xref" href="#topic_ikf_rwk_nlb">Viewing Web Widget (Classic) event data on Google Analytics</a></li>
<li class="li"><a class="xref" href="#topic_hw5_qxk_nlb">Disabling Web Widget (Classic) event reporting for Google Analytics</a></li>
<li class="li"><a class="xref" href="#id_gbf_s1r_nlb">Reported widget events</a></li>
</ul>
</div>
<p class="p">Related information:</p>
<div class="p">
<ul class="ul" id="topic_td2_wvk_nlb__ul_xwy_fcl_nlb">
<li class="li"><a class="xref" href="https://developer.zendesk.com/embeddables/docs/widget/settings#analytics" target="_blank">Analytics API setting</a></li>
<li class="li"><a class="xref" href="https://developer.zendesk.com/documentation/classic-web-widget-sdks/web-widget/getting-started/customizing-web-widget-events-tracking-to-third-party-analytics-services" target="_blank">Customizing Web Widget (Classic) events
tracking to third-party analytics services</a></li>
<li class="li"><a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408821673242" target="_blank">Adding the Web Widget (Classic) to your
website or help center</a></li>
<li class="li"><a class="xref" href="https://developer.zendesk.com/documentation/classic-web-widget-sdks/web-widget/quickstart-tutorials/web-widget-javascript-apis" target="_blank">Quickstart – Web Widget (Classic) JavaScript
APIs</a></li>
</ul>
</div>
</div>
<div aria-labelledby="ariaid-title2" class="topic nested1" id="topic_fcm_jwk_nlb">
<h2 class="title topictitle2" id="ariaid-title2">Enabling Web Widget (Classic) event reporting for Google Analytics</h2>
<div class="body">
<p class="p">By default, the Web Widget (Classic) detects if Google Analytics is present on your
web page. When the Google Analytics tag is on your web page, the widget
automatically starts reporting events to Google Analytics. </p>
<p class="p"><strong class="ph b">To set up Google Analytics on your web page</strong></p>
<div class="p" dir="ltr">
<ol class="ol" id="topic_fcm_jwk_nlb__ol_klc_tzq_nlb">
<li class="li">
<a class="xref" href="https://support.google.com/analytics/answer/1042508" target="_blank">Set up a web property</a> in your
Google Analytics account.</li>
<li class="li">Paste the <a class="xref" href="https://support.google.com/analytics/answer/1008080" target="_blank">analytics tag</a> to each web page
with the embedded widget.</li>
</ol>
</div>
</div>
</div>
<div aria-labelledby="ariaid-title3" class="topic nested1" id="topic_ikf_rwk_nlb">
<h2 class="title topictitle2" id="ariaid-title3">Viewing Web Widget (Classic) event data on Google Analytics </h2>
<div class="body">
<p class="p" dir="ltr">You can view and filter widget event data in your Google Analytics account. </p>
<div class="p">
<div class="div">
<p class="p" dir="ltr"><strong class="ph b">To access the event data on Google Analytics</strong></p>
<ol class="ol" id="topic_ikf_rwk_nlb__ol_hmm_pxk_nlb">
<li class="li" dir="ltr">Sign in to your Google Analytics account.</li>
<li class="li" dir="ltr">On the left sidebar, select <strong class="ph b">Behavior</strong> &gt; <strong class="ph b">Events</strong> &gt;
<strong class="ph b">Top Events</strong>.</li>
<li class="li" dir="ltr">Under <strong class="ph b">Event Category</strong>, select <strong class="ph b">Zendesk Web
Widget</strong>.</li>
</ol>
</div>
</div>
</div>
</div>
<div aria-labelledby="ariaid-title4" class="topic nested1" id="topic_hw5_qxk_nlb">
<h2 class="title topictitle2" id="ariaid-title4">Disabling Web Widget (Classic) event reporting for Google Analytics</h2>
<div class="body">
<p class="p" dir="ltr">The <a class="xref" href="https://developer.zendesk.com/embeddables/docs/widget/settings#analytics" target="_blank">analytics setting API</a> is used to disable
the automatic Web Widget (Classic) event tracking for Google Analytics. </p>
<div class="p" dir="ltr">
<strong class="ph b">To disable widget event reporting for Google Analytics</strong><ul class="ul" id="topic_hw5_qxk_nlb__ul_pfw_pbr_nlb">
<li class="li">To each webpage with the widget, add the analytics setting script set to
“false”. Make sure it is before the <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408821673242" target="_blank">widget code snippet</a> in the body
element.<pre class="pre codeblock"><code><strong class="ph b">&lt;script type="text/javascript"&gt;
window.zESettings = {
analytics: false
};
&lt;/script&gt;</strong>

&lt;!-- Start of your_subdomain Zendesk Widget script --&gt;
&lt;script id="ze-snippet" src="https://static.zdassets.com/ekr/{YOUR_SNIPPET_KEY}"&gt;
&lt;/script&gt;
&lt;!-- End of Zendesk Widget script --&gt;</code></pre>
</li>
</ul>
</div>
</div>
</div>
<div aria-labelledby="ariaid-title5" class="topic nested1" id="id_gbf_s1r_nlb">
<h2 class="title topictitle2" id="ariaid-title5">Reported widget events</h2>
<div class="body">
<div class="bodydiv">
<p class="p">An event is a description of an activity that has occurred. The following table
lists and describes the events reported in the Web Widget (Classic).</p>
<div class="p">
<div class="tablenoborder">
<table border="1" cellpadding="4" cellspacing="0" class="table" frame="border" id="id_gbf_s1r_nlb__table_yyl_vyk_nlb" rules="all" summary="">
<colgroup>
<col>
<col>
<col>
<col>
<col>
</colgroup>
<tbody class="tbody">
<tr class="row">
<td class="entry cellrowborder" dir="ltr"><strong class="ph b">Widget channel</strong></td>
<td class="entry cellrowborder" dir="ltr"><strong class="ph b">Category</strong></td>
<td class="entry cellrowborder" dir="ltr"><strong class="ph b">Action</strong></td>
<td class="entry cellrowborder" dir="ltr"><strong class="ph b"> Event label</strong></td>
<td class="entry cellrowborder" dir="ltr"><strong class="ph b">Description</strong></td>
</tr>
<tr class="row">
<td class="entry cellrowborder" dir="ltr"><strong class="ph b">General</strong></td>
<td class="entry cellrowborder" dir="ltr">Zendesk Web Widget (Classic) </td>
<td class="entry cellrowborder" dir="ltr">Web Widget (Classic) Opened </td>
<td class="entry cellrowborder"> </td>
<td class="entry cellrowborder" dir="ltr">When the end user opens the widget</td>
</tr>
<tr class="row">
<td class="entry cellrowborder"> </td>
<td class="entry cellrowborder" dir="ltr">Zendesk Web Widget (Classic)</td>
<td class="entry cellrowborder" dir="ltr">Web Widget (Classic) Minimised </td>
<td class="entry cellrowborder"> </td>
<td class="entry cellrowborder" dir="ltr">When the end user minimises the widget</td>
</tr>
<tr class="row">
<td class="entry cellrowborder" dir="ltr"><strong class="ph b">Chat</strong></td>
<td class="entry cellrowborder" dir="ltr">Zendesk Web Widget (Classic)</td>
<td class="entry cellrowborder" dir="ltr">Chat Opened</td>
<td class="entry cellrowborder"> </td>
<td class="entry cellrowborder" dir="ltr">When Chat is initiated </td>
</tr>
<tr class="row">
<td class="entry cellrowborder"> </td>
<td class="entry cellrowborder" dir="ltr">Zendesk Web Widget (Classic)</td>
<td class="entry cellrowborder" dir="ltr">Chat Shown - same as Chat Opened</td>
<td class="entry cellrowborder"> </td>
<td class="entry cellrowborder" dir="ltr">When Chat is initiated </td>
</tr>
<tr class="row">
<td class="entry cellrowborder"> </td>
<td class="entry cellrowborder"> </td>
<td class="entry cellrowborder" dir="ltr">Chat Served by Operator</td>
<td class="entry cellrowborder">
<p class="p" dir="ltr">Agent display name</p>
</td>
<td class="entry cellrowborder" dir="ltr">When an operator joins an initiated chat </td>
</tr>
<tr class="row">
<td class="entry cellrowborder"> </td>
<td class="entry cellrowborder" dir="ltr">Zendesk Web Widget (Classic)</td>
<td class="entry cellrowborder" dir="ltr">Chat Rating Bad</td>
<td class="entry cellrowborder"> </td>
<td class="entry cellrowborder" dir="ltr">When the end user submits a bad rating
post-chat </td>
</tr>
<tr class="row">
<td class="entry cellrowborder"> </td>
<td class="entry cellrowborder" dir="ltr">Zendesk Web Widget (Classic)</td>
<td class="entry cellrowborder" dir="ltr">Chat Rating Good</td>
<td class="entry cellrowborder"> </td>
<td class="entry cellrowborder" dir="ltr">When the end user submits a good rating
post-chat </td>
</tr>
<tr class="row">
<td class="entry cellrowborder"> </td>
<td class="entry cellrowborder" dir="ltr">Zendesk Web Widget (Classic)</td>
<td class="entry cellrowborder" dir="ltr">Chat Comment Submitted</td>
<td class="entry cellrowborder"> </td>
<td class="entry cellrowborder" dir="ltr">When the end user submits a comment along with
their rating</td>
</tr>
<tr class="row">
<td class="entry cellrowborder"> </td>
<td class="entry cellrowborder" dir="ltr">Zendesk Web Widget (Classic)</td>
<td class="entry cellrowborder" dir="ltr">Chat Request Form Submitted</td>
<td class="entry cellrowborder" dir="ltr">Department name</td>
<td class="entry cellrowborder" dir="ltr">When the end user submits a chat request form
</td>
</tr>
<tr class="row">
<td class="entry cellrowborder"> </td>
<td class="entry cellrowborder" dir="ltr">Zendesk Web Widget (Classic)</td>
<td class="entry cellrowborder" dir="ltr">Chat Offline Message Sent</td>
<td class="entry cellrowborder"> </td>
<td class="entry cellrowborder" dir="ltr">When the end user submits a chat message when
the agent is offline</td>
</tr>
<tr class="row">
<td class="entry cellrowborder" dir="ltr"><strong class="ph b">Contact and ticket forms</strong></td>
<td class="entry cellrowborder" dir="ltr">Zendesk Web Widget (Classic)</td>
<td class="entry cellrowborder" dir="ltr">Contact Form Shown </td>
<td class="entry cellrowborder">
<p class="p" dir="ltr">If ticket forms are also enabled, the label
includes</p>
<p class="p" dir="ltr">the ticket form ID and ticket form name</p>
</td>
<td class="entry cellrowborder" dir="ltr">When the contact form is shown to the end
user</td>
</tr>
<tr class="row">
<td class="entry cellrowborder"> </td>
<td class="entry cellrowborder" dir="ltr">Zendesk Web Widget (Classic)</td>
<td class="entry cellrowborder" dir="ltr">Contact Form Submitted </td>
<td class="entry cellrowborder" dir="ltr">Ticket form ID, ticket form name</td>
<td class="entry cellrowborder" dir="ltr">When the end user submits the contact form
</td>
</tr>
<tr class="row">
<td class="entry cellrowborder" dir="ltr"><strong class="ph b">Help center</strong></td>
<td class="entry cellrowborder" dir="ltr">Zendesk Web Widget (Classic)</td>
<td class="entry cellrowborder" dir="ltr">Help Center Shown </td>
<td class="entry cellrowborder"> </td>
<td class="entry cellrowborder" dir="ltr">When the end user is presented with the help
center</td>
</tr>
<tr class="row">
<td class="entry cellrowborder"> </td>
<td class="entry cellrowborder" dir="ltr">Zendesk Web Widget (Classic)</td>
<td class="entry cellrowborder" dir="ltr">Help Center Search </td>
<td class="entry cellrowborder" dir="ltr">Search term</td>
<td class="entry cellrowborder" dir="ltr">When the end user searches the Help Center in
the widget</td>
</tr>
<tr class="row">
<td class="entry cellrowborder"> </td>
<td class="entry cellrowborder" dir="ltr">Zendesk Web Widget (Classic)</td>
<td class="entry cellrowborder" dir="ltr">Help Center Article Viewed</td>
<td class="entry cellrowborder" dir="ltr">Article ID, article name</td>
<td class="entry cellrowborder" dir="ltr">When the end user views a help center article
link</td>
</tr>
<tr class="row">
<td class="entry cellrowborder"> </td>
<td class="entry cellrowborder" dir="ltr">Zendesk Web Widget (Classic)</td>
<td class="entry cellrowborder" dir="ltr">Help Center View Original Article Clicked </td>
<td class="entry cellrowborder" dir="ltr">Article ID, article name</td>
<td class="entry cellrowborder" dir="ltr">When the end user views the help center article </td>
</tr>
<tr class="row">
<td class="entry cellrowborder" dir="ltr"><strong class="ph b">Voice</strong></td>
<td class="entry cellrowborder" dir="ltr">Zendesk Web Widget (Classic)</td>
<td class="entry cellrowborder" dir="ltr">Talk Shown </td>
<td class="entry cellrowborder" dir="ltr">Talk contact option</td>
<td class="entry cellrowborder" dir="ltr">When the end user is presented with call
options </td>
</tr>
<tr class="row">
<td class="entry cellrowborder"> </td>
<td class="entry cellrowborder" dir="ltr">Zendesk Web Widget (Classic)</td>
<td class="entry cellrowborder" dir="ltr">Talk Callback Request Submitted </td>
<td class="entry cellrowborder"> </td>
<td class="entry cellrowborder" dir="ltr">When the end user submits a callback
request</td>
</tr>
<tr class="row">
<td class="entry cellrowborder"><strong class="ph b">Help Center</strong></td>
<td class="entry cellrowborder">Zendesk Web Widget (Classic)</td>
<td class="entry cellrowborder">Answer Bot Article Viewed</td>
<td class="entry cellrowborder">Article ID, article name</td>
<td class="entry cellrowborder">When the end user views an article from the list of
suggested articles</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>