You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

求助:如何在Adobe Launch中实现Mouseflow Session ID并分配至eVar

How to Capture Mouseflow Session ID and Assign It to an Adobe Analytics eVar via Launch

Hey Balakrishna, great question! Let's break this down into straightforward, actionable steps to get that Mouseflow Session ID into your Adobe eVar smoothly:

Step 1: Fetch the Mouseflow Session ID

Mouseflow exposes its session data via the global _mfq queue (similar to how Adobe uses _satellite). Since Mouseflow loads asynchronously, we need to use its callback method to ensure we grab the ID only after the tool is fully initialized.

Here's the code snippet to retrieve the Session ID reliably:

// Initialize the Mouseflow queue if it doesn't exist yet
window._mfq = window._mfq || [];

// Use Mouseflow's callback to get the Session ID once it's ready
_mfq.push(function() {
  const mouseflowSessionId = window.Mouseflow.getSessionId();
  
  // If we successfully retrieve the ID, store it in Launch's variable space
  if (mouseflowSessionId) {
    _satellite.setVar('mouseflowSessionId', mouseflowSessionId);
  }
});

Step 2: Configure Adobe Launch to Pass the ID to an eVar

Now let's wire this up in your Launch property:

  1. Create a Reusable Data Element (optional but recommended):

    • Navigate to your Launch property > Data Elements > Create New
    • Select "Custom Code" as the element type
    • Paste the code above into the editor, and set the storage duration to match your eVar's expiration (e.g., "Session")
    • Name it something clear like Mouseflow Session ID and save
  2. Set Up a Rule to Populate the eVar:

    • Go to Rules > Create New
    • Pick a trigger that fits your use case (e.g., "Library Loaded - Page Top" or "Page View")
    • Add an action: select "Adobe Analytics > Set Variables"
    • Under the "eVars" section, choose the specific eVar you want to use, then set its value to either:
      • The data element you created (e.g., %Mouseflow Session ID%)
      • Or directly reference the variable if you skipped the data element: window.Mouseflow.getSessionId() (just ensure Mouseflow is initialized when this runs)
    • Save the rule and publish your updated Launch library

Step 3: Verify the Implementation

  • Use the Adobe Experience Cloud Debugger to check if your target eVar is populated with the Mouseflow Session ID in analytics requests
  • Cross-check the ID with what's displayed in your Mouseflow dashboard for a test session to confirm they match
  • If you hit issues, double-check that Mouseflow's script loads before your Launch script, or that the _mfq callback is properly waiting for Mouseflow to initialize

A quick pro tip: Make sure your eVar is configured in Adobe Analytics with an appropriate expiration (like "Session") so the ID stays tied to the user's visit correctly.

内容的提问来源于stack exchange,提问作者Bala

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.09 16:32:37