{"versionId":"eb654224-3e0f-48dd-ec40-08dec022b989","articleId":"0c2c9e93-f77c-4013-827b-08db7c3ca568","title":"Google Analytics tracking","tags":["analytics","GA4","All articles"],"content":"<html><head></head><body><p>If you have Google Analytics (GA4) enabled on the site where your bot is hosted, you can send Helpfruit events to Google Analytics for further analysis.&nbsp;</p>\n<h2>Prerequisites</h2>\n<ul>\n<li><span dir=\"ltr\">Google Analytics Account</span></li>\n<li><span dir=\"ltr\">GA4 Analytics running on the site your bot appears on (<a title=\"https://support.google.com/analytics/topic/9303319?hl=en&amp;ref_topic=9143232&amp;sjid=1866279974784025525-ap\" href=\"https://support.google.com/analytics/topic/9303319?hl=en&amp;ref_topic=9143232&amp;sjid=1866279974784025525-AP\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"Link learn more\" aria-invalid=\"true\">learn more</a>)</span></li>\n</ul>\n<p>&nbsp;</p>\n<h2>How to set up GA4 tracking</h2>\n<p>1. Navigate to the Features Control tab in the&nbsp;<a href=\"https://portal.helpfruit.com/configuration/main\">main configuration screen</a> in the Helpfruit portal.</p>\n<p><div><img src=\"https://storage.faqbot.nz/prod/079d861d72cc4aca80c65588df217079/files/pasted_image_article_google-analytics-tracking_f712d850-7660-4bbb-b0ed-8ebce3653cb8.png\"></div></p>\n<p>2. Enable Google Analytics tracking</p>\n<p>Next you will need to enter your Google Analytics API key (secret value). Follow the steps below to generate this key.</p>\n<h3>&nbsp;</h3>\n<h3>How to generate a Google Analytics API Key / secret value for event tracking</h3>\n<p>To find the API key in your Google Analytics account:</p>\n<p>1. Navigate to Admin &gt; Data Streams for the relevant account and property:</p>\n<p><img src=\"https://portal.faqbot.nz/api/images/079d861d72cc4aca80c65588df217079/files/GA4%20setup%201.png?width=1000&amp;height=\"></p>\n<p>2. Select the relevant data stream (typically, this&nbsp;will represent the website your bot is hosted on).</p>\n<p>3. Select Measurement Protocol API secrets (learn more about <a href=\"https://developers.google.com/analytics/devguides/collection/protocol/ga4\" target=\"_blank\" rel=\"noopener\">Measurement Protocol for GA4</a>)</p>\n<p><img src=\"https://portal.faqbot.nz/api/images/079d861d72cc4aca80c65588df217079/files/GA%20setup%20API%20key.png?width=1000&amp;height=\"></p>\n<p>4. Click Create, give your API secret a nickname, and once you've created it, copy the secret value.</p>\n<p><img src=\"https://portal.faqbot.nz/api/images/079d861d72cc4aca80c65588df217079/files/secret%20value.png?width=1000&amp;height=\"></p>\n<p>6. Paste the secret value you have just copied into the Helpfruit portal:</p>\n<p><img src=\"https://portal.faqbot.nz/api/images/079d861d72cc4aca80c65588df217079/files/paste%20secret%20value.png\"></p>\n<p>7. Click Save to complete the setup.&nbsp;</p>\n<h2>Tracked Helpfruit events</h2>\n<p>The following events are tracked in Helpfruit and will be sent to Google Analytics once the integration is set up.</p>\n<ul>\n<li>FormStart</li>\n<li>FormComplete</li>\n<li>FormCancelled</li>\n<li>EngagementTriggered</li>\n<li>ChangeLanguage</li>\n<li>NoAnswer</li>\n<li>ChitChat</li>\n<li>KnowledgeBaseAnswered</li>\n<li>WebSearch</li>\n<li>FeedbackReceived</li>\n</ul>\n<p>Note: If the event has an underscore (e.g. Form_Start, Engagement_Triggered), that event came from Google Analytics event tracking. Helpfruit events do not have spaces.</p>\n<p>To see this in your Google Analytics account, head to Reports &gt; Engagement &gt; Events. Then enter the event name you’d like to see in the search bar.</p>\n<p><img src=\"https://portal.helpfruit.com/api/images/079d861d72cc4aca80c65588df217079/files/GA%20Events.png\"></p>\n<h2>Additional setup in GA4</h2>\n<p>You may also need to set up Helpfruit events as custom events in your Google Analytics account.&nbsp;<a href=\"https://support.google.com/analytics/answer/12229021?hl=en\" target=\"_blank\" rel=\"noopener\">Learn more</a>.</p></body></html>","description":"","isMarkdown":false,"publishedOnUtc":"2026-06-04T22:50:44.5577272","modifiedOnUtc":"2023-07-04T03:13:31.7814518"}