Campaign Analysis

It's always important to understand how a marketing campaign has performed so that you can optimize your next campaign.

Typically when looking at campaign performance you will want to investigate:

  • when your audience engaged with your campaign.
  • which pieces of content drove most engagement.
  • which sources (or publishers) generated the most engagement.
  • which demographic groups engaged most with the campaign.
  • how engagement varies by location.
  • which personalities proved influential.

With these insights you can improve future campaigns by creating content based on topics and personalities that resonate with your audience, and publishing content on sites that successfully drive sharing. You can optimize your approach by location and demographic segments you are looking to target more successfully.

By carrying out similar analysis for campaigns in future, you can compare the relative performance of each campaign.

Campaign analysis using PYLON


As a quick reminder, you work with PYLON by:

  • Filtering the stream of data from Facebook to stories and engagements (such as likes and comments) you'd like to analyze. Filtered data is recorded into an index.
  • Classifying the data using your own custom rules to add extra metadata for your use case.
  • Analyzing the data you have recorded to the index.

Specifically when you build a campaign analysis solution with PYLON you will:

  • define an interaction filter that selects interactions from the audience who have engaged with your campaign.
  • define classification rules to identify topics, sources and personalities which influence content sharing.
  • analyze your recorded interactions to identify which content has driven engagement by which segments of your audience.

Solution overview

To illustrate the solution, let's imagine you have recently announced a new TV series (The Walking Dead). In this case you have briefed a number of publications and have published your own content for the launch. You want to investigate which pieces of content have performed best for your target audience.

Filtering interactions

Firstly you need to define an interaction filter that will capture interactions from your audience when they are engaging with content relating to your launch.

Generally for campaign analysis you will want to capture all stories and engagements (likes, comments and reshares) that relate to your campaign. You could write a broad filter using topics and keywords to do so:

fb.all.content contains_any "walkingdead, walking dead" 
OR == "The Walking Dead" 
OR == "The Walking Dead"

Specifically though for this example you want to see how content for your campaign has performed. So you want to capture people sharing or engaging with links that mention your series, and content on your own site. This CSDL would capture both:

fb.link_title contains_near "walking,dead:4" 
OR fb.parent.link_title contains_near "walking,dead:4" 
OR links.url contains ""

This example filter uses the fb.link_title and fb.parent.link_title to capture stories and engagements on stories that share links where the series is mentioned in the title. The links.url target is used to capture interactions where links to the series' website are shared.

Classifying topics and content sources

Before you start recording data from your filter you will want to add classification rules. Classification rules surface and normalize features of interactions for use in your analysis.

In this case it is useful to classify which types of publications are creating content that create engagement. You could add rules which classify the source of content being shared:

tag.webcontent "Social Networks" ​{ links.url any ",,"} 
tag.webcontent "Video" ​{ links.url any ",,,"} 
tag.webcontent "Music Streaming" ​{ links.url any ",,"} 
tag.webcontent "Shopping" ​{ links.url any ",,,"} 
tag.webcontent "Broadcasters" ​{ links.url any ",,"} 
tag.webcontent "Online News, Blogs" ​{ links.url any ","} 
tag.webcontent "News" ​{ links.url any ",,"} 
tag.webcontent "Gossip" ​{ links.url any ",,"} 
tag.webcontent "Fashion" ​{ links.url any ",,"} 
tag.webcontent "Sports" ​{ links.url any ",,"} 
tag.webcontent "Anime, Manga, Comic, Fun" ​{ links.url any ","} 
tag.webcontent "Review" ​{ links.url any ",,"}

These tags illustrate how you can classify content source from the domain of links being shared.

Once you've finished defining your filter and tags you can start your recording. Interactions which share links or engage on links that match your filter will be recorded. The interactions will be classified based on the domains in your tag rules.

When you come to defining tags for your real-world use case you will need to spend time iterating and testing these rules.

Example analysis results

