Tags runs on JavaScript. Custom-code data elements, rule conditions, direct-call rules and Web SDK sendEvent calls all need it, and debugging a broken beacon means reading JS in the browser console.
0 of 0 done
Modules
Module 1
Variables, types & objects
Concept
const for values that don’t change, let for ones that do. Objects group related data — the data layer is one big object.
Console errors, breakpoints in DevTools, the Experience Platform Debugger and Assurance show what actually fired.
Where it's used
QA before every publish.
// In the console
_satellite.setDebug(true);
/ reload page, then filter the console by "satellite"
/ Network tab: filter "interact" for Edge calls
Practice: Find and fix one broken data element on a test property.
Screenshot Debugger showing the corrected valueAdd screenshots/javascript/module-08.png
Must know
Tags is JavaScript underneath: custom code data elements, conditions and actions are all JS.
Read the data layer safely (check objects exist) so one missing value does not break every rule.
_satellite.getVar(), _satellite.setVar() and _satellite.track() are the main Tags helpers.
Web SDK is called with alloy("sendEvent", { xdm: {...} }).
Debug in the browser console and network tab before blaming Adobe.
Interview questions
From your board. Answer out loud before you reveal.
let vs const vs var?
const can’t be reassigned, let can; both are block-scoped. var is function-scoped and older — avoid it in new code.
== vs ===?
=== compares value and type with no conversion; == converts types first. Use === to avoid surprises like "1" == 1.
How do you stop a data element from throwing an error?
Use optional chaining and a default (?. and ??), or a try/catch, so missing data returns a safe fallback.
What is a Promise?
An object for a result that arrives later. alloy("sendEvent") returns one; use .then() or await to handle the response.
When would you use a direct-call rule?
When the site needs to trigger tracking explicitly from code (e.g. an SPA view change) with _satellite.track("name").
How do you debug a beacon that isn’t firing?
Enable _satellite.setDebug(true), check the rule’s conditions and consent, look for console errors, and confirm the call in the Network tab or Assurance.