I am capturing values from my URLs in order to populate my pageName, channel and 2nd level section. I have entered the code into the Customize Page Code interface in the Analytics section of DTM, however it doesn't seem to be loading on my pages. I used the debugger and cannot see that any of those variables are being populated. Where should that code be appearing on the page? How do I troubleshoot?
For your code that parses the URLs, are you looking for query string parameters, or other parts of the URL? If you use Data Elements for those URL values, you can set your Analytics variables in the user interface in the global Analytics settings, Pageviews & Content section.
When you say you "entered the code into the Customize Page Code interface in the Analytics section of DTM", did you do that in a Page Load Rule, or on the Global Settings screen?