Description Usage Arguments Value Examples
Reports statistics for breakdown groups (e.g., Age) and Campaign / Ad Set / Ad (depending on file's grouping) across advertisements from Facebook Ads Manager exported data. Displays the best and worst performing breakdown groups with a ranking as well as the sum total of a specified event (e.g., 'Website Registrations Completed'). Can also distplay a bar graph showing the cost per specified event for the best breakdown groups along with a summary table comparing those best performers to the data as a whole.
1 2 3 | FBadGstats(filerd = "", choosedir = "NO", sumvar = "",
filtervar = "", filtervarneg = "", spentlim = 0, minevent = 0,
printrow = 20, tblout = "BOTH", grphout = TRUE, ctrstats = "NO")
|
filerd |
Filename to read. Must be a CSV file. |
choosedir |
[Windows-Only] If 'YES', prompts the user for a directory / folder in which all CSV files will be processed by FBadGstats. |
sumvar |
Variable of focus for analysis. Can provide just a few letters as long as they do not match another column in the data. For example, could use 'REG' for 'Website Registrations Completed' (case-insensitive). Defaults to 'Link Clicks'. |
filtervar |
Limits the analyzed data to only those of a primary group (the first column that appears in Ads Manager like Campaign Name or Ad Set Name) matching the provided string of characters (case-insensitive). |
filtervarneg |
Same as filtervar but negates (excludes) the value. |
spentlim |
Minimum amount spent in a breakdown group (e.g., DMA Region) in order to appear in the output. |
minevent |
Minimum number of 'events' (e.g., Link Clicks) that must have occurred in order for a breakdown group to appear in the output. |
printrow |
Number of breakdown groups that will appear in the output, both the best and worst will appear separately. Default = 20. |
tblout |
Show the best, worst, or both in the output? Valid values are: BEST , WORST , BOTH |
grphout |
Show the bar graph and summary table of price / event (e.g., Link Clicks) for the best performers vs. all of data? Valid values are: YES or NO |
ctrstats |
If yes, prints statistics for clickthrough rate if available in data (CTR) - defaults to NO. Valid values are : YES, NO. Prioritizes CTR..LINK.CLICK.THROUGH.RATE. |
Best or worst performing subgroups depending on 'tblout' parameter. Also a graph with a complementary table for the best performers if grphout parameter is YES.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Not run:
# to present a window in which one navigates to the desired CSV file,
# outputs LINK CLICKS summary
# (Performance and Clicks view suggested in Facebook Ads Manager)
FBadGstats()
# similar but one selects a folder and all of the CSV files are processed,
# and the summarized performance measure is WEBSITE.LEADS.
FBadGstats(choosedir = TRUE, sumvar = "WEBSITE.LEADS")
# examine the best and worst performing Direct Marketing Areas (DMA) with
# respect to the results column containing 'REG' (case-insenstive,
# so this exampled matched 'Website.Registrations.Completed')
FBadGstats(filerd='example_DMA.csv', sumvar='REG')
# see more examples with:
vignette(package = "FBadstats")
FBadGstats('example_DMA.csv', sumvar = "CLICKS", filtervar = 'Book',
spentlim = 10, minevent = 2, printrow = 3, tblout = "WORST",
graphout = "NO", ctrstats = "NO")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.