# Adobe Analytics

```javascript
// Eraya + Adobe Analytics Integration
function initializeErayaAdobe() {
  if (window.Eraya && window.s) {
    const sdk = window.Eraya.getSDK();
    
    if (sdk) {
      const userManager = sdk.getUserManager();
      const erayaUserId = userManager.getErayaUserId();
      
      // Get all active experiments
      const activeTests = sdk.getActiveExperiments();
      
      if (activeTests && activeTests.length > 0) {
        // Track experiment exposures
        activeTests.forEach(test => {
          s.linkTrackVars = 'events,eVar1,eVar2'; 
          s.linkTrackEvents = 'event1';
          s.events = 'event1';
          s.eVar1 = test.testId;
          s.eVar2 = test.variationId;
          s.tl(true, 'o', 'Experiment Viewed');
        });
        
        // Set user variables with experiment data
        s.eVar10 = erayaUserId;
        s.eVar11 = userManager.getVisitorType();
        s.eVar12 = userManager.getUserCountry();
        
        // Add each test as a variable
        activeTests.forEach((test, index) => {
          const eVarNum = 20 + index; // Start from eVar20
          if (eVarNum <= 75) { // Adobe Analytics limit
            s[`eVar${eVarNum}`] = `${test.testId}:${test.variationId}`;
          }
        });
        
        s.t(); // Send page view with experiment data
      }
    }
  } else {
    setTimeout(initializeErayaAdobe, 100);
  }
}

// Initialize on page load
initializeErayaAdobe();
```
