In this post I am going to go through the code for a relatively simple R Shiny app. It will predict Google Ads transactions and CPA (cost per acquisition). This will be for three months plus the current month. I will add a graph and a table of values, as well as four sliders. These are to adjust spend for the current month and the following three months. You’ll have to experiment with the app to get it to run the way you would like.

## How to Use R to Identify Poor Performing Google Ads

It can be a challenge to identify poor performing Google Ads. R can help by using statistics to find ads that should be replaced.

## Replacing Excel With R

Excel is great for spreadsheet use. R is great for data analysis, reporting, data visualization and modeling. I can remember taking accounting in college, when I was not aware of Excel (it was a long time ago). We used sheets of paper that we had to adjust manually (erasers were invaluable). Some of the figures were adjusted so many times, that the paper would wear through.

## Correlation Between Data Attributes

If we want to understand the correlation between data attributes, we have to understand is if they covary. That means that when one variable moves from its mean, we would expect that a related variables would change in a similar way.

## One-Way ANOVA For Email List Segmentation

A one-way ANOVA is used to test a null hypothesis by comparing three or more sample groups from a population (a t-test is generally used if comparing two sample groups). To use this method, we take a random, equal sample from each group. Then we examine the mean and variance between samples.