How to create dynamic content with url parameters

by Steven Moseley April 1st, 2020

Dynamic content is an important concept for content marketers. Let's say, for example, that you have an ad running on Google in several states, and you want to personalize your landing page title to the person's state,

e.g.:

Florida Drivers Save Big!

Adwords has tools to allow you to pass the state to your site in a URL parameter, e.g. ?state=Florda, but how do you get that on your page?

Well, Unstack has a fun hidden feature that allows you to easily get these parameters and present them in your content, using "handlebar" tags.

For the above case, you could create a title like:

{{a|state}} Drivers Save Big!

And Unstack will replace {{a|state}} with the value passed in the URL.

But let's say the URL parameter isn't always there, and you want to provide a default value? Well that's simple, too, using "|" to define the default, e.g.: "{{state|Unstack} } Drivers Save Big!".

In this case, when a "state" parameter isn't provided in the URL, users will see "Unstack Drivers Save Big!" as their title.

Passing forward UTM Parameters

UTM parameters are a special case, because they can be populated from the URL or from a later page in the site, based on the initial UTM parameters received for a given session.

The UTM parameters you can reference in your site are:

  • utm_source
  • utm_medium
  • utm_campaign
  • utm_content
  • utm_term
  • utm_click_id (any value originally passed to Unstack as "click_id")

An example url you may construct using these params is:

https://www.unstack.com/?utm_source={{xax|utm_source}}&utm_medium={{xax|utm_medium}}&utm_campaign={{xax|utm_campaign}}&utm_term={{xax|utm_term}}&utm_content={{xax|utm_content}}&click_id={{xax|utm_click_id}}

You can build URLs like this in any link or button, to carry forward the UTM parameters originally passed to Unstack to your external app.

Special note: when traffic arrives at your Unstack site with no UTM parameters specified, we use UTM-inference to generate source information for your users. For example, users who arrived at your site by clicking a Google link will have utm_source=google and utm_medium=organic-search.  All of these inferred UTMs will have utm_campaign=spark-autofill, which will let your external system know that these UTMs came from us.

Your cart

We value your privacy

We use cookies to customize your browsing experience, serve personalized ads or content, and analyze traffic to our site.