From 2362737710ca18b0d590f3ec52a2a3e4dc02e824 Mon Sep 17 00:00:00 2001 From: clara-rthrdt Date: Fri, 1 Aug 2025 10:26:26 +0200 Subject: [PATCH 1/9] add contributors --- docs/docs/06_contribute/06_02_community.mdx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/docs/06_contribute/06_02_community.mdx b/docs/docs/06_contribute/06_02_community.mdx index 708dd1b..5d6eafb 100644 --- a/docs/docs/06_contribute/06_02_community.mdx +++ b/docs/docs/06_contribute/06_02_community.mdx @@ -99,6 +99,16 @@ The Data Knowledge Hub for researching online discourse is a community effort. W mastodon="https://masto.ai/@correlaid" /> + + + + Date: Fri, 1 Aug 2025 10:28:07 +0200 Subject: [PATCH 2/9] add contributor --- docs/docs/06_contribute/06_02_community.mdx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/docs/06_contribute/06_02_community.mdx b/docs/docs/06_contribute/06_02_community.mdx index 5d6eafb..58b37fa 100644 --- a/docs/docs/06_contribute/06_02_community.mdx +++ b/docs/docs/06_contribute/06_02_community.mdx @@ -136,6 +136,15 @@ The Data Knowledge Hub for researching online discourse is a community effort. W website="https://www.unibw.de/jasmin.riedl" /> + + Date: Fri, 1 Aug 2025 10:31:23 +0200 Subject: [PATCH 3/9] index 1 --- docs/docs/01_get-started/index.mdx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/docs/01_get-started/index.mdx b/docs/docs/01_get-started/index.mdx index 54e6f78..68ffa89 100644 --- a/docs/docs/01_get-started/index.mdx +++ b/docs/docs/01_get-started/index.mdx @@ -19,6 +19,13 @@ sidebar_position: 0 To help you get started and better navigate the research landscape of social media monitoring (SMM) and researching online discourse more broadly, we’ve collected a first set of chapters that aim to provide orientation and guidance to researchers and practitioners exploring various options and dimensions of independently researching social media. We welcome additional content and have added a selection of chapters below that would make for great contributions. +
+ Overview: Tools for working with digital trace data + + The purpose of this entry is to provide an overview of tools that can be used across the research data cycle when working with digital trace data: From data collection to preprocessing, analysis and visualization, reporting, and archiving and sharing data. + + **[Learn more](01_01_overview)** +
Ethical considerations From 18fb88b6cacb8f7a093d9b2c9875ba317c883f4f Mon Sep 17 00:00:00 2001 From: clara-rthrdt Date: Fri, 1 Aug 2025 10:36:20 +0200 Subject: [PATCH 4/9] update index 3 --- docs/docs/03_data-collection/index.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/docs/03_data-collection/index.mdx b/docs/docs/03_data-collection/index.mdx index 71294dd..9be7ec7 100644 --- a/docs/docs/03_data-collection/index.mdx +++ b/docs/docs/03_data-collection/index.mdx @@ -16,7 +16,7 @@ sidebar_position: 0 # Data collection methods - + Data collection on social media and digital platforms comes with a range of specificities and nuances that, unfortunately, differ across each platform. To facilitate research and give you an idea of what’s possible on which platform, this section outlines data collection approaches and introduces examples for TikTok, X (Twitter), and blogs (including code). Additional examples or contributions to data collections methods are welcome, suggestions are listed under (4) call for contributions. @@ -39,9 +39,9 @@ Data collection on social media and digital platforms comes with a range of spec
Platform-specific guidelines, e.g. X API, Streaming data - X (Twitter) with its vast user base and real-time data, has always been a fertile ground for researchers and developers alike. This chapter provides a comprehensive guide to making the most out of the API, with specific attention to a newly developed Python library, underscoring its flexibility and scalability. + This chapter outlines platform-specific guidelines for data collection across X (Twitter), YouTube, Rumble, and Meta Ads on Facebook and Instagram. Each guideline includes step-by-step tutorials with code samples and an introduction to potential analysis methods. - **[Learn more](03_00_code-samples/twitter/streaming-database)** + **[Learn more](03_00_platform-specific guidelines)**
@@ -55,6 +55,6 @@ Data collection on social media and digital platforms comes with a range of spec :::contribute Open for contributions -Contributions are welcome, particularly case studies on Facebook, Instagram, YouTube and other platforms as well as additional data collection tactics and methods. +Contributions are welcome, particularly on additional data collection tactics and methods. ::: \ No newline at end of file From 4f97f4a7fd6d6b0747c8c83135ceab168ffa1c60 Mon Sep 17 00:00:00 2001 From: clara-rthrdt Date: Fri, 1 Aug 2025 10:39:40 +0200 Subject: [PATCH 5/9] update index 4 --- docs/docs/04_data-analysis/index.mdx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/docs/04_data-analysis/index.mdx b/docs/docs/04_data-analysis/index.mdx index 4a544ff..28fc492 100644 --- a/docs/docs/04_data-analysis/index.mdx +++ b/docs/docs/04_data-analysis/index.mdx @@ -17,7 +17,7 @@ sidebar_position: 0 # Data analysis projects - + To help you get started and inspired with social media analyses, we’ve collected a first set of practical projects that provide a starting point. There are a myrdiad of projects and methods discussion around social media data. Therefore, we welcome additional content and have added a selection of chapters below that would make for great contributions. @@ -53,6 +53,14 @@ To help you get started and inspired with social media analyses, we’ve collect **[Learn more](04_04_disarm-framework)**
+
+ Analyzing Ad Targeting Insights: An Introduction to the metatargetr R Package + + The metatargetr R package offers an alternative, unofficial route to this information, by retrieving and archiving ad data directly from Meta’s public-facing Ad Library. This tutorial focuses on how to use metatargetr to retrieve and, most importantly, analyze this targeting data. + + **[Learn more](04_05_metatargetr)** +
+ :::contribute Open for contributions We welcome contributions on a rolling basis. Have you done an analysis or a research project you want to share? Do you want to contribute a primer for a specific method? Get in touch with us at [upgrade.democracy@bertelsmann-stiftung.de](mailto:upgrade.democracy@bertelsmann-stiftung.de) From 3d01b651b75f0466c9fa87fd1c2ca29c8d8904a7 Mon Sep 17 00:00:00 2001 From: clara-rthrdt Date: Fri, 1 Aug 2025 10:56:09 +0200 Subject: [PATCH 6/9] add toolkit --- docs/docs/05_literature/05_03_articles-and-research.mdx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/docs/05_literature/05_03_articles-and-research.mdx b/docs/docs/05_literature/05_03_articles-and-research.mdx index 2e53431..98039c6 100644 --- a/docs/docs/05_literature/05_03_articles-and-research.mdx +++ b/docs/docs/05_literature/05_03_articles-and-research.mdx @@ -5,12 +5,19 @@ title: Community articles and research # Community articles and research - + Social media research is a rapidly changing field. In this chapter you can find the latest research reports, tools, policy papers and articles from our community. _Please note: Despite careful review of the content, the Data Knowledge Hub accepts no liability for the content of external links. The providers of the web pages to which the links lead are solely responsible for their contents._ + + Date: Fri, 1 Aug 2025 11:06:30 +0200 Subject: [PATCH 7/9] small adjustments --- .../03_04_data-collection_meta_ads.mdx | 28 +++++++------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/docs/docs/03_data-collection/03_00_platform-specific guidelines/03_04_data-collection_meta_ads.mdx b/docs/docs/03_data-collection/03_00_platform-specific guidelines/03_04_data-collection_meta_ads.mdx index 3175807..c23d57a 100644 --- a/docs/docs/03_data-collection/03_00_platform-specific guidelines/03_04_data-collection_meta_ads.mdx +++ b/docs/docs/03_data-collection/03_00_platform-specific guidelines/03_04_data-collection_meta_ads.mdx @@ -31,7 +31,9 @@ includes metadata such as the ad’s text, the advertiser’s page, the time period it ran, the amount spent (as a range), impressions delivered (also as a range), and breakdowns of the audience by age, gender, and region. Importantly, many metrics are given as ranges (min–max) rather -than precise values. This tutorial will demonstrate how to use R (with +than precise values. + +This tutorial will demonstrate how to use R (with the `tidyverse` ecosystem) and the `Radlibrary` R package to access the Meta Ad Library via its official API. We will walk through obtaining API access, constructing queries to find ads (by keyword or page id), @@ -69,17 +71,10 @@ API. Meta requires a few one-time setup steps: confidential and treat it like a password – anyone with this token could potentially query the API on your behalf until it expires. -> Token expiration: By default, tokens from the Explorer are -> [short-lived](https://developers.facebook.com/docs/facebook-login/guides/access-tokens#termtokens) -> (usually ~1-2 hours). For short analysis sessions that might be -> sufficient, but in most cases you will likely need longer access. You -> can exchange the short-lived token for a 60-day token using your App’s -> App ID and App Secret. In this tutorial, we will proceed with a -> short-lived token for simplicity, but it is strongly encouraged to get -> a long-term token for your analysis (holds for 60 days). For -> instructions on how to do this, refer to the [official Meta -> documentation on access -> tokens](https://facebookresearch.github.io/Radlibrary/articles/Radlibrary.html#generating-persistent-tokens). +:::hub-note Note +**Token expiration:** By default, tokens from the Explorer are [short-lived](https://developers.facebook.com/docs/facebook-login/guides/access-tokens#termtokens)(usually ~1-2 hours). For short analysis sessions that might be +sufficient, but in most cases you will likely need longer access. You can exchange the short-lived token for a 60-day token using your App’s App ID and App Secret. In this tutorial, we will proceed with a short-lived token for simplicity, but it is strongly encouraged to get a long-term token for your analysis (holds for 60 days). For instructions on how to do this, refer to the [official Meta documentation on access tokens](https://facebookresearch.github.io/Radlibrary/articles/Radlibrary.html#generating-persistent-tokens). +::: ### Step 2: Installing and Loading R Packages @@ -212,12 +207,9 @@ query <- adlib_build_query( ) ``` -> **Note**: You might encounter the following warning: -> *Warning: Unsupported fields supplied:* followed by a list of -> parameters. -> This warning can be safely ignored. The `Radlibrary` package, despite -> being developed by the Facebook team, may not be up to date with the -> newest parameters. +:::hub-note Note +You might encounter the following warning: *Warning: Unsupported fields supplied:* followed by a list of parameters. This warning can be safely ignored. The `Radlibrary` package, despite being developed by the Facebook team, may not be up to date with the newest parameters. +::: ------------------------------------------------------------------------ From 4c17c5411d24714406ccb71d6a8a4548bd56f37b Mon Sep 17 00:00:00 2001 From: clara-rthrdt Date: Fri, 1 Aug 2025 11:11:36 +0200 Subject: [PATCH 8/9] small adjustments --- .../04_data-analysis/04_05_metatargetr.mdx | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/docs/docs/04_data-analysis/04_05_metatargetr.mdx b/docs/docs/04_data-analysis/04_05_metatargetr.mdx index 08e2dc6..bb796a7 100644 --- a/docs/docs/04_data-analysis/04_05_metatargetr.mdx +++ b/docs/docs/04_data-analysis/04_05_metatargetr.mdx @@ -42,16 +42,16 @@ perspective. Here are the key advantages over Meta’s official Ad Library API: -- Advertiser-Level Data: Instead of looking at single ads, we get a +- **Advertiser-Level Data:** Instead of looking at single ads, we get a consolidated view of the entire targeting strategy of a Facebook page or Instagram account. -- Exact Spending per Criterion: The data provides the exact percentage +- **Exact Spending per Criterion:** The data provides the exact percentage of a page’s total spend allocated to each specific targeting criterion. This allows for precise analysis of budget allocation, a feature not available through the official API. -- Additional Audience Insights: The dataset goes beyond the demographic +- **Additional Audience Insights:** The dataset goes beyond the demographic targeting that is available via the API, as it reveals spending on powerful tools like Detailed Targeting (e.g. interest profiles that Meta categorizes its users in), Custom Audiences (e.g., targeting a @@ -327,12 +327,9 @@ spending for each targeting criterion based on the new, combined total. # Apply the function to our DHS data dhs_data_agg <- aggr_targeting(dhs_data_raw) ``` - -> Note: the `aggr_targeting()` function creates a variable called -> `spend_per` which shows the spend per targeting criterion -> across the combined period. If you pull raw data with `get_targeting_db()`, you have to compute this measure -> yourself as *total spending* (`total_spend_formatted`) *×* *share of spending* -> (`total_spend_pct`). +:::hub-note Note +The `aggr_targeting()` function creates a variable called `spend_per` which shows the spend per targeting criterion across the combined period. If you pull raw data with `get_targeting_db()`, you have to compute this measure yourself as *total spending* (`total_spend_formatted`) *×* *share of spending* (`total_spend_pct`). +::: ### Visualizing "Detailed" Targeting Criteria @@ -390,8 +387,9 @@ in Mexican culture events and music, and whose language is set to Spanish. This provides concrete, data-driven insights into their campaign strategy that would be difficult to obtain otherwise. -> Note: When multiple targeting criteria show identical spend, that likely indicates they were applied together on the same underlying ads. Because the data that is retrieved is aggregated at the advertiser level it is hard to isolate ads that ran simultaneously. For a better measurement of spend we could divide the total spending by the number of targeting criteria that have the same data (same number of ads and spending) by assuming that spending was divided about equally to each targeting criterion. - +:::hub-note Note +When multiple targeting criteria show identical spend, that likely indicates they were applied together on the same underlying ads. Because the data that is retrieved is aggregated at the advertiser level it is hard to isolate ads that ran simultaneously. For a better measurement of spend we could divide the total spending by the number of targeting criteria that have the same data (same number of ads and spending) by assuming that spending was divided about equally to each targeting criterion. +::: ### Visualizing Location Targeting Criteria @@ -510,11 +508,11 @@ the targeting criteria used as proxies for the Latino community are also employed by a diverse range of other major advertisers. The top 10 spenders using these methods include: -- Public Health & Advocacy Groups: Organizations like Planned +- **Public Health & Advocacy Groups:** Organizations like Planned Parenthood, Tobacco Free Florida, and The California Endowment use this targeting for outreach and awareness campaigns. -- Non-Profits and Charities: Pages such as Catholic Relief Services, +- **Non-Profits and Charities:** Pages such as Catholic Relief Services, Operation Smile, and The International Fellowship of Christians and Jews appear to use these criteria for fundraising and supporter engagement. From 18940fae392df51ac68f5d6f237f6a80dc39da02 Mon Sep 17 00:00:00 2001 From: clara-rthrdt Date: Fri, 1 Aug 2025 11:15:08 +0200 Subject: [PATCH 9/9] markdown --- .../03_04_data-collection_meta_ads.mdx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/docs/03_data-collection/03_00_platform-specific guidelines/03_04_data-collection_meta_ads.mdx b/docs/docs/03_data-collection/03_00_platform-specific guidelines/03_04_data-collection_meta_ads.mdx index c23d57a..db8ead8 100644 --- a/docs/docs/03_data-collection/03_00_platform-specific guidelines/03_04_data-collection_meta_ads.mdx +++ b/docs/docs/03_data-collection/03_00_platform-specific guidelines/03_04_data-collection_meta_ads.mdx @@ -698,8 +698,9 @@ gender, and percentage. Each row might say, for example, ad X – age women aged 18-24). The percentages for a given ad across all age/gender categories sum up to 100%. -> Important: if an ad did not reach a particular demographic group, it may -not have an entry for that group. +:::community[Important] +If an ad did not reach a particular demographic group, it may not have an entry for that group. +::: Now, what can we learn from this? Here are a couple of insights we might extract: @@ -712,10 +713,9 @@ or simply fail to engage older audiences. Similarly, we could examine how many ads target women vs. men, or the average percentage of impressions to women vs. men. -> *Note of caution:* A more robust analysis would weight the data by -impressions or spending. Averaging percentages across ads without doing -so treats a low-reach ad the same as a high-reach one. For simplicity, -however, we proceed with the unweighted approach. +:::community[Note of caution] +A more robust analysis would weight the data by impressions or spending. Averaging percentages across ads without doing so treats a low-reach ad the same as a high-reach one. For simplicity, however, we proceed with the unweighted approach. +::: For a quick view, we can calculate the overall gender split in relative impressions, assuming equal weight per ad (again, caution advised):