Set up Google Tag Manager variables to read dynamic values from your page: While Google Tag Manager supports many variants (read from html elements, functions, variables, etc.), we'll set up Google Tag Manager variables to read JavaScript variables in this example.
Richten Sie Google Tag Manager-Variablen zum Lesen von dynamischen Werten von Ihrer Seite ein: Während Google Tag Manager zahlreiche Varianten (Lesen aus HTML-Elementen, Funktionen, Variablen usw.) unterstützt, richten wir Google Tag Manager-Variablen in diesem Beispiel so ein, dass JavaScript-Variablen gelesen werden.
You declare variables in JavaScript with the var keyword.
Avoid using global variables in JavaScript adapters to save data on the session - because there is no "session".
Vermeiden Sie die Verwendung globaler Variablen in JavaScript-Adaptern, um Daten in der Sitzung zu speichern, da es in dem Sinne keine Sitzung gibt.
Is there a standard function to check for null, undefined, or blank variables in JavaScript?
Gibt es eine Standardfunktion, um in JavaScript auf leere, nicht definierte oder leere Variablen zu prüfen?
Variables in JavaScript are not directly associated with any particular value type, and any variable can be assigned (and re-assigned) values of all types
Datentypen werden bei einer Variable nicht explizit deklariert und jede Variable kann mit Werten jedes Typen beschrieben (überschrieben) werden
This concept is known as hoisting; variables in JavaScript are in a sense "hoisted" or lifted to the top of the function or statement.
Diese Konzept ist bekannt als hoisting (hochziehen); Variablen in JavaScript sind hochgezogen und quasi zum Anfang der Funktion oder des Statements gehoben worden.
In normal JavaScript mistyping a variable in an assignment creates a new property on the global object and continues to "work" (although future failure is possible: likely, in modern JavaScript).
Vertippt man sich bei einer Zuweisung einer Variable in normalem JavaScript wird eine neue Eigenschaft im globalen Objekt erstellt und alles "funktioniert" noch (es kann in Zukunft jedoch trotzdem schiefgehen: wahrscheinlich in modernem JavaScript).
Potentially sensitive or inappropriate content
Examples are used only to help you translate the word or expression searched in various contexts. They are not selected or validated by us and can contain inappropriate terms or ideas. Please report examples to be edited or not to be displayed. Potentially sensitive, inappropriate or colloquial translations are usually marked in red or in orange.