Next Article in Journal
Research and Analysis of Traffic Intensity on a Street with High Traffic Load: Case Study of the City of Sofia
Previous Article in Journal
A Numerical Parametric Study of the Dynamic Factor in the Rope of a DC-Motor-Driven Hoisting Mechanism
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Proceeding Paper

Machine Learning-Powered Agents for Optimized Product Management in Performance Max Campaigns †

by
Veselka Petrova-Dimitrova
Department Computer Systems and Technologies, Faculty of Electronics and Automation, Technical University of Sofia Branch Plovdiv, 4000 Plovdiv, Bulgaria
Presented at the 14th International Scientific Conference TechSys 2025—Engineering, Technology and Systems, Plovdiv, Bulgaria, 15–17 May 2025.
Eng. Proc. 2025, 100(1), 36; https://doi.org/10.3390/engproc2025100036
Published: 11 July 2025

Abstract

Digital advertising is evolving rapidly with the integration of machine learning algorithms, increasingly used for real-time decisions and campaign optimization. This article presents the use of intelligent agents to enhance the effectiveness of Performance Max campaigns. Since campaign-level settings alone are insufficient for detailed product-level optimization, two machine learning-based agents were developed: one to detect anomalies in product performance, and another to reallocate products between campaigns based on performance. The first agent analyzes products’ daily metrics and triggers alerts for unusual deviations. The second agent autonomously moves products between campaigns based on their performance to maximize the results, as well as improve the performance in terms of visibility and return on investment of the moved products.

1. Introduction

The advent of artificial intelligence and machine learning in the field of digital marketing has significantly transformed the way companies reach their consumers. These new technologies provide opportunities for highly targeted and automated advertising processes, allowing for more precise planning and execution of campaigns [1,2,3]. One of the most innovative approaches in this area is the Performance Max campaign in the Google Ads platform, which utilizes algorithms for autonomous optimization and real-time decision-making. The effectiveness of such campaigns largely depends on the quality and structure of the data used to train the algorithms. In this context, it is especially important to distinguish between features inherent to the campaign itself and metrics derived from aggregating information from lower levels, such as individual products. While campaign-level features are related to static settings and configurations, aggregated product metrics are often influenced by dynamic factors and require careful analysis to avoid distorted conclusions.
The products that receive the highest visibility in search advertisements are those identified by the campaign’s algorithms as most likely to generate conversions and fulfill predefined objectives. This leads to a natural bias in favor of so-called best sellers, which tend to dominate both budget allocation and impression share. As a result, other products—typically those with limited historical performance data or temporarily lower competitiveness—are deprioritized by the algorithm and receive minimal or no exposure. This behavior aligns with the fundamental goal of Performance Max campaigns, which is optimization toward a single campaign-level objective, rather than evaluating the potential of each individual product. A potential solution to this challenge involves removing the underperforming products from the main campaign and placing them into a separate campaign. In doing so, the algorithm managing the new campaign can be trained on the performance data of those specific products, uninfluenced by the prior dominance of stronger performers. This approach not only provides equal opportunity for less visible products to gain exposure, but also allows for a more accurate assessment of their true potential. Simultaneously, the original campaign becomes more focused, as it is no longer burdened by products that consume resources without contributing to performance goals, resulting in more precise performance analytics. It is important to acknowledge that a product’s effectiveness may also be influenced by temporary external factors such as seasonality, promotional activities, stock availability, or competitive pricing.
Manually reviewing and analyzing each product within a Google Ads account would be a time-consuming and unsustainable task. This underscores the value of intelligent agents capable of automating anomaly detection, behavior-based product classification, and strategic decision-making for campaign structure optimization.
In this paper, we present two intelligent agents designed to optimize Google Ads Performance Max campaigns by applying machine learning at the product level. The first agent, built with an Isolation Forest algorithm, effectively detects performance anomalies in individual products by identifying statistical outliers based on key metrics such as ROAS, impressions, and spend. This allows advertisers to take immediate action by pausing underperforming products or investigating sudden performance drops. The second agent, implemented with a Random Forest algorithm, tracks and analyzes the performance of each product individually based on historical data, and automatically reallocates products between campaigns based on their effectiveness.

