Data layer loads after “all pages” activator

[ad_1]

Since the last few weeks I have been having problems with the data layer variables.

Variables like postCategory or visitorType appear “undefined” when the “all pages” trigger is fired.

The tags that are activated on all pages are executed before the data layer loads the variables, so all the parameters end up undefined.

This did not happen before, I have declared all my data layer variables correctly, but it seems that now they are out of time, the tags are executed before the variable values have been loaded.

Any idea what could be happening?
Thanks

EDIT:

I’ve added a new “DOM Ready” trigger that fixes the issue of undefined variables. This solves my problem.

Even so, this did not happen before.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer