Close this search box.

How to Use ChatGPT in Digital Marketing

Last Modified on December 22, 2023

You’re probably aware of the AI influence in the online world, but have you ever thought about using it in digital marketing?

ChatGPT is a classic example of how the use of AI can help you increase efficiency, especially in digital marketing.

What can you use it for? How do you use it effectively? Can you rely on this chatbot for utmost accuracy?

You are at the right place to get the answers to these questions!

In this article, we’ll share with you insights from some of our niche experts along with the actual prompts they have used to get the best results.

We will be covering the following uses of ChatGPT in digital marketing:

So, let’s dive in!

Writing RegEx Patterns with ChatGPT

Ahmad Kanani, Founder & CEO of Siavak

Ahmad Kanani, Founder & CEO of Siavak

First up, we have Ahmad’s usage of ChatGPT for writing RegEx patterns along with some tips on best practices for using ChatGPT.

What are RegEx Patterns?

A Regular Expression (RegEx) is a pattern that describes a set of strings that matches the pattern.

“It turns out that ChatGPT is really good at writing complex RegEx patterns.

Just ask your RegEx question clearly and with enough details, as you were asking an experienced developer, and ChatGPT usually gives you either the perfect final pattern, or something that’s 95% there and you only need to tweak it a bit to get it to work.”

He gave examples of using ChatGPT for RegEx, here are a few prompts used:

  • help me write a REGEX_EXTARCT() function that extracts the value of a specific query parameter from a URL
  • extract product name from a Shopify store’s URL

“What I really like about ChatGPT is that it explains how the RegEx pattern is constructed.

Not only you’ll get to your final working RegEx much quicker, but also you’ll learn and improve your skills over time.

You should have a basic understanding of RegEx to be able to validate the response and tweak it if required.”

Ahmad also shared a couple of tips when using ChatGPT:

💡 Top Tip: “Be specific in your prompt, but not more specific than needed. Give examples of the types of output you expect, and mention any additional information needed to solve the problem.”

💡 Top Tip: “Always test the RegEx pattern provided by ChatGPT in a tool like to ensure it works as you expect.”

💡 Top Tip: “Specify whether it’s RegEx for BigQuery SQL or Google Data Studio (ChatGPT seems to have been trained before the rebranding to Looker Studio, so in my prompts, I still refer to it as Google Data Studio).”

💡 Top Tip: “Don’t use it as a replacement to your brain, use it as a capable assistant to save you time and make you more efficient in what you already do.”

You can check Ahmad’s full article here.

Using ChatGPT for Google Tag Manager and Looker Studio

Josh Silverbauer, Head Of Analytics & CRO at From The Future

Josh Silverbauer, Head Of Analytics & CRO at From The Future

Next up, we have Josh who will share with us how he uses ChatGPT for Google Tag Manager and Looker Studio.

“Chat GPT has been a significant development for my productivity and my business. I’ve been experimenting with the use cases around digital analytics, CRO, and Google Tag Manager. 

For Google Tag Manager, I’ve mostly used it so far to write Regex and Custom Javascript for targeting elements and event listeners. 

I’ve found that you still need to have a good sense of GTM for it to be beneficial because it doesn’t always produce results that work, but usually if you tweak either the code or the prompt, you can get it to work. It’s more of a time-saver than anything else. 

On the digital analytics side, mostly I’ve used it for Looker Studio formulas, to write case when statements, and to format fields with little effort. 

For CRO, I’ve had it write alternative headlines and alternative copy and analyze the total pages of copy to determine how to communicate the messaging on a page better. 

I think where it’s most limited is that it’s not currently able to understand designs, so it can only help with the copy part of CRO. 

Here are some exact requests I’ve asked ChatGPT for GTM & Looker Studio assistance:

  • Can you target the first form field in this code and write me code for GTM to capture the field value on form submit – Supplied form code
  • Can you build me a regex of “” but target path2 and make it dynamic so it would always pick up anything after path1/ and stop after path2/
  • Using Regex Extract for google data studio can you remove the first slash here: /
  • Can you write me an SQL for GA4 to count the event_name “session_start” over the last 6 months to 2 days ago grouped by date? I need it dynamic so that it always is the last 6 months to 2 days ago”
Claire Jarrett, Marketing Expert & Founder of Jarret Digital LTD

Claire Jarrett, Marketing Expert & Founder of Jarret Digital LTD

Clair has shared with us how to use ChatGPT to analyze large amounts of data for Google Ad campaigns.

“We’re using big data sets daily, as we handle numerous Google Ad campaigns that require us to analyze big chunks of it over and over again to improve performance.

For instance, we use ChatGPT to analyze the performance of different keywords used in the ad campaigns. You can use it to identify keywords that hit your ROA targets, as well as identify negative keywords that may be hurting your campaign performance.


Can you help me analyze the performance of my Google Ad Campaign keywords? I have a dataset of keywords, impressions, clicks, CPA, conversions, ROA, cost per conversion, and cost per click (CPC) for each keyword. Using this data, can you tell me which keywords are performing well (ROA above xxx% <plug in your target ROA>), as well as identify any negative keywords that may be hurting my campaign performance? Additionally, can you provide any insights into how I can optimize my bids for each keyword to improve my campaign’s overall performance?

Here is the dataset:

<plug in data from csv file – use comma separated values>

Based on your analysis, please also provide me with additional keyword targets that are worth exploring.

With this, we can analyze large chunks of search data with ease. Of course, it all requires human monitoring, as GPT-3.5 is still a bit spotty at times…

This can be adjusted to analyze lots of different datasets, including demographics, location, traffic sources, etc. ChatGPT is a nifty tool that we will probably start to use more often.”

