Expand my Community achievements bar.

Help shape the future of AI assistance by participating in this quick card sorting activity. Your input will help create a more effective system that better serves your needs and those of your colleagues.
SOLVED

Global Variables Questions

Avatar

Level 6

Hi All,

I have been debating the use of global variables in DTM but wanted some concrete answers.

Questions:

  1. Should DTM admins use the global variables section to set variables that will be used globally versus just adding it as a page load rule. What are some pros and cons. Is there page load savings or merely organizational?
  2. What exactly does the server area used for and do? Does it have a use case?
  3. Dynamic variable prefix, what exactly is this doing and how to setup and again what are some use cases for using this field?

Global.JPG

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

1) The global variables section should be used for global values that should be included on every page view or s.t() beacon. Page load rules should then supplement the global variables based on conditional logic. As far as pros on cons, there aren't any noticeable performance gains that I've seen. Doing it the way I've described is how the system was designed so it's usually best to use the product in that way for updates and migrations.

2) According to the documentation, it populates the server variable for the Servers report in Analytics. Personally, I haven't seen that many customers using it. Gigazelle - Do you have any information on the Servers report in Analytics. It looks like the documentation may have moved.

3)This is in case you've changed your dynamic variable prefix in Analytics. The default is "D=" - More about Dynamic Variables here.

Thank you,
Jantzen

View solution in original post

4 Replies

Avatar

Correct answer by
Level 10

Hi,

1) The global variables section should be used for global values that should be included on every page view or s.t() beacon. Page load rules should then supplement the global variables based on conditional logic. As far as pros on cons, there aren't any noticeable performance gains that I've seen. Doing it the way I've described is how the system was designed so it's usually best to use the product in that way for updates and migrations.

2) According to the documentation, it populates the server variable for the Servers report in Analytics. Personally, I haven't seen that many customers using it. Gigazelle - Do you have any information on the Servers report in Analytics. It looks like the documentation may have moved.

3)This is in case you've changed your dynamic variable prefix in Analytics. The default is "D=" - More about Dynamic Variables here.

Thank you,
Jantzen

Avatar

Employee Advisor

The Server field populates the variable in legacy code known as s.server, which is basically a slightly glorified traffic variable.

Servers Report

The Pages Report, Site Section Report, and Server Report are commonly grouped together. Not too many people use the Site Section or Servers Report these days though, now that eVars have had their functionality greatly expanded over the last couple years. Personally if I had the choice between using the server variable and an eVar, I'd use the eVar every time without question.

Avatar

Level 6

Hi Gigazelle,

Thank you for the perfect answer to my question about the server field. I agree eVars are the way to go

just want to make sure we are not missing any wasted opportunities in these areas.

Avatar

Level 6

thank you for clarifying the Global variables section and the right way is just using the system how it was designed is the best approach.

thanks again for all your help,

Scott