What is Preloader scope?

trunguyen
Bronze Contributor
Bronze Contributor trunguyen

Hi,

 

What is Preloader scope and is there an opposite scope of Preloader?

 

Thanks,

Trung.

1 REPLY 1

What is Preloader scope?

Tealium Employee

Hi @trunguyen

 

This article may be of help to you:

 

https://community.tealiumiq.com/t5/iQ-Tag-Management/JavaScript-Code-Extension/ta-p/11925

 

Preloader scope is the ability to scope a JavaScript to before utag.js has started running. This allows for set up code, parsing code, or occasionally the odd JS library to be loaded.

 

The full article on scope can be found here: https://community.tealiumiq.com/t5/iQ-Tag-Management/Extensions/ta-p/13649

 

However here is a TL;DR version

 

The other scopes are:

  1. Preloader
  2. DOM Ready - Will fire when the browser reaches the DOM Interactive / DOM Ready stage
  3. All Tags Scope - Extension will run when a view or link event happens
  4. Tag Scoped - The extension is only called if the tag is loaded, and will run in the scope of the tag.

 

Additionally, for All Tags Scope, you have the additional options:

  1. Before Load Rules - Will process an extension before load rules are processed. Ideal for setting load rule conditions
  2. After Load Rules - Default, Used for setting data up for tags
  3. After Tags - Effectively the opposite of Preloader. Will fire once the tags have finished, and called their send method.

In addition, there are also Run Once options for these, whereas the name suggests these will only run once.

  1. Run Once after Load Rules
  2. Run Once before Load Rules
  3. Run Once After Tags

 

I hope that helps explain Preloader and scopes in general.

 

Adrian

Ask me anything Tealium related or Javascript, or NodeJS.
Please remember to mark solutions as accepted for future searchers.