You can work with Ad Targeting within Meta Researcher Platform. The getting started procedure documented here is specific to the Researcher Platform that runs a modified version of Jupyter and provides you with a virtual data cleanroom where you can securely search for and analyze data. To get up and running with Ad Targeting in Researcher Platform:
After January 7, 2025, access to Ad Targeting in Researcher Platform will require Amazon WorkSpaces Secure Browser. See WorkSpaces Secure Browser in the Researcher Platform documentation for instructions. You will not lose any data in this transition. With WorkSpaces Secure Browser, you do not need a VPN to access Researcher Platform. The Get started in Researcher Platform section on this page provides the URL so you can try it.
Until January 7, 2025, you can access Ad Targeting through a Virtual Private Network (VPN). This section shows you how to install and configure the OpenVPN client and connect to our VPN server. Once connected, you will be able to access Ad Targeting.
When the setup wizard completes, OpenVPN Connect launches and you are required to accept the OpenVPN Inc. Data Collection, Use and Retention policy to continue.
In the Import Profile window, select the UPLOAD FILE tab.
Clicking this link downloads the OpenVPN configuration file (fortVpnCredentials.ovpn) to your computer (check your downloads folder). Once downloaded, drag and drop the file into the Import Profile window.
In the Imported Profile window, click CONNECT.
Once successfully connected, you will see this window:
Continue with the next steps below to access the Researcher Platform. Note that while you are connected to our VPN server, all of your internet traffic is routed through it, so be sure to disconnect from the VPN server when you are finished.
While connected to our VPN, visit the Researcher Platform.
You can also use the latest Amazon WorkSpaces Secure Browser version of Researcher Platform without being connected to the VPN.
Log into the site by using your Facebook credentials. This will spin up a Jupyter Notebook server instance for your use.
You can access Researcher Platform user documentation here.
Click the New dropdown menu and select either Python3 or R. This will create a new Jupyter Notebook in a new browser tab. Rename the Notebook if you wish.
Import our query module (execute
) by clicking in an empty notebook cell and entering the following code:
library(fbrir)
Run the code by clicking <. Initially you will not see anything happen. A new notebook cell appears when it finishes importing the query.
Enter the following code in the empty notebook cell to define a SQL query (sql
) using variable substitution (database
and table
), and use the query module to execute the query:
library(fbrir)
athena = AthenaFacade$new()
database <- "fbri_prod_atp"
table <- "ad_targeting_dataset_siep_aug_2020"
api_table <- "ad_archive_api"
# Define your own SQL query and assign to variable 'sql'
sql <- sprintf("SELECT * FROM %s.%s LIMIT 5", database, table)
athena$QueryAthena(sql)
Run the code. This should return a dataframe of your results, similar to those shown below (screenshots of dataframe results blurred intentionally).
The dataframe result from the R example would look similar to this (blurred intentionally):
The dataframe result from the Python example would look similar to this (blurred intentionally):
You can scroll within the dataframe to see additional table columns.
Performing the query above verifies that you are able to perform a basic search by using our web application. We recommend that you now read a few sample queries to get an idea of how to build your own custom queries.