Back to Home

    WEB ANALYTICS

    Transforming Analytics: Empowering Web Analysts with ChatGPT

    June 30, 2023 • 9 Min Read

    Transforming Analytics: Empowering Web Analysts with ChatGPT

    Discover how the powerful combination of AI and ChatGPT is transforming web analytics, providing personalized and interactive insights to analysts.

    In today’s digital landscape, web analytics has emerged as an indispensable tool for businesses seeking to glean valuable insights into user behaviour, optimize marketing strategies, and fuel exponential growth. With the advent of Artificial Intelligence (AI) and the transformative capabilities of ChatGPT, web analysts now possess an unprecedented tool that seamlessly combines personalization and interactivity. This study explores the paradigm-shifting synergy of AI and ChatGPT, shedding light on how they redefine the landscape of web analytics, empowering analysts to unlock profound insights and foster data-driven decision-making.

    When it involves ChatGPT for analytics, the AI platform shines. Conversations with ChatGPT approximately Analytics allow the analysts to higher arrange initiatives, deepen their personal know-how of metrics, and troubleshoot vital issues. All way to the energy of Artificial Intelligence (AI).

    ChatGPT is a useful device for chatdata analysts which could help in undertaking exploratory information analysis, producing insightful visualizations, writing code, and appearing superior statistical modeling.

    In this article, we can manual you thru the procedure of the usage of ChatGPT to research and interpret analytics information, supplying you with insights to enhance your enterprise approach and decision-making. The worldwide huge information and enterprise analytics marketplace become valued at $193.14 billion in 2019 and is predicted to reach $420.ninety eight billion via way of means of 2027, developing at a CAGR of 10.9% from 2020 to 2027.

    How to Understand ChatGPT for Analytics

    When it comes to discussing ChatGPT, there is an extensive and nuanced conversation to be had. To provide a concise overview, ChatGPT is an incredibly powerful language model developed by OpenAI. This extensively trained model exhibits a remarkable ability to generate text that closely resembles human language, making it an ideal solution for a wide range of natural language processing (NLP) tasks.

    With ChatGPT, you gain access to a multitude of applications. It excels in tasks such as language translation, text summarization, and question answering, among numerous other possibilities. The versatility and potential of ChatGPT are boundless, continually unfolding as new use cases emerge and imagination fuels innovation.

    In summary, ChatGPT is a groundbreaking language model with limitless potential, capable of revolutionizing various NLP applications and expanding the realm of what is possible in the field of artificial intelligence.

    ChatGPT for Analytics — 3 Step by Step useful cases

    In the ever-evolving landscape of artificial intelligence, the future is unfolding before our eyes. Amidst these advancements, an intriguing possibility emerges — leveraging the power of ChatGPT to optimize your tracking processes. This cutting-edge AI tool possesses exceptional intelligence and reliability, making it an invaluable asset for enhancing your utilization of Google Analytics 4.

    With ChatGPT, you can unlock a new level of efficiency in tracking and analysis. Seamlessly integrating this intelligent solution with Google Analytics 4 empowers you to uncover valuable insights and gain a deeper understanding of your data. By harnessing the capabilities of ChatGPT, you can revolutionize your tracking practices and stay ahead in the rapidly evolving world of AI-driven analytics.

    Experience the intersection of AI and analytics like never before, as ChatGPT paves the way for unparalleled efficiency and precision in your tracking endeavors. Embrace the future of artificial intelligence and elevate your tracking game with the powerful synergy of ChatGPT and Google Analytics 4.

    1. Compose Regular Expressions In Analytics Reporting

    Regular expressions can be used in composing analytic reports such as Google Search Console (GSC) or Google Analytics (GA).

    Regular expressions are one of the most boring tasks I know, and it may really slow down work. For marketers, it is even tougher, as they typically don’t have a technical background.

    Let’s look at an example of GSC’s reporting, which supports filtering by regexp (regular expression).

    Screenshot of GSC Query Filter by Regexp

    If you are a marketer with no technical background, you may find it hard to use this feature and limit yourself to the few basic regexps, which you can find by searching dev-related forums.

    Now, you have ChatGPT at your disposal.

    Just go to ChatGPT and ask: Compose regular expression which starts with “How To” or “What is” case insensitive using RE2 syntax.

    Screenshot of ChatGPT response, January 2023

    (?i)^(?:How To|What is)
    

    It got the job done instantly.

    Copy and paste the pattern in GSC’s filter field, and you will have all the queries that are candidates to optimize for FAQ or HowTo schema.

    Screenshot of GSC report

    Pretty easy, isn’t it?

    You can use it to compose regexp for GA reports as well.

    For example, let’s say you want to filter a report which has in the URL the words “iphone” and “apple”

    Just to note, it is important to mention “RE2 syntax” in the command, as Google’s reporting dashboards support that syntax.

    2. Write Custom HTML Listener

    If we start with asking a question: “how would I track a copy event with Google Tag Manager?”

    ChatGPT Prompt

    A complete step by step answer from ChatGPT —

    ChatGPT Response

    The steps laid out by ChatGPT go into much detail, going through creating a new trigger, selecting a custom event trigger type, and suggesting a ‘copy’ event name. However, it doesn’t specify how the trigger will register the copy event.

    We would need a custom JavaScript listener for this and ChatGPT has completely skipped over this step. Luckily, we can easily ask a follow-up question.

    Let’s ask something along the lines of what would be the right custom HTML I need to deploy inside of GTM to make this work.

    A follow-up question to ChatGPT

    There we have it! ChatGPT gave us back an answer, this time with the custom HTML code we need and would have expected in the first answer.

    Follow-up question answer from ChatGPT

    Not only did it give us the custom HTML code, but it also provided us with a thorough explanation of what the code will do, how it works, and how to implement the code in GTM. So, the code will listen for a copy event and when it is triggered, the selected text will be pushed to the data layer using the dataLayer.push method.

    Let’s try out this code by first clicking on Copy code.

    Copy codes from ChatGPT

    Go to Google Tag Manager and create a new Custom HTML tag. Paste the code in the HTML section, then provide a name for the tag.

    Google Tag Manager — 1

    Next, select the All Pages trigger.

    Google Tag Manager Triggering

    After saving and previewing this tag, select and Copy any piece of text from the website connected to the Tag Assistant.

    Google Tag Assistant

    If we go to the Tag Assistant, we should see our copy event successfully triggered. Opening it should show the dataLayer.push with the selected text under the eventLabel key.

    Google Tag Assistant -2

    Now that we have a custom HTML listener for a copy event, we can now build a custom event trigger that was described when we first asked ChatGPT. Then, you would also need to create a tag to send that data over and different variables to store that data inside of GTM.

    Such an interesting way to use ChatGPT for Web Analysts, right? Thankfully, everything was done correctly, but what should you do if there are errors in the code? Let’s discuss that in a different article.

    3. Fix a Bug in Custom HTML

    When you copy an HTML code from the internet, you will sometimes encounter bugs when you try to test them out. We now know that we can use ChaptGPT with Google Tag Manager to write custom code, but is it capable of fixing them? Yes, definitely!

    For example, let’s look at this sample code here:

    Sample JavaScript from GTM

    This piece of code is similar to the code we tested earlier, where it listens to a copy event.

    Let’s copy this code and paste it into our custom HTML tag.

    GTM Tag Configuration

    After saving and previewing this tag, we are faced with these errors.

    ChatGPT is great at helping you out with errors, as well. First, let’s copy the first error description so that we can use it as input into ChatGPT.

    Let’s first provide a request asking ChatGPT to fix the error we encountered in GTM. Paste the error description below that along with the piece of code we used.

    Let’s see if ChatGPT is smart enough to correct this code. Here we have the answer.

    It not only gave a new code that we can try out, but it also explained why this error occurred.

    At a glance, we can see that this is treading closer to the right code, as it invoked the function() expression and removed the const keyword, which is not standard of the JavaScript syntax GTM uses. Let’s test it out to be sure.

    Go ahead and copy this new code.

    Replace this code in our custom HTML tag.

    After saving and previewing the tag, there should be no more errors this time. If there are still errors, we can still go back and present the errors to ChatGPT to fix them a second time.

    So, we can use ChatGPT with Google Tag Manager to help solve JavaScript errors by providing the input of what the error is and the JavaScript code used.


    There is an abundance of possibilities that we can accomplish in Google Analytics (GA) and Google Tag Manager (GTM) with the assistance of ChatGPT. However, it is crucial to possess a comprehensive understanding of these tools. Without adequate knowledge, troubleshooting issues becomes challenging, and effectively communicating with ChatGPT becomes problematic.

    I am currently crafting a meticulous, step-by-step guide tailored for Web Analysts. This comprehensive resource will prove valuable for individuals at all skill levels, ranging from beginners to experts in the field. Should you have any inquiries or concerns, please do not hesitate to contact me at golamasad.pias@yahoo.com. I am here to provide assistance and address any questions you may have.