January 11, 20265 min read

How to Show Different Content Based on Traffic Source: A Technical Guide

Camoleo
Author
How to Show Different Content Based on Traffic Source: A Technical Guide

The Power of Intent-Based Content

A visitor coming from a "SaaS pricing" search query has very different intent than someone clicking a "link in bio" from Instagram. Serving them the same generic landing page is a missed opportunity. This is where dynamic website content becomes essential.

Step 1: Understanding UTM Parameters

The most common way to identify traffic source is through UTM parameters. These are tags added to the end of a URL (e.g., ?utm_source=linkedin) that tell your website exactly where the click originated.

Step 2: Detecting the Source

To show different content, your website needs a way to "read" these parameters. This can be done via client-side JavaScript that checks window.location.search or via server-side logic.

Step 3: Swapping the Content

Once the source is identified, you can trigger a content swap. For example:

  • LinkedIn Visitors: Show a "Professional/B2B" focused headline.
  • Google Search Visitors: Show a headline that mirrors their exact search keyword.
  • Newsletter Subscribers: Welcome them back with a "Welcome back!" message instead of a generic pitch.
"Content relevance is the single biggest lever in conversion rate optimization."

Implementing Without Code

While you can build this yourself using React state or vanilla JS, tools like Camoleo allow you to set these "Source Rules" visually, mapping specific UTM values to content variations in seconds.