- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
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
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).
Hi @JonSpartan1,
There's also the posibility of doing it based purely on the URL:
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.
07-04-2018 04:26 AM - last edited on 07-09-2018 11:33 AM by kathleen_jo
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.
Copyright All Rights Reserved © 2008-2023