2. Structure of Intelligent Agents Workflow

In the context of Google Ads Performance Max campaigns, the identification and use of appropriate features is essential for the successful application of machine learning algorithms aimed at performance optimization [4,5]. A key aspect of this process is the distinction between campaign-level features and those product-level features derived from aggregated data at lower levels, such as the individual products within the campaign. Although these two types of features are part of the same model, their nature, method of extraction, and role in predictive computations differ significantly [6,7].
Campaign-level features are defined and fixed within the structure of the advertising campaign itself. They do not depend on the performance of individual products or their dynamic metrics, but rather on the configuration, settings, and overall scope of the campaign [4,8]. Examples of such features include daily budget, selected bidding strategy, number of included asset groups, audiences used, geographic targeting, seasonality, and others.
The set of lower-level metrics, such as product-level indicators, represents an aggregation of dynamic data that evolves over time and reflects the performance of individual products within a campaign [7,9,10]. This includes metrics such as the number of sales, the impact of a specific product on the campaign’s overall revenue, impression frequency, conversion rate, and others. It is important to emphasize that these metrics do not inherently exist at the campaign level—they are formed by aggregating individual product-level data. Consolidating this data requires preprocessing and presents additional challenges in terms of data quality and the objectivity of results [7].
Analyzing aggregated data for the products included in a given campaign can lead to misleading conclusions if certain factors are not taken into account. For example, when a campaign includes a product with a very high return on ad spend (ROAS) that dominates in volume, it can skew the overall campaign-level metric, even though the other products may not be performing as well. Another example is when a campaign includes 1000 products, but only 30% of them generate impressions, clicks, and sales. These are usually the best-performing products, which leads the Performance Max campaign to optimize toward them—either to generate the highest number of sales or the highest-value sales, depending on whether the campaign goal is set to Target ROAS or Maximize Conversions.
However, the strong performance of these products might be driven by external factors such as seasonality, temporary product popularity due to another marketing channel, promotional pricing, and more. The campaign cannot account for these external influences, as it only operates based on the data available within the Google Ads platform. This highlights the importance of distinguishing between campaign settings and performance and evaluating products individually, which may ultimately lead to improved overall campaign performance.
The proposed methodology enables extensive automation of advertising management through the deployment of intelligent agents [11,12]. In the context of this study on the optimization of Performance Max campaigns, two machine learning-based intelligent agents have been developed, each fulfilling a distinct role in the automation process and contributing to enhanced performance at the product level. These agents operate in a coordinated manner: the first is responsible for detecting and signaling performance issues, while the second autonomously implements corrective actions. This collaborative approach leads to improved campaign effectiveness and adaptability within real-world operational environments.
The overall framework describing the algorithm’s architecture and the agents’ workflow is presented in Figure 1:

3. Intelligent Agent for Product-Level Monitoring and Anomaly Detection

The objective of this intelligent agent is to monitor the behavior of all products included in a given Performance Max campaign on a daily basis, conducting detailed tracking of key metrics such as spend, sales, impressions, clicks, click-through rate (CTR), and return on ad spend. Based on accumulated data, this agent is trained to detect anomalies in product performance, such as a sudden decline in the effectiveness of previously top-performing products. When deviations are identified, the agent automatically generates alerts to notify the marketing team of a potential issue. Its purpose is to provide an early signal when product behavior changes, enabling timely intervention and preventing any negative impact on the overall campaign performance.
The intelligent agent employs a machine learning-based anomaly detection model using Isolation Forest—a non-conventional machine learning algorithm particularly suited for identifying rare and unusual values in multi-dimensional time series. Isolation Forest operates on the principle that anomalies are easier to isolate from normal observations because they differ sharply from most data points in the set [13,14]. The algorithm constructs multiple random binary trees (similar to decision trees), where at each level, a division is made based on a randomly chosen feature and thresholds. Historical data for all products included in the campaigns is used as input for training, with metrics such as impressions (x1), clicks (x2), spend (x3), conversions (x4), along with derived metrics such as click-through rate (x5) and return on ad spend (x6), being fed for each product.
The algorithm builds multiple random binary trees, where each tree splits the data using a randomly selected feature and a random split value. The core idea is to evaluate how quickly a given point can be isolated within the tree structure. In [14], for each observation, the so-called “anomaly score” is calculated (Equation (1)):
s(x,n) = 2−E(h(x))/c(n)
where h(x) represents the number of steps required to isolate observation x, E(h(x)) is the expected value of the isolation depth, n is the number of instances in the dataset, and c(n) is a normalizing constant (Equation (2)):
c(n) = 2H(n − 1) − 2(n − 1)/n
where H(i) is the i-th harmonic number. The expected value of the isolation depth E(h(x)) is calculated as the average of h(x) from the collection of isolation trees. This value is used to normalize the depth so that anomalies can be compared between different subsets of data. Based on the calculations for each observation, if the value s(x,n) exceeds a defined threshold, for example, 0.6, the corresponding behavior is marked as an anomaly. In the case of consecutive days with similar signals for a particular product, the agent classifies it as risky and alerts the team, thereby ensuring timely identification of problems that might otherwise go unnoticed.
The algorithm is trained in a completely unsupervised mode and can be retrained periodically, for example, on a weekly basis, to adapt to new data and reflect the current market conditions or seasonal changes. In this way, the agent provides a dynamic and adaptive performance monitoring system without the need for manual intervention or predefined rules.

4. Intelligent Agent for Product Reallocation Between Campaigns

The second intelligent learning agent is designed to improve the effectiveness of Performance Max campaigns in Google Ads by automatically managing the reassignment of products between different campaigns based on their performance. Its primary role is to analyze the daily behavior of each individual product and make decisions about transferring products to appropriate campaigns in order to maximize the overall contribution to conversions and return on investment. This is achieved by monitoring key metrics such as impressions, clicks, cost, sales revenue, return on ad spend, and click-through rate.
Random Forest Algorithm is used for the agent’s training. This algorithm creates a large number of decision trees, each trained on a different random subset of the training data. A random subset of input variables is used for each split in the tree. The collection of trees forms an ensemble, and for a new input product, classification is performed by majority voting [15,16].
Before training and forecasting, the agent extracts key metrics from Google Ads, as described above, for each product. It then applies normalization of the input features to standardize the scales of the different metrics. Min/Max Scaling is used as defined by Equation (3) [17]:
Xscaled = (X − Xmin)/(Xmax − Xmin)
This process is important because Random Forest performs better when all input variables are on comparable scales, especially when using heuristics like tree branching information. After normalization, the data is split into input variables and a target variable. The target variable represents the category to which each product should be assigned: 0—stays in the current campaign; 1—moved to a campaign for products with no impressions; 2—moved to a campaign for products with high costs and no conversions.
Immediately after the classification of all products, the agent applies the movement actions. For example, if the model determines that a product falls into category 1, it will be removed from the current campaign through an API request and included in the campaign for products with no visibility. The same procedure is applied for the other categories.
The model is automatically retrained once a week or when there is a significant change in the data (e.g., during a seasonal performance shift). The most recent 30 days of product history are used for training. Additionally, the agent calculates feature importance based on the average reduction in impurity (Gini importance) [18,19] in order to determine which features are most informative. This allows for better interpretability and further optimization of the model.

5. Implementation Environment and Experiments

The intelligent agents were developed and tested in a Python-based environment, using machine learning libraries scikit-learn for model implementation [20,21,22] and pandas [23] for processing comma-separated values (CSV) data. The CSV data is collected from the Google Ads API, which allows for the extraction of campaign performance data, including product-level metrics such as impressions, clicks, conversions, sales, and conversion value/cost. These CSV files are used by the intelligent agents for the training of the machine learning models.
All experiments were conducted on anonymized data from real-world Performance Max campaigns. Using the Google Ads API allows the agents to interact directly with the platform, extract necessary information, and optimize campaigns in real-time, thus automating processes that traditionally require manual management.
We conducted several experiments with each agent separately, using two independent Google Ads accounts, each containing different numbers of products with varying seasonality and price categories.

