Marketing
Written Tutorial

Turn Data Into Strategies With ChatGPT’s Code Interpreter

Marketers continuously require strategies that offer agility, accuracy, and a deeper understanding of data. As marketers, staying updated with the latest technological advancements can be the key differentiator in a competitive marketplace. This workshop is tailored to introduce marketers to the world of artificial intelligence through ChatGPT's Code Interpreter.

Overview and Audience

Marketers continuously require strategies that offer agility, accuracy, and a deeper understanding of data. As marketers, staying updated with the latest technological advancements can be the key differentiator in a competitive marketplace. This workshop is tailored to introduce marketers to the world of artificial intelligence through ChatGPT's Code Interpreter.

This workshop is for:

  • Digital marketing professionals looking to integrate AI tools into their strategies.
  • Marketing analysts aiming to optimize data interpretation and decision-making processes.
  • Marketing technology enthusiasts curious about the latest trends and applications of AI in the marketing domain.

Objective

At the end of this workshop you will be able to do the following:

  • Utilize ChatGPT's Code Interpreter: Understand the foundational concepts of ChatGPT's Code Interpreter and how it can be effectively integrated into marketing workflows for better data interpretation and strategy formulation.
  • Enhance Web Traffic Data Analysis with AI: Leverage the combined power of ChatGPT and Google Analytics to derive deeper insights from web traffic data, recognize patterns, and make informed decisions.
  • Innovate Marketing Strategies with AI: Incorporate AI-driven insights into campaign design, content creation, and audience engagement strategies, leading to improved efficiency and ROI.

About the AI tools

Code Interpreter is a tool aimed at

  • Understanding user queries in plain language to translate them into executable code, making custom data analysis accessible even to those with limited coding knowledge.
  • Assisting with the analysis of vast datasets, drawing insights, and making data-driven decisions without the need for extensive coding skills.
  • Automating repetitive tasks and providing quick solutions to coding challenges, helping users save time and increases their overall productivity.

Google Analytics is a tool aimed at

  • Empowering businesses to make informed decisions, optimize their online presence, and achieve better ROI from their marketing efforts.
  • Monitoring and reporting on the number of visitors to a site, their sources (e.g., organic search, paid ads, social media), and the duration and quality of their visits.
  • Providing in-depth data on how users interact with a website, such as the pages they visit, the content they engage with, and the paths they take within the site.

Prerequisites

Before the workshop starts you’ll need to do the following:

  • ChatGPT Plus Account
  • Login or Signup for a ChatGPT Plus Account: https://chat.openai.com
  • Enable Code Interpreter
  • With a ChatGPT Plus account, you are able to enable the Code Interpreter by clicking on your email address in the bottom left part of the screen then clicking Settings & Beta > Beta features > Code interpreter.
  • Download the tutorial resources folder.

Agenda

Part 1: Getting Started with Code Interpreter - 20 minutes

Step 1: Login or Signup for ChatGPT Plus

To start using ChatGPT Code Interpreter, you'll need to subscribe to ChatGPT Plus. ChatGPT is free to use, but the Code Interpreter is only available to subscribers.

  • Visit https://chat.openai.com. Login if you have an account, or Sign Up if you are a new user.
  • If you haven’t already, the upgrade option is found in the bottom left part of the screen once you are logged in to ChatGPT.



Step 2: Enable Code Interpreter
  • By default, Code Interpreter is not enabled. If you haven’t already, click on your email address in the bottom left and navigate to Settings & Beta > Beta features and make sure Code Interpreter is activated.
  • When you start a new conversation, you have to choose the version of ChatGPT you’d like to have a conversation with. On the top of the screen, select “GPT-4”. When you hover over the button, select “Code Interpreter”. You are now ready to chat with ChatGPT with the Code Interpreter activated.
Step 3: Experience the Code Interpreter with basic math

The Code Interpreter can do many things including uploading and analyzing files, generating sample data, plotting data, and deriving insights from text files. However, it can do simple things as well, like perform simple math problems. 

  • To get a feel for how the Code Interpreter works, we can ask it to solve the following
  • problem: “What is the square root of 73?”.

You can see the Code Interpreter wrote a piece of code in Python, executed it, and delivered the answer. ChatGPT itself is not a calculator, it only understands natural language. However, the Code Interpreter can understand a math problem, write code to solve it, and deliver the answer like a calculator.

Step 4: Upload a text file (PDF)

Upload the PDF from the resources file by clicking on the “plus” button on the left side of the chat interface. A file picker will pop up where you can choose the appropriate file.

The PDF file is now ready to be processed, read, and analyzed.


Step 5: Interacting with the contents of a file

Now that the PDF is uploaded, we can do a number of things to it.

  • Summarize the PDF. Prompt: “Summarize the contents of the PDF”
  • Split the PDF into multiple single page PDFs. Prompt:  “Split the PDF into multiple single PDF files”
  • Extract all of the images from the PDF. Prompt: “Extract all of the images from the PDF”

Step 6: Upload a data file (csv)

Use the CSV file from the resources folder and upload it using the same approach as the PDF. If we use the following prompt when uploading the data, the Code Interpreter will begin the analysis. Prompt: “Show me the first few rows of this file”

The Code interpreter loads the csv file, and identifies the metadata at the top of the file. It iterates on the code until it successfully finds the first few rows of the actual data in the file.

Step 7: Summarizing data from a csv file

The Code Interpreter can use natural language and its coding and reasoning ability to explore this data. Using the following prompt, we’ll learn a lot about this data.

Prompt: “Summarize this data and provide key insights”

Step 8: Export results to a file

The Code Interpreter can save results to a csv file as well. With the following prompt, you can save a summary of the data. 

Prompt: “Save the summary of this data to a csv file”

