Highlighted

A Single URL Load Rule

Rookie Contributor

Hello,

I want to know the best way to set up a single URL load rule. This is my first time setting one up. The articles were hard to understand. 

Thank you,

Jon

3 REPLIES 3
Highlighted

A Single URL Load Rule

Tealium Expert
Tealium Expert

Hi @JonSpartan1

I usually use the dom.pathname property for load rules for particular URLs.  

Most sites I work on have a consistent hostname, so that bit isn't needed, so the pathname is the important bit.  I'd then use equals (ignore case).

single url loadrule.jpg

Highlighted

A Single URL Load Rule

Silver Contributor
Silver Contributor

Hi @JonSpartan1,

There's also the posibility of doing it based purely on the URL:

Image 69.png

If you track several domains within the same Tealium profile, please consider @BenStephenson response, or basing the rule on the page name if it's common between the sites.

Highlighted

A Single URL Load Rule

Tealium Expert
Tealium Expert

I would recommed pathname over URL, @JonSpartan1, because that allows one rule to work between dev and production sites (that are on different subdomains), and also between http and https.

For example if you had development.sitename.com and uat.sitename.com and www.sitename.com, you can use a single load rule based on pathname which will work across all three.  If you use URL then you'll have to do three OR statements, or have multiple load rules.

This might be what you want, if you want something to only fire in the production environment (we used to get grief from the testing department that all the marketing tags were breaking their automated scripts, so using URL based load rules is one way to stop them firing in the test environments).

If the datalayer is good enough, pagename is usually my first choice for load rules. (One of our clients have very well structured page names so it's possible to use equals and contains to get load rules for single pages, pages within certain funnels, etc.)  Pagename is also useful for SPAs where the URL (and pathname) doesn't change.