5.1. Experiments with the Monitoring and Anomaly Detection Agent (at the Product Level)

Two experiments were conducted to evaluate the effectiveness of Isolation Forest in detecting anomalies in product data within specific campaigns and how this impacted the overall ROAS value.
In the first experiment, we used historical performance data for products across several different Performance Max campaigns covering the past 30 days (Table 1). The data included metrics such as spend, sales, CTR, impressions, and ROAS at the product level.
Before utilizing the data, all metrics were standardized using min/max scaling to ensure equal treatment of different features during the training process. The agent was trained on a subset of this data and then applied to new data to identify products with atypical behavior, with the threshold for triggering alarms empirically set at 0.65. As a result of the experiment, the model successfully highlighted products with high costs but no sales, as well as products with a sudden drop in impressions, which would allow for timely action from the marketing team (Table 2).
In the second experiment, we used a different account with a variety of products. The agent was trained using data from the past two months. We configured the agent to operate in real-time, where it analyzes incoming data from the Google Ads API on a daily basis and flags potential anomalies based on the newly received values. The system was set up to send automated alerts when deviations above a certain threshold, based on the anomaly score calculated by the Isolation Forest algorithm, were detected.
During the two-week observation period, the agent processed over 4500 unique product ids. On average, it identified 5.1% of the products per day as potential anomalies (ranging from 3% to 7%), which were objectively linked to issues in cost efficiency or product visibility in search (Figure 2).
In response to the alerts and after a manual review, 27 underperforming products were paused.

5.2. Experiment with the Intelligent Agent for Product Redirection Between Campaigns

For the purposes of the experiment, we created two new campaigns to use for product reallocation. In the first campaign, products from the main campaign without impressions will be added. This campaign has a daily budget set by the client, and the strategy employed is Maximize Conversions. The second campaign will include products with poor performance, defined as those with low ROAS, as well as products with high spend and no conversions. The campaign settings include a very high Target ROAS and a low daily budget, as determined by the respective client.
The agent was trained using the same data from the past 30 days that was used in the anomaly detection agent. The agent was retrained weekly over a period of two months. Figure 3 shows the results of the product performance and the change in the total number of products across the three campaigns. It can be observed that, initially, the total number of products changes significantly, while in the later weeks, the total number remains almost unchanged. This indicates that over time, the main campaign is cleared of underperforming products, retaining only those with good performance. As a result, the training of the algorithm used in the campaign is not distorted by ineffective products.
Redirecting products to different campaigns also led to other positive outcomes. Products that were struggling with visibility in search increased their impressions, as they no longer competed with best sellers and now had a dedicated budget just for them. Products that had high spend significantly reduced their costs to a minimum, as the high Target ROAS set at the campaign level limited the cost per click and reduced the frequency of product impressions and clicks. Despite this, the overall ROAS achieved by the campaign improved.

6. Conclusions

This study demonstrates how intelligent agents can significantly enhance the performance of Google Ads Performance Max campaigns. By distinguishing between static campaign-level features and dynamic, aggregated product-level metrics, we enable more accurate and actionable insights. Two machine learning-based agents were developed: one for real-time anomaly detection using Isolation Forest, and another for product reallocation using a Random Forest classifier. These agents work autonomously to monitor performance, flag issues, and optimize campaign structure without manual input. Our experimental results using real Google Ads data across several campaigns demonstrate the practical benefits of these agents-improvements in ROAS, visibility, and cost-efficiency. The approach will support the advertisers in managing complex campaigns more efficiently and responding quickly to changes in product performance.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data presented in this study are available on request from the corresponding author due to privacy reasons.

Acknowledgments

The author would like to thank the Research and Development Sector at the Technical University of Sofia for the financial support.