When you have started to record classified interactions to an index you can analyze your recorded audience. Let's look at some typical analysis you may want to include.

When did the audience engage?

Firstly you might want to look at when your audience engaged with your campaign. You can use time series analysis focused on the period of your campaign to investigate when your audience has been most active.


Hopefully any peak of activity aligns with your key launch date. You can use the start and end parameters of the analysis endpoint to analyze periods of activity in more detail.

Viewing verbatim text

The above chart shows a clear peak in activity for your campaign. PYLON's privacy model prevents you from seeing the text of non-public posts, however you can take a look at super public samples during this period to get an understanding of the conversations taking place.

The pylon/sample endpoint gives you access to super public posts. An example post from this day read:

Can't wait for the new series of the Walking Dead - bring it on!

Looking at this post and a number of other samples shows that the interaction filter is filtering as you intended.

Which demographics engaged with the campaign?

Next you might want to look at who engaged with the campaign.

You can use a nested query, utilizing the and targets, to analyze the active audience by demographic groups:


This chart shows the audience breakdown, but does not help you see how this compares to users generally on Facebook. To understand how your audience compares you can use a technique called baselining.


This chart shows a baseline distribution in grey, which shows the breakdown of the broader Facebook audience. You can see that female from 25-44 engaged much more with the campaign than the wider audience.

You could also chose to 'baseline' analysis against audiences for previous campaigns or competitor brands. Baselining can be applied to any of your analysis to surface what is different about your audience.

tip icon

Learn more about comparing audiences by reading our baselining analysis results pattern.

What content is being shared?

PYLON provides a number of analysis targets that allow you to inspect links shared by your audience.

You can use the links.url target to analyze content being shared the most:


You could use a nested query, utilizing the target, to analyze popular content by age group:


Or utilize the and targets, to analyze popular content by demographic segment:


If you are targeting a specific demographic segment such as females between 25 and 34 you can analyze the top links engaged with by this group using the same targets in your query filter:


What sources of content are driving engagement?

It is also important to take a look at which sites are popular sources of content.

You can carry out the same analysis as shown above but instead for domains by using the links.domain target:


You can go further by using a nested query introducing the target to look at which domains were engaged with in different locations:


You can also benefit from the classification rules added to your filter, in this case we classified sources of content. You can analyze the breakdown of sources of content using the interaction.tag_tree target, specifying the 'webcontent' tags:


Again by using nested queries, working with the and targets, you can analyze which sources of content are shared by which demographic groups:


Influential topics and personalities

Aside from the actual pieces of content being shared, you may want to look at the topics influencing conversations in your audience.

In this instance you might want to see which personalities are driving engagement for your campaign. For this example topics are useful as they provide excellent coverage of personalities such as actors and directors.

By analyzing the time period using the fb.parent.topics.category_name target, it is straight-forward to show which topic categories and topics are prominent.

In this case you can see the actors driving engagement:


If topics do not provide good coverage for your use case you can use tagging rules to achieve the same result.

Analyzing the performance of specific content items

The above analysis examples take a look at the entire audience being recorded relating to the launch. You can take things a step further by analyzing the audience who engaged with specific pieces of content.

For example if you had created content on this URL:

You can specify this URL in your analysis queries to analyze only people who have posted this link in a story or engaged with a story which shared the link. You can specify the link in your query filter for any analysis query:

links.url contains ""

So you could repeat the demographic breakdown focusing on this one piece of content:


The grey bars represent the distribution of the audience that were recorded as engaging with the campaign. You can see from the chart that older audience segments engaged with your content relatively more than content from 3rd party sites.

This would test to see if the content you created is reaching your target audience groups. You can apply this idea to any of the analysis above to focus on the people engaging with specific items of content.

Related design patterns

Take a look at these related design patterns to learn more.

Improving filters using super public data Remove noise and broaden the audience captured by your interaction filters
Analyzing share of voice & audience Compare engagement with brands within an audience
Baselining analysis results Learn how to baseline you results against a comparison audience