Headline Testing and Optimization
Your headlines are the first impression your content makes. Headline Testing & Optimization empowers Parse.ly customers to take the guesswork out of crafting the perfect headline. By displaying multiple headline variants to different visitors and automatically identifying which one performs best, this feature helps maximize engagement through higher click-through rates (CTR).
With real-time testing powered by smart algorithms, content teams can make confident, data-driven decisions without manual analysis. Whether aiming to increase visibility in search engines or captivate readers on social media, Headline Testing ensures your best headline rises to the top.
Why Headline Testing Matters
Your content competes for attention in a crowded digital landscape. A compelling headline can mean the difference between a reader clicking or scrolling past. Headline Testing gives your team a systematic way to:
- Validate headline ideas based on actual audience behavior.
- Increase the effectiveness of editorial decisions.
- Learn what resonates with your readers to inform future content strategies.
Key Benefits
Our Headline Testing feature provides several significant benefits to help your content perform at its best:
- You can boost your click-through rates (CTR) and increase reader engagement by identifying the most effective headlines.
- The feature enables you to make fast, data-driven editorial decisions based on real user behavior.
- You can automate the hard part of the headline testing process without requiring manual monitoring or frequent adjustments.
- The testing focuses on what matters most—understanding and capturing your audience’s attention.
How It Works
- First, a separate JavaScript script must be installed on your website. This script is intentionally designed to be as lightweight as possible, separate from the main Parse.ly script, to ensure it loads very quickly and before any page content is displayed. Find installation instructions and options below.
- Once the script loads, it already comes preloaded with the list of active headline experiments. The system attempts to locate the control headline attached to each article link on the page.
- If the control headline is found, the script replaces it with the assigned variant headline for that specific visitor.
- When the variant headline is displayed the first time, this counts as an impression for that visitor.
- If the visitor clicks on the headline the first time, it is recorded as a success for that headline variant, and the system tracks this click.
- The selected headline variant is stored in the visitor’s cookies. This ensures consistency so that the same visitor will continue to see the same headline variant on subsequent visits.
- The system uses a multi-armed bandit approach, specifically Thompson Sampling with a Beta distribution, to determine which headline should be shown more frequently. For each variant, the algorithm models the probability of success based on observed data:
- Alpha (α) represents the number of visitors who successfully clicked on the headline.
- Beta (β) represents the number of visitors the headline has been displayed to (impressions).
- Over time, the algorithm dynamically adjusts the probability of showing each variant, favoring headlines that perform better while still exploring other options to continuously learn.
This entire process happens automatically and quickly, enabling real-time optimization without requiring any manual analysis or adjustments.
Limitations
- We only support headlines inside an anchor tag (<a>) linking to the URL.
- You need to be able to add JS to the <head> of their website.
Access
To access Headline Testing & Optimization:
- Navigate to the Parse.ly Dashboard.
- Select a website from the dropdown located at the upper left of the Parse.ly Dashboard.
- Select “Headline Testing” from the second-level navigation at the top of the screen.
How to enable/disable/add/remove Headline Testing
Script Installation
One-Line Snippet
Place this script in the <head> before any other scripts but after all <meta /> tags:
<script src="https://experiments.parsely.com/vip-experiments.js?apiKey=XXXXX"><script>
Make sure to add your Site ID as the apiKey to the script’s source. This should be a domain-like value, such as example.com, and not your API Secret! Please ensure to test the script on your staging website first to ensure everything loads correctly and there are no errors in your browser console.
The script is approximately 8kB (gzipped) and is delivered via our global edge network. This implementation loads the script synchronously, ensuring experiments run as often as possible.
To load the script asynchronously, add the async attribute. However, note that experiments may run less frequently if the script executes after the first contentful paint.
Advanced Installation
If the script loads asynchronously, you may experience flickering as headlines are replaced. To minimize this, use the advanced installation method and enable flicker control, which hides the page body for up to 500ms. Make sure to change the XXXXXXXX for your Site ID. This should be a domain-like value, such as example.com.
<script>
!function(){"use strict";var e=window.VIP_EXP=window.VIP_EXP||{config:{}};e.loadVIPExp=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t&&(e.config=n,e.config.apikey=t,function(e){if(!e)return;var t="https://experiments.parsely.com/vip-experiments.js"+"?apiKey=".concat(e),n=document.createElement("script");n.src=t,n.type="text/javascript",n.fetchPriority="high";var i=document.getElementsByTagName("script")[0];i&&i.parentNode&&i.parentNode.insertBefore(n,i)}(t),n.enableFlickerControl&&function(){var t,n;if(null!==(t=performance)&&void 0!==t&&null!==(n=t.getEntriesByName)&&void 0!==n&&null!==(n=n.call(t,"first-contentful-paint"))&&void 0!==n&&n[0])return;var i="vipexp-fooc-prevention";e.config.disableFlickerControl=function(){var e=document.getElementById(i);null!=e&&e.parentNode&&e.parentNode.removeChild(e)};var o=document.createElement("style");o.setAttribute("type","text/css"),o.appendChild(document.createTextNode("body { visibility: hidden; }")),o.id=i,document.head.appendChild(o),window.setTimeout(e.config.disableFlickerControl,500)}())},
// your Parse.ly Site ID here
e.loadVIPExp("XXXXXXXX",{
enableFlickerControl: true
})
}();
</script>
Installation Through Tag Manager
We do not recommend installing the script using a tag manager. This method may introduce a delay in script execution which can lead to experiments running less often.
Configuration options
By default, headlines are swapped during the initial page load. If your website loads articles dynamically and you want headlines to be updated for newly added anchors, you can enable live updates.
When live updates are enabled, the system watches the page after the initial swaps and automatically updates headlines for eligible anchors as new links appear. You can also configure how long this lasts – by default, we watch the page for 30 seconds.
Options
liveUpdatesEnabled: false
liveUpdateTimeout: 30000 // 30 seconds in milliseconds
Example of how to enable live updates for 5 seconds using the One-Line Snippet:
<script src="https://experiments.parsely.com/vip-experiments.js?apiKey=XXXXX" data-enable-live-updates="true" data-live-update-timeout="5000"><script>
Example for the advanced integration option:
// Rest of script
e.loadVIPExp("XXXXXXXX",{
enableFlickerControl: true,
liveUpdatesEnabled: true,
liveUpdateTimeout: 5000
})
Content Security Policy (CSP)
If you use script-src, content-src, or img-src directives, update them to allow our domains:
script-src 'self' https://experiments.parsely.com;
img-src 'self' https://tr-experiments.parsely.com;
content-src 'self' https://tr-experiments.parsely.com;
For the advanced installation snippet, ensure your CSP allows script execution. You can achieve this using a nonce, hash, or the ‘unsafe-inline’ directive (though the latter is generally not recommended).
script-src 'self' 'unsafe-inline' https://experiments.parsely.com;
For more details, see MDN: Content Security Policy.
Disable Headline testing
To disable Headline Testing, you can remove the JS Snippet from your website. Once the script is no longer loaded, no tests will be performed.
The same applies if you would like to disable headline tests on specific pages. Only where the script is loaded tests will be performed and data gathered.
Troubleshooting
Headlines Are Not Being Replaced
Possible Issue:
The control headline is being selected as the variant
Solution:
Check if the anchor has the vipexp-swapped-element
class. If it does, the system is working as expected.
Possible Issue:
The script is being executed after the first contentful paint.
Solution:
Try loading the script synchronously or enabling flicker control.
Possible Issue:
Mismatch in the URL or control text.
Solution:
Ensure the anchor’s href attribute includes the canonical URL path. Additionally, the anchor must contain either:
- The exact headline text with no extra text (though it may have child elements), or
- At least one child element that exclusively contains the exact headline text.
Last updated: May 14, 2025