This article assumes a solid general tag manager as well as DTM-specific knowledge base. It will help take you from a “by the book” example implementation to the much messier real world.
There are also some bonus non-DTM tips in here as well.
1. You cannot set events using both s.events in custom code and in the UI*
Let’s say you are setting s.events in custom code because you need to set events equal to currency amounts rather than just increment them, since this is a limitation of the UI.
You might have something like (example order confirmation scenario):
s.events= “event59=”+_satellite.getVar(‘orderTotalProductDiscount’)+”,event60=”+_satellite.getVar(‘orderLevelProductRevenue’)+”,purchase”;
Then, you might later come into the UI and add an event in the Events area. This would be a mistake. The custom code will override the UI, and the UI entry will be meaningless. You have to now add ALL events on the given rule in the custom code section.
*Update: you can, but it’s not the best nor intuitive. See Jenn Kunz’s comment on this post for more.
2. You must avoid special characters in product syntax merchandising eVars to avoid conflict with the product string
Merchandising eVars should not use any characters that are reserved due to their functions in the product string. Prime examples include the semicolon (used to separate pieces of the product string), the pipe | which is used to separate merchandising eVars from each other, or a comma, which is used to end an iteration of the product string. This may seem like common sense, but these sorts of characters are remarkably common in data layers, particularly those serving dual purpose for Google Analytics. Characters like the pipe are used to separate page hierarchies, for example ( Level 1 | Level 2 | Level 3 ). I try to avoid the following characters to stay out of trouble:
*Avoid the below completely or replace with a space
& ; , + % @ # ! * () {} [] ‘ ” =
*Replace | with /
*Avoid hidden or non-ASCII characters
3. “Data element changed” has several limitations
To detect a change in a data element, DTM listens periodically for changes. This makes it attractive as a rule condition. However, “periodically” is often not enough when the change occurs when moving from one page to another. Alternatives that pick up more quickly are using _satellite.track and setting up a direct call rule, or using a CSS selector in an event-based rule if it applies if you are fairly confident it is stable and will not change (keep tabs on it anyway). All of these will be detected more quickly than data element changed.
The second limitation is that data element changed is text-based, not time-based. What I mean is that it is looking for a change in the contents of the data element, but if you push the same text to the data element again, it won’t be detected as a change. Let’s say that you do 2 of the same thing in a row, for example adding an item to the cart from a given page. If you have a data element showing the contents of your event array, and you are depending on it to change to trigger add to cart-related items, it will only trigger once for the 2 add to carts you did from the page if your data element just picks up “addToCart” each time (or whatever text is in the data element.) A way around this is to send an incrementing number at the end of the text string (e.g addToCart1, addToCart2) so it gets detected as a change. This is somewhat inelegant but gets the job done. I have had to use it when I had a structure I couldn’t modify and insufficient dev hours to make an ideal set of changes, for example.
4. There are more special characters to avoid in classification uploads than those listed in Adobe’s help documentation
OK, this one is not DTM-specific, but it’s still a “what they don’t tell you.”
*You cannot use single quotes around data in a classification file. You might be tempted to do this to avoid leading 0’s from being removed from a product ID, for example. However, if you do, it will cause issues with your upload and has been confirmed by my own frustration and client care’s subsequent confirmation that this should be avoided. This is not documented anywhere that I have seen that single quotes surrounding cell data cause issues, but they definitely do. The solution is to use something other than Excel (basic text editors, etc.) to edit the file so the leading 0’s do not get cut off or change your Excel settings accordingly.
*This may be obvious but it happens all the time – avoid using the separator character in the file if at all possible (e.g. tabs within a cell within a tab-separated file). If you must: you can get around this by changing v:2.0 to v:2.1 in cell C1 in the classification template. You can also escape the special characters.
*Using tab (/t), form feed (/r), new line (/n), double quote (“), caret (^), or pound (#) are all no-nos within a cell unless you escape them. The pound symbol within a cell will get your data interpreted as a comment and ignored, which you don’t want, for example.
*Something that doesn’t get repeated often enough: the first row under the header must be blank in the file; your data starts on the following row. If you don’t do this, your file won’t always upload.
5. There are non-publicly documented differences in default allocation for the pages (s.pagename) report between different Adobe products
(Another non-DTM item, but very important to understand.)
Reports and Analytics: uses linear allocation
Workspace: only shows values set on the same hit where the pageName is set
Data Warehouse: uses linear allocation
Ad Hoc Analysis: can be set to default, last, or linear allocation
This means your data will very likely not match if you are looking at the Pages report for a given set of events in R&A vs. Workspace.
6. When you set up the Google Analytics tool in DTM, don’t choose “Google Analytics”
Because you might want to go back in time to before October 2012, it’s still possible to use ga.js rather than analytics.js. You really don’t want to, though. If you want a recognizable, modern GA with enhanced eCommerce capabilities, you will want to add the “Google Universal Analytics” tool. If you choose “Google Analytics” by mistake, enjoy your trip back to the early days of web analytics. Perhaps we can also add an option for Urchin, or Site Counter. I digress.
7. Common marketing tags that you would copy/paste as custom JavaScript or HTML in other tools must be rewritten if you want to run them as non-sequential JavaScript
There are many things that need to happen above and beyond removing surrounding script tags for JS-based marketing tags to run successfully as non-sequential JavaScript in DTM. You will have to rewrite many common tags. Jenn Kunz has a great article on specifics with some good examples here.The recent, uh, “launch” of Adobe Launch (the newest Adobe tag manager) offers hope for this scenario and many others mentioned above, and as it continues to evolve I hope to see these scenarios and more handled.