#GTMtips: DataLayer Declaration vs. .Push()
Here’s a tip on how to avoid a horrible, horrible mistake with Google Tag Manager. Tip 7: Always use .push() with dataLayer When you assign a value to a variable using the equals ( = ) sign, you are actually reallocating the variable to a new value, and the garbage collection system of the runtime environment sweeps the previous value to bit heaven. Let’s put it simply: if you redefine dataLayer after the GTM container snippet, you will break GTM’s proprietary functions. Read More…