Buraq Help Center
ProductsBook a demo
  • πŸ˜ƒWelcome to Buraq
    • Buraq Basics
  • 🏁Getting Started
    • Building a Chatbot
    • Testing a Chatbot
    • Installation
      • Installation on Website
        • Installation using HTML
        • Installation using Google Tag Manager
      • Installing on Wordpress
      • Installing on SquareSpace
      • Installation on WhatsApp
      • Installation on Facebook
    • Deploying a Chatbot
    • Utility Tools
  • 🟦ACTION BLOCKS
    • Trigger
      • Set values to variables using Trigger
    • Send Message
    • Collect Input
    • Buttons
    • Carousel
    • Calendar
    • Send an Email
    • Condition
    • Image gallery
    • Talk to human
    • Slider
    • Collect file
    • Delay
    • Form
    • Flow
    • Jump
    • Codeblock
      • Dynamic Dialog Generator
    • Options
    • List
    • Reply buttons
    • AI model
    • Dynamic data
  • πŸ€–AI Studio
    • Overview
      • From URL
      • From File
      • From Intent
  • πŸ”ŒINTEGRATIONS
    • Overview
    • Events
    • HTTP request
    • Javascript
    • Zapier
    • Google Sheets
    • Salesforce
    • Codeblock
    • Airtable
    • Google Calendar
    • Calendly
    • HubSpot
    • Freshdesk
    • DialogFlow
    • Zoho CRM
    • Slack
      • Live Chat for Slack
      • Notification for Slack
    • ActiveCampaign
    • Link Tracking
  • πŸ“²Whatsapp Business API
    • Overview
    • Cost
    • Limitations
    • Getting a WhatsApp API
      • From Meta
        • Creating a Facebook App
        • Adding the phone number
        • Generating permanent token
        • Configuring the webhook on Buraq
  • πŸ’¬Live Chat
    • Overview
      • Live Chat Screen
      • Live Chat Settings
  • βš’οΈTroubleshooting
    • Cloning Bots
    • Connecting Action Blocks
    • Creating Loops
    • Setting up Fallback Variables
    • Setting up Link Tracking
    • Variable Manager
    • Image Dimensions
    • Tracking Facebook Pixel
    • Firing events on Google Analytics
  • β›”Outbound Bots
    • Overview
    • Building One Off Campaign
    • Building Ongoing Campaign
    • Creating a WhatsApp Template
    • Action Blocks_ Outbound
      • Send WhatsApp
      • Send SMS
      • Delay
      • Branch
  • 🦾CHATBOT CUSTOMIZATION
    • Chatbot Appearance
    • Custom CSS
    • Embed chatbots on website
    • JS functions to show_hide
  • πŸ•΅οΈβ€β™‚οΈAccount Management
    • Teams
    • Teammates
    • Purchasing a plan
    • Payment Methods
    • Refund Policy
    • Reset Password
    • Deleting Account
  • πŸ“ŠReporting
    • Analytics Dashboard
      • Chatbot Analytics
      • Agent Analytics
    • What are contacts in Buraq?
      • Scheduling a Contact Report
      • Exporting a Contact List
Powered by GitBook
On this page
  1. Troubleshooting

Firing events on Google Analytics

PreviousTracking Facebook PixelNextOverview

Last updated 1 year ago

Step 1: Make sure that the Google Analytics 4 code snippet is present

In order to fire events to your measurement ID, you need to first make sure that the Google Analytics code snippet is already added to your website. Usually, website either add it manually on the code or using Google Tag Manager.

Step 2: Add the Javascript block on the chatbot flow

At the point in the chatbot flow when you want to fire an event, add the Javascript action block and input this code.

window.dataLayer = window.dataLayer || [];
function gtag() {
  window.dataLayer.push(arguments);
}
gtag("js", new Date());
gtag("config", "YOUR-MEASUREMENT-ID");
gtag("event", "YOUR-EVENT-NAME", {
  "send_to": "YOUR-MEASUREMENT-ID"
  // ADDITIONAL PARAMETERS THAT YOU MAY WANT TO PASS
});

Make sure you add the MEASUREMENT ID of your GA4 property in the mentioned places. And also, use the event name as per your requirement.

You can find your MEASUREMENT ID by navigating to the Settings -> Data collection -> Data streams

Refer to this page for default GA events --

Note that it takes about 20-30 seconds for events to reflect in Google Analytics

βš’οΈ
https://developers.google.com/analytics/devguides/collection/gtagjs/events