Conflicts of Interest

The author declares no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
ROASReturn on ad spend
CTRClick-through rate
CSVComma-separated values

References

  1. Potwora, M.; Vdovichena, O.; Semchuk, D.; Lipych, L.; Saienko, V. The use of artificial intelligence in marketing strategies: Automation, personalization and forecasting. J. Manag. World 2024, 2, 41–49. [Google Scholar] [CrossRef]
  2. Valli Priyadharshini, K.; Avudaiappan, T. To optimize google ad campaign using data driven technique. In Proceedings of the International Conference on Data Science and Applications: ICDSA 2022, Kolkata, India, 26 March 2022; Springer: Singapore, 2023; Volume 1, pp. 535–552. [Google Scholar]
  3. Mookerjee, R.; Kumar, S.; Mookerjee, V.S. Optimizing performance-based internet advertisement campaigns. Oper. Res. 2017, 65, 38–54. [Google Scholar] [CrossRef]
  4. Google. Performance Max Campaigns. Available online: https://support.google.com/google-ads/answer/10724817 (accessed on 6 May 2025).
  5. Google. Google Ads API Documentation. Available online: https://developers.google.com/google-ads/api/docs (accessed on 6 May 2025).
  6. Géron, A. Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow: Concepts, Tools, and Techniques to Build Intelligent Systems; O’Reilly Media, Inc.: Sebastopol, CA, USA, 2022. [Google Scholar]
  7. Zheng, A.; Casari, A. Feature Engineering for Machine Learning: Principles and Techniques for Data Scientists; O’Reilly Media, Inc.: Sebastopol, CA, USA, 2018. [Google Scholar]
  8. Tonkin, S.; Whitmore, C.; Cutroni, J. Performance Marketing with Google Analytics: Strategies and Techniques for Maximizing Online ROI; John Wiley & Sons: Hoboken, NJ, USA, 2011. [Google Scholar]
  9. Saboune, F. AI-Driven Marketing Strategies: Unlocking Growth Potential and Operational Efficiency in the Digital Communication Landscape. In Proceedings of the 2024 International Conference on Intelligent Computing, Communication, Networking and Services (ICCNS), Dubrovnik, Croatia, 24–27 September 2024; pp. 295–301. [Google Scholar]
  10. Huang, S.; Aral, S.; Hu, Y.J.; Brynjolfsson, E. Social advertising effectiveness across products: A large-scale field experiment. Mark. Sci. 2020, 39, 1142–1165. [Google Scholar] [CrossRef]
  11. Ng, V.; Ho, M.K. An intelligent agent for web advertisements. Int. J. Found. Comput. Sci. 2002, 13, 531–554. [Google Scholar] [CrossRef]
  12. Chukurna, O.; Tardaskina, T.; Tereshko, Y.; Kholostenko, E.; Kofman, V.; Pankovets, L. Evaluation of the effectiveness of implementing artificial intelligence in the Google Advertising service. J. Inf. Technol. Manag. 2024, 16, 79–99. [Google Scholar]
  13. Lesouple, J.; Baudoin, C.; Spigai, M.; Tourneret, J.Y. Generalized isolation forest for anomaly detection. Pattern Recognit. Lett. 2021, 149, 109–119. [Google Scholar] [CrossRef]
  14. Liu, F.T.; Ting, K.M.; Zhou, Z.H. Isolation forest. In Proceedings of the 2008 Eighth IEEE International Conference on Data Mining, Pisa, Italy, 15–19 December 2008; pp. 413–422. [Google Scholar]
  15. Daho, M.E.H.; Settouti, N.; Lazouni, M.E.A.; Chikh, M.E.A. Weighted vote for trees aggregation in random forest. In Proceedings of the 2014 International Conference on Multimedia Computing and Systems (ICMCS), Marrakech, Morocco, 14–16 April 2014; pp. 438–443. [Google Scholar]
  16. Kim, A.; Myung, J.; Kim, H. Random forest ensemble using a weight-adjusted voting algorithm. J. Korean Data Inf. Sci. Soc. 2020, 31, 427–438. [Google Scholar] [CrossRef]
  17. Omar, A.; Abd El-Hafeez, T. Optimizing epileptic seizure recognition performance with feature scaling and dropout layers. Neural Comput. Appl. 2024, 36, 2835–2852. [Google Scholar] [CrossRef]
  18. Dunne, R.; Reguant, R.; Ramarao-Milne, P.; Szul, P.; Sng, L.M.; Lundberg, M.; Twine, N.A.; Bauer, D.C. Thresholding Gini variable importance with a single-trained random forest: An empirical Bayes approach. Comput. Struct. Biotechnol. J. 2023, 21, 4354–4360. [Google Scholar] [CrossRef] [PubMed]
  19. Joshi, T.; Lahorkar, A.; Tikhe, G.; Bhosale, H.; Sane, A.; Valadi, J.K. An improved ant colony optimization with correlation and Gini importance for feature selection. In Communication and Intelligent Systems: Proceedings of ICCIS 2020; Springer: Singapore, 2021; pp. 629–641. [Google Scholar]
  20. Isolation Forest—Scikit-Learn. Available online: https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.IsolationForest.html (accessed on 6 May 2025).
  21. Random Forest Classifier—Scikit-Learn. Available online: https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestClassifier.html (accessed on 6 May 2025).
  22. MinMaxScaler—Scikit-Learn. Available online: https://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.MinMaxScaler.html (accessed on 6 May 2025).
  23. Pandas Documentation. Available online: https://pandas.pydata.org/docs/index.html (accessed on 6 May 2025).