Data Analysis with ChatGPT

Milosz Krasinski, Managing Director at Chilli Fruit Web Consulting

Milosz Krasinski, Managing Director at Chilli Fruit Web Consulting

Milosz has shared with us how he utilizes ChatGPT for analyzing data.

“Data analysis is another area where ChatGPT has proven to be a real MVP. We can input vast amounts of data related to our clients’ websites, such as traffic, bounce rates, and conversion rates, and let ChatGPT do the heavy lifting. 

It analyzes the data and provides us with insights that help us to identify areas for improvement. 

In another specific example, we used ChatGPT to analyze a client’s website data and discovered that their website load speed was significantly impacting user experience. 

By optimizing their website, we were able to reduce load times by 35%, resulting in a significant increase in user engagement.

Sometimes we just simply start with “Can you analyze some data tables?” and then we just copy and paste data from our spreadsheets. 

ChatGPT will suggest ways to analyze it for you if you are unsure what you’d like to see, you simply ask it to just find some insights and then go from there to ask it more specific questions. 

After the first analysis, we ask ChatGPT to give us some suggestions. 

We prompt it to answer in more detail about things that are most interesting to us or to give us examples of what it thinks would be best for our client. 

Some random prompts that have worked for us in the past:

  • Analyze website traffic data for the past month and identify any patterns in user behavior
  • Predict website traffic for the next month based on data from the past six months
  • Forecast sales for the next quarter based on historical sales data
  • Predict customer behavior for the next year based on historical customer data
  • Analyze customer reviews for our product and identify common themes and sentiment
  • Analyze feedback surveys and identify areas where customers are most dissatisfied
  • Analyze social media posts about our brand and identify common sentiment

Sometimes we ask it to write a report for us, by asking it to rewrite the answers in a paragraph format.

There are situations where we are completely unsatisfied with the generic answers ChatGPT gives. But if you keep prompting it to give more answers, more insights, analyse from a different angle, etc., you will find the answer you seek. Simple ask “Can you tell me more about this: “______” to get more detailed answers on the topic of your interest.”

💡 Top Tip: “A fun tricks I think not a lot of people use: You can ask ChatGPT to convert the data in a table format so it’s much easier to work with it!

You can later ask it to analyze particular columns or rows in that table or ask it to make a frequency table or a pivot table for you to work with.”

💡 Top Tip: “Another trick that often works well is to first assign a role to the ChatGPT, for example, tell it that it is a “Data Analyst working in an SEO agency” and then it will perform the analysis according to what it assumes an SEO agency would like to see the most.“

10 Ways to Use ChatGPT with Google Tag Manager

We’ve also decided to include one of our own on this list.

As you know, when it comes to analytics tools, Google Tag Manager has a special place in our hearts. 

Here are the top 10 ways you can use ChatGPT with Google Tag Manager:

  1. Ask Questions to ChatGPT
  2. Write Custom HTML Listener
  3. Fix a Bug in Custom HTML
  4. Create a CSS Selector
  5. Create a RegEx
  6. Create a Lookup Table Variable
  7. Create a Data Layer
  8. Change a Data Layer
  9. Write a Custom JavaScript Variable
  10. Decode Tracking Request

You can learn more about these use cases in our article on using ChatGPT with Google Tag Manager.

This AI tool can be of great help when it comes to answering questions, generating ideas, writing code, etc. So, give it a try!


How can ChatGPT help in writing RegEx patterns?

ChatGPT can assist in writing complex RegEx patterns. By providing clear and detailed prompts, it can generate the desired RegEx pattern or provide a pattern that is close to what you need. It also explains how the pattern is constructed, helping you improve your skills over time.

How can ChatGPT be utilized with Google Tag Manager and Looker Studio?

ChatGPT can help with tasks related to Google Tag Manager and Looker Studio, such as writing RegEx and custom JavaScript, formulating formulas in Looker Studio, and analyzing data. However, it is important to have a good understanding of these tools to effectively use ChatGPT’s generated results.

How can ChatGPT aid in data analysis for digital marketing?

ChatGPT can handle data analysis tasks by analyzing large amounts of data, such as website traffic, conversion rates, customer behavior, and sentiment analysis. It can provide insights, suggest ways to analyze data, and even generate reports based on specific requirements.


There you have it! Now you have a fair idea of how to use ChatGPT for your digital marketing business.

Using it can save you a lot of time and keep you away from the headache of doing everything manually.

🚨 Note: Although this tool is very smart, it is important to acknowledge its limitations when using it. One significant limitation to note is that while ChatGPT’s responses may sound convincing, their accuracy should always be verified.

AI can be helpful, but it’s also important not to rely on it entirely. That’s why you should always keep improving your skills.

AI is not going away! Only the people that don’t embrace it will.

To continue your learning path, we recommend these 10 ways to improve your digital marketing skills.

Have you tried some of the use cases discussed here before? Which is the first one you’ll try from this post? Let us know in the comments below!



Master Data & Analytics with MeasureMasters

Exclusive Courses & Workshops | Ongoing Troubleshooting | Support Resources, Tools & much more

Related Posts

Notify of
1 Comment
Newest Most Voted
Inline Feedbacks
View all comments
11 months ago

This is definitely one of those articles I’ll come back to a few times. Some really good ideas on how to use ChatGpt for marketing and technical marketing. Thx!

now it's time to

Start measuring like a master

Itching to jump into the world of MeasureMasters? This is what you have to look forward to.

Ready to take your digital marketing to the next level?

Subscribe to our newsletter and stay ahead with our latest tips and strategies.