|
Post by j7oyun55rruk on Dec 27, 2023 4:11:47 GMT
Macros use macros and rules to decide when to fire tags. A macro is just a name-value pair that can be used to build rules. In many cases, the value itself is populated at runtime. That is, the page itself is currently being built for the user. There are three default macros out of the box that can handle a lot of things on their own: URL Macro This is a simple one. The name is and the value is the current value. Example of a rule based on: If sending our conversion tag. Your conversion pages may contain various conversion tracking tags, such as e-commerce analytics snippets, ROI trackers from comparison shopping engines, etc. Another simple one is quoting macros. The name is, and the value is the previous page visited by the user. Example C Level Contact List of this macro: If the referrer matches or, send the social quote tag. Maybe it's a visitor-scoped custom variable. Event macros are a bit complicated, especially if you're used to events. They have similarities, and you'll probably use them together, but it's best to forget for a moment that there's a thing called an event. Events can be used to track interactions on a page after it has loaded. For example, if you can push an event. If any rules depend on this event value, the specified tag will fire. The code for the push event is as follows: So for the purchase page, if we wanted to track the form submission as an event, we would take the form code we have: and add: Now, any rule that has a trigger when the event value name is All tags will do this. In addition to the form submission event, here is another example.
|
|