Figure 1. Structure of working flow for product allocation and anomaly detection.
Figure 1. Structure of working flow for product allocation and anomaly detection.
Engproc 100 00036 g001
Figure 2. The figure describes the results of potential anomalies in items detected by the agent for the period of two weeks.
Figure 2. The figure describes the results of potential anomalies in items detected by the agent for the period of two weeks.
Engproc 100 00036 g002
Figure 3. The table describes the results of the product performance and the change in the total number of products across the three campaigns, for the period of 8 weeks.
Figure 3. The table describes the results of the product performance and the change in the total number of products across the three campaigns, for the period of 8 weeks.
Engproc 100 00036 g003
Table 1. Dataset tables with products’ details extracted from Google Ads.
Table 1. Dataset tables with products’ details extracted from Google Ads.
Product IDCostConversion ValueCTRImpressionsClicksROAS
P00115000.04530001350
P002604800.0651500988
P003200500.0210,0002000.25
P0041009000.0850004009
P00512000.035400140
P006903500.0630001803.89
P00714014000.112,00012010
P0087000.05520001100
Table 2. The table describes the items with their anomaly status.
Table 2. The table describes the items with their anomaly status.
Product IDAnomalyAnomaly Score
P001Yes0.68
P002No0.22
P003Yes0.71
P004No0.19
P005Yes0.83
P006No0.24
P007No0.16
P008Yes0.66
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Petrova-Dimitrova, V. Machine Learning-Powered Agents for Optimized Product Management in Performance Max Campaigns. Eng. Proc. 2025, 100, 36. https://doi.org/10.3390/engproc2025100036

AMA Style

Petrova-Dimitrova V. Machine Learning-Powered Agents for Optimized Product Management in Performance Max Campaigns. Engineering Proceedings. 2025; 100(1):36. https://doi.org/10.3390/engproc2025100036

Chicago/Turabian Style

Petrova-Dimitrova, Veselka. 2025. "Machine Learning-Powered Agents for Optimized Product Management in Performance Max Campaigns" Engineering Proceedings 100, no. 1: 36. https://doi.org/10.3390/engproc2025100036

APA Style

Petrova-Dimitrova, V. (2025). Machine Learning-Powered Agents for Optimized Product Management in Performance Max Campaigns. Engineering Proceedings, 100(1), 36. https://doi.org/10.3390/engproc2025100036

Article Metrics

Back to TopTop