Part 2: Generating Valuable Insights from Google Analytics using Code Interpreter - 20 minutes


You are a digital marketer tasked with optimizing engagement across all of your company’s website landing pages. You have access to Google Analytics and are looking to extract actionable insights from the data to help increase traffic to the correct pages.


Step 1: You decide to explore Landing Page data from Google Analytics. You’re not sure what insights can be extracted, but you can use Code Interpreter to explore it.

If you don’t have access to a Google Analytics site, you can use the sample file in the Resources folder. The title of the file is “LandingPageSampleData.csv”.

  • Upload the sample file to Code interpreter with the following prompt: 
  • Prompt: “Upload and clean the traffic data from Google Analytics. Separate metadata from actionable data and show me the main data in a table”
  • The Code Interpreter will iterate through a process to accomplish this task.

The Landing page data is now available to the Code Interpreter to work with. Let’s explore the data and extract some actionable insights.

Step 2: Tell ChatGPT your objective, and ask for 5 insights from the data that will help you accomplish your goal.
  • Now that ChatGPT has your data, let’s tell it what you want to do, and ask it to help you get started. Use the following prompt:
  • Prompt: “I am responsible for optimizing engagement across all pages of this website. Extract 5 actionable insights that I can use to get started”
  • First ChatGPT will tell you what it plans to do. Review these thoughts and make sure they all make sense.
  • ChatGPT should then provide you with 5 actionable insights. What do you think? Does it match the data that you uploaded and your experience with digital marketing and website optimization?
Step 3: Based on the open-ended “actionable insights”, come up with a specific question or direction.
  • Did you notice an anomaly in the data or something to correct? In the example data provided, there are no conversions. The website that produced this data does not have conversion information. Use the following prompt to tell this to ChatGPT and repeat the task.
  • Prompt: “This website does not track conversions. Come up with 5 more actionable insights that do not include conversion data.”
  • Review the new results. Here is the new analysis:
  • These insights are becoming more useful, but you will still notice that the Google Analytics data includes pages that are not related to user-facing content. For example, the /db/phpmyadmin3 page is a database page related to Wordpress hosting. Let’s remove these pages from the analysis:
  • Prompt: “Repeat this analysis without website pages that are not user-facing. Pages like /dbadmin, /db/phpmyadmin3 are specific to Wordpress. Only use pages related to content marketing and pages that deliver value to users.”
  • The results from the above continue to improve. However, there may still be some filtering needed to extract useful insights. You can continue to refine the prompts and instructions to target relevant pages.
  • Can you identify any insights you can act on? For example, it provided the following insights that can be acted on!:
  • The main landing page / and /pricing have significant traffic but their engagement times are below the site's average. Reassessing these pages' content, design, or layout can help improve user engagement.
  • Pages like /thank-you-from-automata-payg and /2023/05/01/how-to-find-your-rss-feed have high repeat visit ratios, indicating that users are coming back to these pages. Understanding why can provide insights into what's working well in terms of content or user experience.

Step 4: Visualize this data in a plot.
  • Ask ChatGPT if there is a way to visualize this data.
  • Prompt: “Plot the number of sessions vs average engagement time per session. Only include customer-facing pages. Do not include pages with less than 10 sessions.”
  • In this case, we see a plot that looks like this:

Step 5: Modify the plot

  • Change the color marker color/shape/size, Y-axis label, and Title.
  • Prompt: “Redraw this plot with the following adjustments. Change the markers to red circles, the y-axis to “Avg. Engagement Time/Session (s)”, and the Title to “Sessions vs. Engagement (>10 Sessions), and make the markers bigger.””

Step 6: Save the plot to a few different file types and save the data to a csv
  • Save the plot to a png, jpg, and svg.
  • Prompt: “Save the plot to three different file types. A png, jpg, and svg.”
  • Prompt: “Save the associated data to a csv file”

About this tutorial

Marketers continuously require strategies that offer agility, accuracy, and a deeper understanding of data. As marketers, staying updated with the latest technological advancements can be the key differentiator in a competitive marketplace. This workshop is tailored to introduce marketers to the world of artificial intelligence through ChatGPT's Code Interpreter.

Speaker

No items found.

More tutorials

Design
Video Tutorial

From Inspiration to Production: A Midjourney and Figma Workflow

Learn how to transition from Midjourney to Figma in your design workflow and discover how AI tools can enhance your design process.

Amir

Bahadori

Founder & Owner

Confetti Labs

Design
Video Demo

Beyond the Basics: Intermediate to Advanced Techniques for AI Image Generation

Game creator delves into AI generative art via Midjourney, highlighting style variations & chaos. Discover architectural & anime art, pattern techniques, and model mastery.

Daryl

Anselmo

Art Director/Visual Artist

New Media & Games

Design
Video Demo

From Prompt to Figma, to Live Website, How to Use Generative AI to Transform Your Ideas Into a Working Full-Stack App in Minutes

No-code platform integrates with Figma, allowing creation of responsive websites and apps without coding. AI-driven system simplifies development process.

Adam

Ginsburg

Founder

Buzzy

Dev
Video Tutorial

How to Perform Automatic, No/Low Code Testing for Your Machine Learning Model Using IBM AutoAI

Ex-e-commerce/marketing pro turned IBM data scientist shares Auto AI: no/low-code ML solution for efficient model creation & insights.

Krysten

Thompson

Data Scientist

IBM

Dev
Video Tutorial

Implementing Video Understanding and Multimodal Video Search Into Your Application With a Few API Calls

12 Labs simplifies video understanding with APIs, leveraging VLM for embeddings and search. Challenges include computational intensity.

Ankit

Khare

Lead Advocate for Developer Experience

Twelve Labs

Interested in promoting your Al tool or implement Al in your company?