DTM Cheat Sheet

This page will include updates, omissions and other tips and tricks, so check back from time to time. You’re also welcome to download a PDF version so you can have it next to you on your desk.

Download DTM Cheat Sheet.


_satelliteThe _satellite object is the essential DTM JavaScript object that is generated by the DTM libraries. If DTM is running on the site, you'll see the object pop up
_satellite.publishDateGets the date/time you hit the 'publish' button within DTM interface
_satellite.buildDateGets the date/time the library was physically updated. This is likely the one you'll be using the most
localStorage.setItem('sdsat_stagingLibrary',true)This enables your staging library. Needless to say that changing 'true' to 'false' disables it. Refresh the page after running the command
_satellite.setDebug(true)Enables debug mode. Debug mode allows you to see when and which rules are firering along with letting you know what events DTM is listening for. Again, changing 'true' to 'false' disables it again. Refresh the page after running the command
Settings.pageLoadRules,function(i){(i.event=='pagetop')?_satellite.notify(i.event+': '+i.name,1):false})
Gives you the list of rules set to fire at top of page
Settings.pageLoadRules,function(i){(i.event=='pagebottom')?_satellite.notify(i.event+': '+i.name,1):false})
Gives you the list of rules set to fire at the bottom of the page
Settings.pageLoadRules,function(i){(i.event=='domready')?_satellite.notify(i.event+': '+i.name,1):false})
Gives you the list of rules set to fire when DOM is ready
Settings.pageLoadRules,function(i){(i.event=='windowload')?_satellite.notify(i.event+': '+i.name,1):false})
Gives you the list of rules set to fire at window load

Note: Staging and Debug Mode can also be achieved by using the DTM Switch plugin available for Firefox and Chrome.

DTM Load Order



Data Elements

_satellite.getVar('data element name')Gives you the value of the specified element
_satellite.setVar('data element name', value)Allowing you to set a data element with a specific value on a page view level

Note: Remember Data Elements are only available in the browser if they are referenced in a rule


Built-In Data Elements

Data ElementDescription
%URI%Used in rules and returns document.location.pathname + document.location.search
%protocol%Used in rules and returns document.location.protocol
%hostname%Used in rules and returns document.location.hostname
%this.HTML attribute%
This will capture the HTML attribute of the element tag or CSS selector that you specified in your rule


Cookie Manipulation

_satellite.readCookie(‘cookie name’) Retrieves the cookie value. Can read any domain cookie
_satellite.setCookie('cookie name','cookie value',days to expire)Allows you to set a cookie by specifying the name, value and days to expire
_satellite.removeCookie('cookie name')Can delete any cookie

One thought on “DTM Cheat Sheet

Comments are closed.