Filtering Out Blog Traffic

Follow these steps to exclude blog traffic from your test and analytics.

In this article:


Background

Some brands use their blog pages for SEO - this generates a lot of traffic for their site, but does not result in many conversions or revenue. Because of this, blog traffic can create a lot of noise in analytics, and therefore it might be better to filter blog traffic out of your tests to keep your results clean and actionable. If you do not have any UTMs set up for your blog pages, this article will walk you through how you can exclude that traffic from your test.

Step 1: Add snippet to theme.liquid file.

Add the below code to your theme.liquid file directly above your Intelligems JavaScript snippet. An example Intelligems JavaScript  snippet is included at the bottom of the snippet below to illustrate where the new snippet should be placed.

<script>
if (window.history.pushState && window.location.pathname.includes('blog')) {
                    const newURL = new URL(window.location.href);
                    newURL.search = '?blog=1';
                    window.history.pushState({ path: newURL.href }, '', newURL.href);
}
</script>
<script src="https://cdn.intelligems.io/<your_customer_id>.js"></script>

Step 2: Set up UTM filter.

Set up the below Audience Targeting on your test. Note that this will need to be added to each test that you want to exclude blog traffic, and will only exclude that traffic moving forward.