Facebook Demographics Reporting Script

Although we love data, pure raw data itself isn’t always the most exciting thing to look at. And if you’re not sure how to interpret it, you can miss valuable insights.

This script is for all keen social marketers looking to jazz up their demographics data reports. If you need to do some performance analysis for Facebook, here’s an age and gender reporting script that automatically formats your data into a ready-made pyramid graph.

What’s included?

How does the script work?

The tool works as a Google Sheets add-on and is incredibly easy to run. It pulls a demographics report for your Facebook campaigns for clicks, impressions, and spend, broken down by gender and age for the last seven days.

And here’s where the magic happens. With the click of a button, the add-on generates a pyramid graph showing campaign performance of a given metric for your audiences, segmented by age and gender. Spotting your best-performing demographic segment has never been easier.

Screenshot of script with pyramid graph

How do I use it?

Add the add-on linked below to get started!

Upon installation, you’ll need to authorize the add-on to run on your Google account, after which it will appear in the add-ons menu bar when you create a new spreadsheet. You’ll also need to authorize it to connect to Facebook, which you can do by opening the add-on’s sidebar.

Then, you need to fill in your Facebook account ID (you can get this by going to “Business Manager” > “Ad Account Settings” on Facebook) and click “Download” to pull the data into the spreadsheet.

The spreadsheet will load impression, click and spend data for your active campaigns for the last seven days, segmented by gender and age.

To make a pyramid graph, copy the name of one of your campaign names from column A and paste it in under the Pyramid Graph section of the sidebar. Pick the metric for which you would like to see the graph for (i.e., impressions, clicks, spend, CTR or CPC) and click “Create.”

Your pyramid graph will appear, shiny and ready for use! Just right-click and save the image to your computer if you want to keep it, and repeat for all your other campaigns.

The Facebook Demographics Reporting Script