Introduction
AdLab is an application built for analysing competitor ads and generating new ads using said competitor ads and GPT4o. The application allows users to input keywords and generate ads based on the keywords and competitor ads.
Main Features
You will find the following features in the application:
Feature | Description |
---|
Dashboard | A central place to view keywords used in your campaigns, and gain quick access to the other features. |
Analytics | Detailed insights and analytics on competitor ad campaigns, with beautiful visualisations and drill down views. |
Generate | Create new ads using keywords and competitor ads with the help of GPT4o. |
Recent Ads | A list of the most recently created ads for quick access and review. You can click on the ad to view the full details of the ad. |
Dashboard Functionalities
The dashboard is the central hub of the application where you can manage and monitor your ad campaigns. Here are the key functionalities:
- Keyword Overview: View a summary of the keywords you are targeting in your campaigns.
- Quick Access: Easily navigate to other features like Analytics, Ad Generation, and Recently Generated Ads from the dashboard.
By clicking on the keywords option, you will see a text input field and a dropdown. The dropdown allows you to select a sub-account in RMIT Google Ads Master account. Type in a campaign name, select a sub-account and click 'Fetch'. The app will fetch the keywords from the campaign and display them below the field. This will take upto 30 seconds unfortunately as the Google Ads API performs an authorisation check for every request. If you do not see any keywords, do not worry, click fetch again and you will see the keywords appear.
Analytics Functionalities
The analytics section provides detailed insights into competitor ad campaigns. Do note that there may be instances where Google does not return any ads for a keyword, in which case, you may not see much information. Keep an eye on the Keyword Actions page to track which keywords returned ads during the previous scrape job. Anyway, here are the key functionalities:
- Competitor Analytics: Enter a keyword and a timeframe to view visualizations (and print the analysis as well). This includes:
- A bar chart showing ads from the top 5 competitors.
- Two radar charts showing word frequencies in titles and descriptions (with the data in the radar chart being tabulated just below the charts)
- Top Ads: Scroll down to view some of the top ads from competitors for the given keyword and timeframe.
- Navigation: Navigate to Competitor Analytics directly via the dashboard quick link or use the navbar on top to access Competitor Analytics or Live Ad Analytics.
Generate Ads Functionality
The Generate Ads section allows you to create new ads using keywords and competitor ads with the help of GPT4o. Here are the key functionalities:
- Keyword Input: Enter a keyword to start generating ads. The app will analyze competitor ads based on the keyword.
- Ad Quality Levels: The generated ads will be categorized into three quality levels:
- Best: High-quality ads that are most likely to perform well.
- Good: Average-quality ads that may perform decently.
- Low: Low-quality ads that are less likely to perform well.
- Competitor Ads Reference: The app will provide a list of all the competitor ads it referred to while generating the new ads. If you are satisfied with the generated ads, you can save it by clicking the 'Approve' button.
- GPT Analysis: Read GPT's analysis of the competitor ads and understand why the generated ads might be better. This includes:
- An explanation of the strengths and weaknesses of the competitor ads.
- Insights into how the generated ads address the weaknesses and leverage the strengths.
Profile Settings
The profile settings page allows you to update your profile information, including your preferred username and password. If you would like to change your email, contact an admin.
Admin Settings
Admin settings allow you to manage user roles and permissions as well as add or remove users. To add a new user, you must enter their email which will generate an invite link. Click on the link to copy it and share it with the user. The user can then click on the link to create an account and access the platform. Similarly, enter the user's email to remove them from the platform, make them an admin, or revoke their admin status.
Only admins can access the admin settings page. If you are not an admin, you will not see the admin settings option in the navbar on top. Manually changing the URL to '/admin' will not work either. If you are not an admin, you will be redirected to the dashboard. If you do want to make changes to user access, please contact a user who has admin access.
Developer Documentation
The application is built using Next.js, Tailwind CSS, ShadCN UI, and NextUI. Here are some key points to keep in mind:
- The application is fully serverless, there are 6 lambda functions that power this application.
- The code you see in the repo may not be the deployed version. Please pull the docker image from the comp-ads and google-ads repositories.
- Please use the google-ads docker image to replicate/build upon functionalities that involve the Google Ads API. The REST interface is not very intuitive and require a lot of authentication logic.
Architecture
Refer to the final report for the details of how this works. For the actual working lambda code, please pull the container image from the comp-ads repository in ECR.
Vector Retrieval
Vector retrieval is a process used to find similar items in a dataset by comparing their vector representations. In the context of this application, embeddings generated by the OpenAI API are used to represent competitor ads' titles as vectors. These vectors are then compared using similarity measures (cosine similarity) to find ads that are most similar to the input keywords. This allows the application to provide relevant competitor ads and generate new ads based on the most similar existing ads.
Postgres and PGVector
Postgres is a powerful, open-source relational database that is used to store and manage the application's data. PGVector is an extension for Postgres that adds support for vector data types and similarity search. By using PGVector, the application can efficiently store and query vector embeddings generated by the OpenAI API. This enables fast and accurate vector-based search, allowing the application to quickly find and retrieve relevant competitor ads based on their vector representations.
Resources
💿 Database
🧑🏻💻 Front-End
🧑🏻💻 Back-End
🧐 Evaluation